Graphite
Graphite copied to clipboard
Tab swaps to dragging the opposite handle
Unsure of naming of the function
Partially closes #1870
| 📦 Build Complete for 0fe4c29659c2ade6f6056365dd13ba62bf9d92cb |
|---|
| https://b9a70f6c.graphite.pages.dev |
Currently if both the handles from an anchor are selected, tab switches to just having a random one selected. Is this the desired behaviour? I would have thought it would be more intuitive just to keep both handles selected (since they are both opposite to a formerly selected handle). However it probably doesn't matter too much.
Switched it to be that way, I think that makes more sense
Also please can you add a hint for this. These are the text at the bottom of the viewport:
Added one, again not sure of the naming
Clippy failed on a ton of stuff that I didn't touch, is that normal?
@DaraghD the clippy lints are fixed by https://github.com/GraphiteEditor/Graphite/commit/a395fbf0637c23b8b05a7c451ff7b8421587b655.
I'll do a QA review on this before we merge it. It's in my queue that I'm working through presently.
@DaraghD some QA feedback:
- Upon testing this, I think the best near-term solution for the question of cursor alignment is to enable cursor lock so the user's cursor disappears, but don't yet attempt to render a fake cursor. (Since unfortunately, I'm finding that the visibility of the misaligned cursor is too confusing.) Could you please add that part? You can reference how we do this in the NumberInput.svelte slider drag, for example. That's all frontend though, and this'll need to plumbed in from the backend. You could also look at the code paths which let the backend plumb to the frontend which cursor style to display, since this would be similar and could potentially be included in those code paths.
- When dragging an anchor around, but with no handles selected, it looks like hitting Tab still makes it swap by setting one of the handles to active. We don't want that happening, where an anchor makes a handle become selected. Only swapping should happen. Could you please fix that? And the hints bar input should also be responsive to that situation where hitting Tab would do nothing because no handles are selected (only anchors). But if handles and anchors are mixed, then Tab does do something (swaps the handles, not affecting anchors with no selected handles) so the hint should appear in that case. Please also fix the typo in the hint (three
p's). - You didn't cause this one but it's related to the selection aspect and I'd appreciate if you can fix it: when aborting the drag of a point or points with a right click or Escape, it causes the points that were selected at the beginning of the drag to all get deselected. We want to restore the point selection so it has the same set as when the drag began.
Thanks!
@DaraghD some QA feedback:
1. Upon testing this, I think the best near-term solution for the question of cursor alignment is to enable cursor lock so the user's cursor disappears, but don't yet attempt to render a fake cursor. (Since unfortunately, I'm finding that the visibility of the misaligned cursor is too confusing.) Could you please add that part? You can reference how we do this in the NumberInput.svelte slider drag, for example. That's all frontend though, and this'll need to plumbed in from the backend. You could also look at the code paths which let the backend plumb to the frontend which cursor style to display, since this would be similar and could potentially be included in those code paths. 2. When dragging an anchor around, but with no handles selected, it looks like hitting Tab still makes it swap by setting one of the handles to active. We don't want that happening, where an anchor makes a handle become selected. Only swapping should happen. Could you please fix that? And the hints bar input should also be responsive to that situation where hitting Tab would do nothing because no handles are selected (only anchors). But if handles and anchors are mixed, then Tab does do something (swaps the handles, not affecting anchors with no selected handles) so the hint should appear in that case. Please also fix the typo in the hint (three `p`'s). 3. You didn't cause this one but it's related to the selection aspect and I'd appreciate if you can fix it: when aborting the drag of a point or points with a right click or Escape, it causes the points that were selected at the beginning of the drag to all get deselected. We want to restore the point selection so it has the same set as when the drag began.
All these are now done, with small exception of the pointer lock as discussed- for now its just hidden through changing the cursor to none. I took care of some of the TODOs aswell as they were similar to what I was doing with the responsive hints for swapping handles. I probably broke a few things so ill try test as much as I can in the meantime.
!build
| 📦 Build Complete for e1d7dc39825b0cddd7a6bddbe24ff7fa8e253dac |
|---|
| https://0f95cd1d.graphite.pages.dev |
This will be ready to merge once GitHub fixes their CI outage and I can make it re-run to pass CI, which should be when I wake up.