This repository was archived by the owner on Apr 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +37
-19
lines changed
src/components/SidePanels Expand file tree Collapse file tree 3 files changed +37
-19
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { FC } from 'react';
33import { IconLockLocked , IconLockUnlocked } from '../../../assets/icons' ;
44import { ButtonProps } from '../../../common/Button/Button' ;
55import { RegionControlButton } from './RegionControlButton' ;
6+ import { FF_DEV_3873 , isFF } from '../../../utils/feature-flags' ;
67
78export const LockButton : FC < {
89 item : any ,
@@ -18,9 +19,25 @@ export const LockButton: FC<{
1819 const isLocked = locked || item . isReadOnly ( ) || annotation . isReadOnly ( ) ;
1920 const isRegionReadonly = item . isReadOnly ( ) && ! locked ;
2021
21- return item && ( hovered || item . isReadOnly ( ) || locked ) && (
22- < RegionControlButton disabled = { isRegionReadonly } onClick = { onClick } hotkey = { hotkey } look = { look } style = { style } >
23- { isLocked ? < IconLockLocked /> : < IconLockUnlocked /> }
24- </ RegionControlButton >
22+ if ( isFF ( FF_DEV_3873 ) ) {
23+ const styles = {
24+ ...style ,
25+ display : item . isReadOnly ( ) || locked ? undefined : 'none' ,
26+ } ;
27+
28+ return (
29+ < RegionControlButton disabled = { isRegionReadonly } onClick = { onClick } hotkey = { hotkey } look = { look } style = { styles } >
30+ { isLocked ? < IconLockLocked /> : < IconLockUnlocked /> }
31+ </ RegionControlButton >
32+ ) ;
33+ }
34+
35+ return (
36+ item &&
37+ ( hovered || item . isReadOnly ( ) || locked ) && (
38+ < RegionControlButton disabled = { isRegionReadonly } onClick = { onClick } hotkey = { hotkey } look = { look } style = { style } >
39+ { isLocked ? < IconLockLocked /> : < IconLockUnlocked /> }
40+ </ RegionControlButton >
41+ )
2542 ) ;
2643} ) ;
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ const useDataTree = ({
157157 '--selection-color' : color . alpha ( 0.1 ) . css ( ) ,
158158 } ,
159159 className : rootClass . elem ( 'node' ) . mod ( mods ) . toClassName ( ) ,
160- title : ( data : any ) => < RootTitle { ...data } /> ,
160+ title : ( data : any ) => < RootTitle { ...data } /> ,
161161 } ;
162162 } , [ hovered , selectedKeys ] ) ;
163163
@@ -442,7 +442,11 @@ const RegionControls: FC<RegionControlsProps> = observer(({
442442 />
443443 </ Elem >
444444 < Elem name = "control" mod = { { type : 'visibility' } } >
445- { ( hovered || hidden ) && (
445+ { isFF ( FF_DEV_3873 ) ? (
446+ < RegionControlButton onClick = { onToggleHidden } style = { hidden ? undefined : ( { display : 'none' } ) } >
447+ { hidden ? < IconEyeClosed /> : < IconEyeOpened /> }
448+ </ RegionControlButton >
449+ ) : ( hovered || hidden ) && (
446450 < RegionControlButton onClick = { onToggleHidden } >
447451 { hidden ? < IconEyeClosed /> : < IconEyeOpened /> }
448452 </ RegionControlButton >
Original file line number Diff line number Diff line change 1818 background-color var (-- selection-color , rgba (#0 0 0 , 0.04 ))
1919
2020 & :hover .outliner-item__controls
21- display grid
21+ display flex
2222
23- & _newUI
24- display flex
23+ & :hover .outliner-item__controls_newUI
24+ .outliner-item__control_type_lock button ,
25+ .outliner-item__control_type_visibility button
26+ display inline - flex !important
2527
2628 & -switcher
2729 width 24px
136138 position initial
137139 justify-content space-between
138140
139- .outliner-item__control_type_dirty
140- display none
141-
142- .outliner-item__control_type_lock
143- display none
144-
145141 .outliner-item__control_type_predict
146142 width 14px
147143
148144 .outliner-item__control_type_score
149145 font-size 12px
146+
147+ .outliner-item__control_type_predict :empty ,
148+ .outliner-item__control_type_score :empty
149+ display none
150150
151151 & _withControls
152152 grid-template-columns repeat (6 , 32px )
170170 color $magic_color
171171
172172 & :hover & __controls
173- display grid
174-
175- & _newUI
176- display flex
173+ display flex
177174
178175 .outliner-item__control_type_lock
179176 display flex
You can’t perform that action at this time.
0 commit comments