-
Notifications
You must be signed in to change notification settings - Fork 72
[terra-folder-tree] Add the ability to expand/collapse folders #1915
Conversation
e853812
to
411ae0a
Compare
The background color for non-selected elements does not appear to be correct in the lowlight theme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overflow-wrap style still needs to be corrected. You wouldn't want to use anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if you saw my reply on the last PR since it's been closed, but long strings without spaces don't wrap with break-word
, or do we not expect consumers to have long strings without spaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, they do. Break word will break anywhere when you run out of room.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a minor comment but approving since it doesn't impact functionality.
import FolderTree from '../../src/FolderTree'; | ||
import FolderTreeItem from '../../src/subcomponents/FolderTreeItem'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we import these from index.js? This way, the usage would be more in line with how a consumer would utilize it.
onClick={onClick} | ||
onChange={onClick} | ||
aria-hidden // Hiding the radio button from assistive technology since they cannot be grouped correctly | ||
tabIndex={-1} // Prevent tabbing to the button since it should not be read or acknowledged by assistive technology |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will allow the control to get focus when you click though. Is that what you want? Also, is this a composite widget? Will you actually have higher level logic controlling this similar to the WorklistDataGrid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want the radio button to be clickable (per the UXPLATFORM-9679 AC) but we need to hide it from screenreaders so that they aren't reading radio buttons out of the tree hierarchy.
Merged so we can get a release out for expand/collapse, a follow-up Jira will be logged to address remaining comments. |
Summary
This PR adds the ability to expand and collapse folders so that users of
terra-folder-tree
can show and hide items in the folder tree.Screenshots
Collapsed:
![image](https://private-user-images.githubusercontent.com/42594047/286675525-db871ee0-dab3-4f65-b7fa-0715bf0a5d40.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMTQ5NTksIm5iZiI6MTczOTIxNDY1OSwicGF0aCI6Ii80MjU5NDA0Ny8yODY2NzU1MjUtZGI4NzFlZTAtZGFiMy00ZjY1LWI3ZmEtMDcxNWJmMGE1ZDQwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDE5MTA1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRiZDQ1ZDc2ZjZiYWZlMDI4OGQ3MDQ2ZWIyMzBjNzM4MTUzYWVmZmViODFiMzQ3NDA5MGM4YmVjN2E1M2M4ODkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Jhz1tdzHwmm2hCyO0z-tLC0JD54qN49OKqrQDXg0Q5Y)
Expanded:
![image](https://private-user-images.githubusercontent.com/42594047/286675638-6f146aa0-bdd8-4a31-8b34-dfacbf26be12.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMTQ5NTksIm5iZiI6MTczOTIxNDY1OSwicGF0aCI6Ii80MjU5NDA0Ny8yODY2NzU2MzgtNmYxNDZhYTAtYmRkOC00YTMxLThiMzQtZGZhY2JmMjZiZTEyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDE5MTA1OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdmNDlhZDM2YWVjN2E3NGM2NmI3ZDdjODYxYmFkNTExZGJlMGI0YjliYmY1NzRlOGIxMTU0NDViZGMzYjEwYTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Z9OK75N9aSBDIjCpe7GKWc9ywGdMmTWTwFpFd9i9PEE)
Testing
This change was tested using:
Reviews
In addition to engineering reviews, this PR needs:
Additional Details
This PR resolves:
UXPLATFORM-9680
Thank you for contributing to Terra.
@cerner/terra