Skip to content
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

Restore select tool functionality and shallow select mode #1583

Merged
merged 3 commits into from
Jan 18, 2024

Conversation

0HyperCube
Copy link
Member

Restore select tool functionality:

  • Shallow select
  • alt click drag to duplicate
  • ctrl D duplicate
  • alt to centre
  • Snapping when constrained or centred

@Keavon
Copy link
Member

Keavon commented Jan 18, 2024

I can't believe you managed to remain code negative while adding back all this functionality— including Deep/Shallow selection which used to be that hideous mess of hundreds of lines of highly indented code. This is working remarkably well in general! I just have a few notes for how we can further improve the UX:

  • Could you please make the duplicated copy (the one being dragged) from Alt-drag appear above the original in the layer stack instead of beneath?

  • And for Shallow Select, could you please make that ignore artboards?

  • There's also one more overall behavioral change we need from shallow selection mode, it needs to follow this algorithm described in this drawing I made:

    image

    • Circles are folders
    • Rectangles are layers with graphical content
    • The gray circle and two gray rectangles are the three selections in this example
    • The two lighter faded gray rectangles are children of the selected folder
    • The orange arrows point from which graphical content is clicked in the viewport to which item ends up getting selected (or, if Shift is held, added to the selection)
      • If Shift is held and something is added to the selection, any sub-layers of that are deselected
  • As a bonus, we'd ideally like to also visualize what is about to be selected in shallow select mode by showing, upon hover, an overlay of the bounding box for the layer that will be selected upon clicking.


I'm more than happy to merge this in any state and continue those in future PRs. I'm just making a note of them here or I can transfer them to a separate issue if you'd prefer we save those enhancements for later.

Copy link
Member

@Keavon Keavon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good!

@0HyperCube 0HyperCube closed this Jan 18, 2024
@0HyperCube
Copy link
Member Author

I'm not going to try and interpret this...
gibberish

@Keavon
Copy link
Member

Keavon commented Jan 18, 2024

Thanks!

@Keavon Keavon enabled auto-merge (squash) January 18, 2024 22:22
@Keavon Keavon disabled auto-merge January 18, 2024 22:23
@Keavon Keavon changed the title Restore select tool functionality Restore select tool functionality and shallow select mode Jan 18, 2024
@Keavon Keavon enabled auto-merge (squash) January 18, 2024 22:23
@Keavon
Copy link
Member

Keavon commented Jan 18, 2024

And one of us can move the Deep/Shallow Select dropdown to the user preferences at any point in the future. I'm personally ambivalent about whether it's part of the tool options or the preferences, but I respect your opinion about that as you mentioned in Discord. But I'd say it's moderately low priority to change at this moment so feel free to submit a PR anytime now or later in the future.

@Keavon Keavon merged commit 208e907 into master Jan 18, 2024
2 checks passed
@Keavon Keavon deleted the restore-select-tool branch January 18, 2024 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants