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

feat(ui): tablet support #7008

Merged
merged 18 commits into from
Oct 2, 2024
Merged

Conversation

psychedelicious
Copy link
Collaborator

Summary

Tablet support involves a number of changes:

  • Add handling for touch/pen input devices.
  • Add new object renderers for brush/eraser lines with pressure. These use perfect-freehand to compute a polygon that represents a brush stroke with variable pressure.
  • Make the tool picker bar float along the left hand side of the canvas.
  • Make some slight tweaks to the floating panel buttons to fit better.

I've also bumped the version to v5.1.0rc1 in this PR so I can do an RC release.

Related Issues / Discussions

QA Instructions

I've tested extensively on an iPad w/ apple pencil, and using an iPad as a tablet input device via Astropad. This forwards pen and touch inputs from the iPad to the host computer, emulating those input devices. For the most part, it works exactly like a drawing tablet.

Test Matrix

Input devices:

  • Pen
  • Touch
  • Mouse

Tools:

  • Brush
  • Eraser
  • Rectangle
  • Color picker
  • Move
  • View
  • Bbox

Known Issue

On Safari, the color picker doesn't work in some situations due to a tainted canvas issue. For example, if there is an inpaint mask layer, it doesn't work. This issue isn't new - it also occurs on the current stable release.

Unfortunately, because all iOS browsers are secretly safari under the hood, this means the color picker often doesn't work on iPad.

Merge Plan

n/a

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Documentation added / updated (if applicable)

@github-actions github-actions bot added frontend-deps PRs that change frontend dependencies frontend PRs that change frontend files labels Oct 2, 2024
@github-actions github-actions bot added the python PRs that change python files label Oct 2, 2024
@hipsterusername hipsterusername merged commit 950c9f5 into main Oct 2, 2024
34 checks passed
@hipsterusername hipsterusername deleted the psyche/feat/ui/tablet-support branch October 2, 2024 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend PRs that change frontend files frontend-deps PRs that change frontend dependencies python PRs that change python files
Projects
None yet
2 participants