Skip to content

Commit 8b94c1e

Browse files
devvaannshabose
authored andcommitted
feat: layers caret mark, row animations and settings strings
1 parent 067cd86 commit 8b94c1e

2 files changed

Lines changed: 51 additions & 2 deletions

File tree

‎src/nls/root/strings.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,8 +825,9 @@ define({
825825
"LIVE_PREVIEW_LAYERS_EXPAND_LEVEL": "Expand to Level",
826826
"LIVE_PREVIEW_LAYERS_LEVEL": "Level {0}",
827827
"LIVE_PREVIEW_LAYERS_LEVEL_ALL": "All Levels",
828+
"LIVE_PREVIEW_LAYERS_SETTINGS": "Settings",
828829
"LIVE_PREVIEW_LAYERS_SHOW_TEXT_NODES": "Show Text Nodes",
829-
"LIVE_PREVIEW_LAYERS_HIDE_TEXT_NODES": "Hide Text Nodes",
830+
"LIVE_PREVIEW_LAYERS_HIGHLIGHT_ON_HOVER": "Highlight on Hover in Preview",
830831
"LIVE_PREVIEW_LAYERS_MOVE_UP": "Move Up",
831832
"LIVE_PREVIEW_LAYERS_MOVE_DOWN": "Move Down",
832833
"LIVE_PREVIEW_LAYERS_DRAG_TO_MOVE": "Drag to move",

‎src/styles/Extn-LayersPanel.less‎

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@
405405
font-size: @sidebar-content-font-size;
406406
}
407407

408-
.layers-tree.layers-kbd-nav .layers-node:hover:not(.layers-selected) {
408+
.layers-tree.layers-kbd-nav .layers-node:hover:not(.layers-selected):not(.layers-cursor) {
409409
background: transparent;
410410
}
411411

@@ -435,6 +435,25 @@
435435
background: @layers-row-select-bg;
436436
box-shadow: inset 2px 0 0 @layers-accent;
437437
}
438+
439+
&.layers-cursor {
440+
background: @layers-hover-bg;
441+
box-shadow: inset 2px 0 0 fade(@layers-accent, 70%);
442+
}
443+
444+
&.layers-cursor-ancestor {
445+
box-shadow: inset 2px 0 0 fade(@layers-accent, 35%);
446+
}
447+
448+
&.layers-moving {
449+
position: relative;
450+
z-index: 1;
451+
transition: transform 260ms cubic-bezier(0.2, 0, 0, 1);
452+
}
453+
454+
&.layers-spring {
455+
animation: layers-spring-row 600ms ease-in-out;
456+
}
438457
}
439458

440459
.layers-twisty {
@@ -507,6 +526,10 @@
507526
background: @layers-row-select-bg;
508527
}
509528

529+
.layers-node.layers-cursor .layers-node-actions {
530+
background: @layers-row-hover-bg;
531+
}
532+
510533
.layers-node-action {
511534
.layers-icon-button();
512535

@@ -868,9 +891,34 @@ body.layers-dnd-invalid {
868891
}
869892
}
870893

894+
@keyframes layers-spring-row {
895+
0%, 100% {
896+
background-color: @layers-accent-soft;
897+
box-shadow: inset 0 0 0 1px @layers-accent;
898+
}
899+
900+
25%, 75% {
901+
background-color: transparent;
902+
box-shadow: inset 0 0 0 1px transparent;
903+
}
904+
905+
50% {
906+
background-color: @layers-accent-soft;
907+
box-shadow: inset 0 0 0 1px @layers-accent;
908+
}
909+
}
910+
871911
@media (prefers-reduced-motion: reduce) {
872912
.layers-tab-container .layers-node.layers-flash {
873913
animation-duration: 1ms;
874914
background-color: fade(@layers-accent, 32%);
875915
}
916+
917+
.layers-tab-container .layers-node.layers-moving {
918+
transition: none;
919+
}
920+
921+
.layers-tab-container .layers-node.layers-spring {
922+
animation: none;
923+
}
876924
}

0 commit comments

Comments
 (0)