Skip to content

Commit 8efa5b7

Browse files
colebemisbroccolinisoup
authored andcommitted
TreeView: Performance improvements (#2523)
* Prevent focus event from bubbling to parent items * Update scroll story * Create violet-plants-sip.md * Ignore lint error * Update stress test * Lift styles to root * Remove unused imports * Remove unused sx prop * Clean up styles * Create tidy-olives-know.md * Update warning and prefix classnames with PRIVATE_ * Replace VisuallyHidden styled-component * Use VisuallyHidden component for root level live region * Update warning * Style directory icon without styled-components * Remove sx prop from item * Disable chromatic on TreeView stress test
1 parent 3e54c13 commit 8efa5b7

File tree

3 files changed

+238
-178
lines changed

3 files changed

+238
-178
lines changed

.changeset/tidy-olives-know.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/react": patch
3+
---
4+
5+
TreeView: Performance improvements

src/TreeView/TreeView.stories.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ export const StressTest: Story = () => {
606606
</TreeView.LeadingVisual>
607607
Directory {index}
608608
<TreeView.SubTree>
609-
{Array.from({length: 100}).map((_, index) => (
609+
{Array.from({length: 1000}).map((_, index) => (
610610
<TreeView.Item key={index}>
611611
<TreeView.LeadingVisual>
612612
<FileIcon />
@@ -623,7 +623,6 @@ export const StressTest: Story = () => {
623623
}
624624

625625
StressTest.parameters = {
626-
// disables Chromatic's snapshotting on a story level
627626
chromatic: {disableSnapshot: true}
628627
}
629628

0 commit comments

Comments
 (0)