Improve layer panel positioning for upstream nodes (#1928)

* Improve layer panel positioning for upstream nodes

* highlight parents

* Final improvements

* Fill for selection box, bug fixes

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
adamgerhant
2024-08-14 03:27:42 -07:00
committed by GitHub
parent da13f21486
commit 2bd213f1aa
21 changed files with 321 additions and 255 deletions

View File

@@ -375,7 +375,7 @@
class="layer"
classes={{
selected: fakeHighlight !== undefined ? fakeHighlight === listing.entry.id : listing.entry.selected,
"in-selected-network": listing.entry.inSelectedNetwork,
"full-highlight": listing.entry.inSelectedNetwork && !listing.entry.selectedParent,
"insert-folder": (draggingData?.highlightFolder || false) && draggingData?.insertParentId === listing.entry.id,
}}
styles={{ "--layer-indent-levels": `${listing.entry.depth - 1}` }}
@@ -499,9 +499,11 @@
// Dimming
&.selected {
background: #404040;
// Halfway between 3-darkgray and 4-dimgray (this interpolation approach only works on grayscale values)
--component: calc((Max(var(--color-3-darkgray-rgb)) + Max(var(--color-4-dimgray-rgb))) / 2);
background: rgb(var(--component), var(--component), var(--component));
&.in-selected-network {
&.full-highlight {
background: var(--color-4-dimgray);
}
}