Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Fix focus management issue when updating folder tree children #2119

Merged
merged 8 commits into from
Apr 4, 2024

Conversation

cm9361
Copy link
Contributor

@cm9361 cm9361 commented Apr 3, 2024

Summary

What was changed:
Fixed an issue where folder tree items could not receive focus after data was updated.

Why it was changed:
The change was made because consumers require the ability to update the data within the Folder Tree component. Accessibility should not be broken by this action.

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR resolves:

UXPLATFORM-10350


Thank you for contributing to Terra.
@cerner/terra

@github-actions github-actions bot temporarily deployed to preview-pr-2119 April 3, 2024 17:50 Destroyed
@github-actions github-actions bot temporarily deployed to preview-pr-2119 April 3, 2024 18:10 Destroyed
@github-actions github-actions bot temporarily deployed to preview-pr-2119 April 3, 2024 18:41 Destroyed
Copy link
Contributor

@sycombs sycombs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me. I noticed some unexpected behavior with the reload example though where prior to clicking the "Reload Data" button, the expand all button would expand all items as expected, but after clicking "Reload Data" it would no longer expand the items. Individually row expand/collapse works fine. Most likely the expanded items state needs to be updated when the data is reloaded as well.

@cm9361
Copy link
Contributor Author

cm9361 commented Apr 3, 2024

Code looks good to me. I noticed some unexpected behavior with the reload example though where prior to clicking the "Reload Data" button, the expand all button would expand all items as expected, but after clicking "Reload Data" it would no longer expand the items. Individually row expand/collapse works fine. Most likely the expanded items state needs to be updated when the data is reloaded as well.

I am pretty sure I got overzealous on the useCallback usage. I'll fix it.

@github-actions github-actions bot temporarily deployed to preview-pr-2119 April 3, 2024 21:14 Destroyed
@cm9361
Copy link
Contributor Author

cm9361 commented Apr 3, 2024

@sycombs - I fixed the test page issue.

@github-actions github-actions bot temporarily deployed to preview-pr-2119 April 4, 2024 13:54 Destroyed
… being pulled into terra-compact-interactive-list
@github-actions github-actions bot temporarily deployed to preview-pr-2119 April 4, 2024 19:23 Destroyed
@cm9361 cm9361 merged commit 4ae47a2 into main Apr 4, 2024
22 checks passed
@cm9361 cm9361 deleted the folder-tree-reload branch April 4, 2024 19:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants