-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Toggle dragging/resize and toggle "selection lock" #103
Conversation
Hey, cool! Is the goal to solve #49 as well as #90? I got confused by the vid a bit. Would these be the two features: a) "lock" a selection (current selection is locked in place, another component can't be selected) Some thoughts:
Also I just opened #102 which builds on the In it, I basically call |
Yes, this PR covers both #49 and #90 a) exactly how 'lock' works in this PR. Need a new icon for this. 'readOnly' - makes more sense, since I missed resize. Totally make sense. Yeah, that would be nice! We're starting to have to many bool flags. I'll take a look at SelectionModes |
Yeah, not 100% sure it makes sense, just thought I'd mention. To do that, we'd need to have the UI be a multi-select (mouse vs. tab vs. locked??).
I can get on that. I was originally thinking it would be nice to see a lock icon in the tree view... i guess we could actually make the toggle there (like a lock action button would show up when you hovered over an item) — but maybe it's just more straightforward to have it in the header and maybe bound to |
@dikadk Should I take a look at this and add a lock toggle? Or is there more you wanted to do on it... |
I looked into adding Locked - SelectionMode, but I couldn't quite figure out logic with handling of old and new SelectionModes. Screen.Recording.2024-05-15.at.11.mp4 |
Hey cool! No worries on the SelectionModes, just wanted to mention them since they are new. Wait, I got confused again. Does this PR cover #90 ? I'm guessing the answer is no and I can still click to select other components when dragging is disabled. That's 100% fine if true — and maybe ideal? (I guess we'd want the selection lock to be a different toggle? I think?) I'll shut up and play with it now :) |
Just updated PR title. Sorry for confusion. This one ONLY covers dragging and resizing functionality in FOLLOW_FOCUS SelectionMode. I found it kinda clunky in FOLLOW_FOCUS mode. Maybe we can add another btn for LOCKING selection? Get a 'lock' icon and I can open another PR for that. |
Ok perfect! I'll check it out asap and merge and figure out a lock icon while I'm at it... |
I added the lock icon, did a bit of refactoring and then just decided to add the lock. It's very basic right now, just prevents any selection or hover. Not sure if we want to hover on lock?... |
Resolves #49
Resolves #90
We still need to use real "selection lock" icon, instead of placeholder. But selection/dragging logic is in place.
Screen.Recording.2024-03-17.at.10.04.41.PM.mov