frontend: adds reduced motion compatibility #1433
Merged
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.
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:
prefers-reduced-motion
media query to respect OS/browser level preference.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:
Google Chrome:
Watch this video for reference
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.
Ctrl
+Shift
+P
while in DevTools.