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

frontend: adds reduced motion compatibility #1433

Merged
merged 1 commit into from
Oct 4, 2023
Merged

Conversation

vyncent-t
Copy link
Contributor

@vyncent-t vyncent-t commented Oct 4, 2023

Issue:

Fixes #1390

Description:

This PR addresses the motion issue which causes discomfort or system slow down for some users. It ensures that Headlamp respects the OS/browser level preference for motion while also providing a manual override setting.

Additionally, the PR explores the implementation of reduced motion preference in a Material-UI application, as per the guidelines and discussions in Material-UI's repository.

Changes:

  • Implemented the prefers-reduced-motion media query to respect OS/browser level preference.
  • Explored solutions for implementing reduced motion preference in a Material-UI application, referencing Material-UI discussions and guidelines.

Notes:

This implementation references the discussions in Material-UI's repository on supporting prefers-reduced-motion (#16367) and follows one of the suggested implementations for a Material-UI application (comment). Thorough testing is advised to ensure compatibility across different OS and browser settings, as well as to verify that the manual override setting functions correctly.

Enabling/Disabling prefers-reduced-motion:

  • On Windows 11:

    • Navigate to Settings > Accessibility > Visual Effects.
    • Toggle the "Animation effects" option according to your preference.
  • Google Chrome:

Watch this video for reference

  • Click on the three vertical dots in the top right corner.
  • Navigate to More Tools > Rendering.
  • In the Rendering tab, scroll down and find the "Emulate CSS media feature prefers-reduced-motion" option, then toggle it according to your preference.

Command Palette Usage in Chrome Browser Tools:

The Command Palette in Chrome DevTools is a quick-access tool that allows you to run various DevTools commands. It's a handy feature for developers to speed up their workflow.

  • To open the Command Palette, press Ctrl + Shift + P while in DevTools.
  • Once the Command Palette is open, you can type the command you want to execute or the feature you want to access. For example, typing "Show Rendering" will filter the list of commands to those related to rendering, allowing you to quickly access the Rendering tab.
  • Selecting a command from the list or hitting Enter after typing it will execute that command.

@vyncent-t vyncent-t added enhancement New feature or request frontend Issues related to the frontend a11y Accessibility related issues labels Oct 4, 2023
@vyncent-t vyncent-t requested a review from illume October 4, 2023 15:32
@vyncent-t vyncent-t self-assigned this Oct 4, 2023
@illume
Copy link
Collaborator

illume commented Oct 4, 2023

Hi!

  • Can you please git commit --amend --no-edit -s it? So, we have a Signed-off-by and the DCO action is happy.
  • The file was added by accident I think: frontend/src/components/crd/snapshots/CustomResourceList.stories.storyshot

cheers,

@vyncent-t vyncent-t force-pushed the reduced-motion-a11y branch from 9887f1c to 9c9beaf Compare October 4, 2023 16:06
Copy link
Collaborator

@illume illume left a comment

Choose a reason for hiding this comment

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

Thanks 👍

@illume illume merged commit 601dd82 into main Oct 4, 2023
6 checks passed
@illume illume deleted the reduced-motion-a11y branch October 4, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Accessibility related issues enhancement New feature or request frontend Issues related to the frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

a11y: Support prefers-reduced-motion preference
2 participants