-
Notifications
You must be signed in to change notification settings - Fork 127
[trees] vibe-coded scroll perf fixes #515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
f23bb22
2600746
7529289
8d23d61
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -490,21 +490,24 @@ | |
| overflow-y: auto; | ||
| flex: 1 1 0; | ||
| min-height: 0; | ||
| /* NOTE(amadeus): There's a chance in many cases a user could use strict | ||
| * here, however not trying to assume, therefore `content` felt like the safest | ||
| * bet */ | ||
| contain: content; | ||
| /* NOTE(amadeus): will-change _may_ help with heavy scroll state, but may | ||
| * also not be worth it. */ | ||
| will-change: scroll-position; | ||
| } | ||
|
|
||
| [data-file-tree-virtualized-list='true'] { | ||
| position: relative; | ||
| min-height: 100%; | ||
| width: 100%; | ||
| overflow-anchor: none; | ||
|
Comment on lines
504
to
506
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Removing the Useful? React with 👍 / 👎. |
||
|
|
||
| &[data-is-scrolling] { | ||
| pointer-events: none; | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly not sure if i accidentally removed this or if this was from an earlier vibe code sesh |
||
| } | ||
|
|
||
| [data-file-tree-virtualized-sticky-offset='true'] { | ||
| contain: layout size; | ||
| contain: strict; | ||
| } | ||
|
|
||
| [data-file-tree-virtualized-sticky='true'] { | ||
|
|
@@ -513,6 +516,13 @@ | |
| display: flex; | ||
| flex-direction: column; | ||
| isolation: isolate; | ||
| /* NOTE(amadeus): Strict _may_ help hear with the heavey dom thrash this | ||
| * component will have */ | ||
| contain: strict; | ||
| /* NOTE(amadeus): will-change _may_ help with the noisy virtualized state */ | ||
| will-change: contents; | ||
| /* NOTE(amadeus): background color here _may_ help with compositing */ | ||
| background-color: var(--trees-bg); | ||
| } | ||
|
|
||
| [data-file-tree-search-container] { | ||
|
|
@@ -582,12 +592,6 @@ | |
| gap: var(--trees-item-row-gap); | ||
| border-radius: var(--trees-border-radius); | ||
|
|
||
| &:hover, | ||
| &[data-item-context-hover='true'] { | ||
| background-color: var(--trees-bg-muted); | ||
| --truncate-marker-background-color: var(--trees-bg-muted); | ||
| } | ||
|
|
||
| &[data-item-focused='true'], | ||
| &:focus-visible { | ||
| z-index: 2; | ||
|
|
@@ -625,6 +629,14 @@ | |
| } | ||
| } | ||
|
|
||
| [data-file-tree-virtualized-list='true']:not([data-is-scrolling]) | ||
| [data-type='item']:hover, | ||
| [data-file-tree-virtualized-list='true']:not([data-is-scrolling]) | ||
| [data-type='item'][data-item-context-hover='true'] { | ||
| background-color: var(--trees-bg-muted); | ||
| --truncate-marker-background-color: var(--trees-bg-muted); | ||
| } | ||
|
|
||
| [data-item-selected='true']:has(+ [data-item-selected='true']) { | ||
| border-bottom-left-radius: 0; | ||
| border-bottom-right-radius: 0; | ||
|
|
@@ -634,18 +646,25 @@ | |
| border-top-left-radius: 0; | ||
| border-top-right-radius: 0; | ||
| } | ||
|
|
||
| /* Flattened Directory Parts */ | ||
| [data-item-flattened-subitems] { | ||
| display: inline-flex; | ||
| align-items: center; | ||
| gap: 2px; | ||
| } | ||
| [data-item-flattened-subitem]:hover, | ||
| [data-file-tree-virtualized-list='true']:not([data-is-scrolling]) | ||
| [data-item-flattened-subitem]:hover, | ||
| [data-item-flattened-subitem-drag-target='true'] { | ||
| text-decoration: underline; | ||
| } | ||
|
|
||
| [data-file-tree-virtualized-list='true'][data-is-scrolling] | ||
| [data-type='item'], | ||
| [data-file-tree-virtualized-list='true'][data-is-scrolling] | ||
| [data-item-flattened-subitem] { | ||
| pointer-events: none; | ||
| } | ||
|
|
||
| /* Icon for each item */ | ||
| [data-item-section='icon'] { | ||
| flex-shrink: 0; | ||
|
|
@@ -904,7 +923,6 @@ | |
| height: 100%; | ||
| margin-right: calc(var(--trees-level-gap) - 1px); | ||
| opacity: 0; | ||
| transition: opacity 150ms ease; | ||
|
|
||
| & + & { | ||
| margin-left: calc( | ||
|
|
@@ -913,10 +931,16 @@ | |
| } | ||
| } | ||
|
|
||
| :host(:hover) [data-item-section='spacing-item'] { | ||
| :host(:hover) | ||
| [data-file-tree-virtualized-list='true']:not([data-is-scrolling]) | ||
| [data-item-section='spacing-item'] { | ||
| opacity: 0.75; | ||
| } | ||
|
|
||
| [data-file-tree-virtualized-list='true'][data-is-scrolling] | ||
| [data-item-section='spacing-item'] { | ||
| opacity: 0; | ||
| } | ||
| /* Git status indicator */ | ||
|
|
||
| /* This is a folder that contains a git change */ | ||
|
|
@@ -1048,7 +1072,6 @@ | |
| margin: var(--trees-focus-ring-width); | ||
| height: calc(var(--trees-row-height) - var(--trees-focus-ring-width) * 2); | ||
| border-width: 0; | ||
| transition: color 120ms ease; | ||
|
|
||
| display: flex; | ||
| } | ||
|
|
@@ -1255,6 +1278,13 @@ | |
| margin: var(--truncate-internal-fade-marker-width) 0; | ||
| } | ||
|
|
||
| [data-file-tree-virtualized-list='true'][data-is-scrolling] | ||
| [data-truncate-marker], | ||
| [data-file-tree-virtualized-list='true'][data-is-scrolling] | ||
| [data-truncate-fade] { | ||
| display: none; | ||
| } | ||
|
|
||
| [data-truncate-group-container='middle'] { | ||
| & [data-truncate-container] { | ||
| --truncate-marker-opacity: var(--truncate-internal-middle-marker-opacity); | ||
|
|
||
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.
pushed the random offset to main, to avoid all the other stuff in this branch that i ruined, fyi