Skip to content

feat(touch-action): adding touch action none to draggable components #3656

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

Open
wants to merge 7 commits into
base: spectrum-two
Choose a base branch
from

Conversation

aramos-adobe
Copy link
Contributor

Including the touch action rule for draggable content

The slider, color slider, color area, color wheel, color handle all deserve to have their touch-action property manages so that trying to set the value of those interfaces doesn't cause page scrolling in touch context.

Adding touch-action: none to a slider or any draggable component is necessary to prevent the browser's default touch behaviors—such as scrolling, pinch-zooming, or double-tap zooming—from interfering with the component's intended interaction.

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • VRTs have been run and looked at.
  • Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

Screenshots

To-do list

  • Remove touch-action: none in listed components in SWC

  • I have read the contribution guidelines.

  • I have updated relevant storybook stories and templates.

  • I have tested these changes in Windows High Contrast mode.

  • If my change impacts other components, I have tested to make sure they don't break.

  • If my change impacts documentation, I have updated the documentation accordingly.

  • ✨ This pull request is ready to merge. ✨

@aramos-adobe aramos-adobe self-assigned this Apr 3, 2025
Copy link

changeset-bot bot commented Apr 3, 2025

🦋 Changeset detected

Latest commit: 8de4da1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@spectrum-css/colorhandle Minor
@spectrum-css/colorslider Minor
@spectrum-css/colorarea Minor
@spectrum-css/slider Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Apr 3, 2025

File metrics

Summary

Total size: 1.38 MB*
No change in file sizes

Package Size Minified Gzipped
colorarea 3.66 KB 3.46 KB 1.01 KB
colorhandle 4.10 KB 3.88 KB 1.08 KB
colorslider 4.12 KB 3.88 KB 1.08 KB
colorwheel 5.52 KB 5.19 KB 1.37 KB
slider 29.42 KB 27.76 KB 3.68 KB

File change details

colorarea

Filename Head Minified Gzipped Compared to base
index.css 3.66 KB 3.46 KB 1.01 KB 🔴 ⬆ 0.02 KB
metadata.json 1.69 KB - - -

colorhandle

Filename Head Minified Gzipped Compared to base
index.css 4.10 KB 3.88 KB 1.08 KB 🔴 ⬆ 0.07 KB
metadata.json 1.87 KB - - -

colorslider

Filename Head Minified Gzipped Compared to base
index.css 4.12 KB 3.88 KB 1.08 KB 🔴 ⬆ 0.02 KB
metadata.json 2.12 KB - - -

colorwheel

Filename Head Minified Gzipped Compared to base
index.css 5.52 KB 5.19 KB 1.37 KB 🔴 ⬆ 0.02 KB
metadata.json 2.05 KB - - -

slider

Filename Head Minified Gzipped Compared to base
index.css 29.42 KB 27.76 KB 3.68 KB 🔴 ⬆ 0.07 KB
metadata.json 12.82 KB - - -
* Size is the sum of all main files for packages in the library.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

Copy link
Contributor

github-actions bot commented Apr 3, 2025

🚀 Deployed on https://pr-3656--spectrum-css.netlify.app

@@ -2,7 +2,8 @@ import { Template as ButtonGroup } from "@spectrum-css/buttongroup/stories/templ
import { Template as Checkbox } from "@spectrum-css/checkbox/stories/template.js";
import { Template as CloseButton } from "@spectrum-css/closebutton/stories/template.js";
import { Template as Modal } from "@spectrum-css/modal/stories/template.js";
import { getRandomId, renderContent } from "@spectrum-css/preview/decorators";
import { getRandomId } from "@spectrum-css/preview/decorators";
import { Template as Typography } from "@spectrum-css/typography/stories/template.js";
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <no-unused-vars> reported by reviewdog 🐶
'Typography' is defined but never used.

@aramos-adobe aramos-adobe force-pushed the aramos-adobe/css1078-s2-touch-action-components branch from 90388d1 to fe4cef8 Compare April 3, 2025 15:19
@aramos-adobe aramos-adobe marked this pull request as draft April 4, 2025 21:25
@aramos-adobe aramos-adobe marked this pull request as ready for review April 17, 2025 16:20
@aramos-adobe aramos-adobe added ready-for-review size-2 S ~6-18hrs; not hard or time consuming, one or two work days to complete. S2 Spectrum 2 labels Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review S2 Spectrum 2 size-2 S ~6-18hrs; not hard or time consuming, one or two work days to complete.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant