-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix,feat: canvas followups 11 #6878
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psychedelicious
requested review from
blessedcoolant,
maryhipp and
hipsterusername
as code owners
September 18, 2024 13:53
hipsterusername
approved these changes
Sep 18, 2024
hipsterusername
force-pushed
the
psyche/canvas-followups-11
branch
from
September 18, 2024 17:11
68ca222
to
23ccaf2
Compare
This is expose as a setting int he settings popover. On by default for distraction-free staging.
This was caused by allowing the stage to be set to fractional coordinates. For example, the stage might be positioned at `x: 142.22255, y: 488.79`. When positioned like this, the canvas will be slightly misaligned with its native pixel grid. The browser does its best, but this causes tiny scaling artifacts throughout the image. It's most noticeable where there is a sharp contrast. This behaviour was introduced while troubleshooting an issue with degraded quality when saving canvas to gallery. Turned out the stage position was unrelated to that issue, but I didn't realize that the change would cause this other type of problem. The fix is super simple - ensure we floor stage coords when setting the manually. Konva never sets the position to fractional coordinates itself. For example, while dragging the stage, Konva sets the stage coordiantes itself, and they are always integers.
By modeling canvas state as a zod schema vs a Typescript type, we get a runtime validator that can be used for metadata recall.
Had to shuffle around the canvas right panel tabs state.
- Rework hotkey data to include the keys for each hotkey action. - Add wrapper for `useHotkeys` that accepts a hotkey category and id. Automatically selects the key from the hotkey data. - Add handling for macOS (cmd vs ctrl, option vs alt). - Redo all hotkey descriptions, deleting nonexistant ones. - Some `esc` hotkeys that just close whatever you are currently in are omitted due to their relative simplicity and intuitiveness.
hipsterusername
force-pushed
the
psyche/canvas-followups-11
branch
from
September 18, 2024 18:04
23ccaf2
to
a26f1f5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
alt+a
hotkeyRelated Issues / Discussions
Discord & offline discussion
QA Instructions
Review the hotkeys descriptions.
Merge Plan
Due for an alpha
Checklist