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

#2158 - Fix the broken 'Reduced-motion' mode #2316

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

SebinSong
Copy link
Collaborator

@SebinSong SebinSong commented Aug 22, 2024

closes #2158

it appears that this feature was broken when the vuex-state for app-settings was moved to a separate module. So fixed it.

While at it, created a .force-motion css class for any part of the app where the animation still needs to happen regardless of the reduced-motion setting.
(eg. this highlight animation for move-to-specific-message feature in the chat-room.)

Cheers,

@SebinSong SebinSong self-assigned this Aug 22, 2024
@@ -15,7 +15,7 @@ span.c-twrapper(

.c-tooltip(
:style='styles'
:class='{"has-text-center": isTextCenter, "is-active": isActive, manual, "is-dark-theme": $store.getters.isDarkTheme}'
:class='{"has-text-center": isTextCenter, "is-active": isActive, manual, "is-dark-theme": $store.getters.isDarkTheme, "in-reduced-motion": isReducedMotionMode }'
Copy link
Collaborator Author

@SebinSong SebinSong Aug 22, 2024

Choose a reason for hiding this comment

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

Tooltip needs a special treatment here because, when it becomes active, it's appended to <body> not the root Vue component (<div id='#app'>)

@@ -1,5 +1,5 @@
<template lang='pug'>
.c-message(
.c-message.force-motion(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Message highlight animation still needs to happen regardless of reduced-motion setting.

Comment on lines +5 to +6
*:not(.force-motion)::after,
*:not(.force-motion)::before {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I noticed some animations happen in the ::after, ::before pseudo elements. eg) checkbox, toggle-button.
So took that into account here too.

Copy link

cypress bot commented Aug 22, 2024

group-income    Run #2945

Run Properties:  status check passed Passed #2945  •  git commit fd4276a8b2 ℹ️: Merge 1ddfd39453c3bc058007c995c19b7ffff81d0689 into d2a7b75643945aec5a5026a814a4...
Project group-income
Branch Review refs/pull/2316/merge
Run status status check passed Passed #2945
Run duration 10m 53s
Commit git commit fd4276a8b2 ℹ️: Merge 1ddfd39453c3bc058007c995c19b7ffff81d0689 into d2a7b75643945aec5a5026a814a4...
Committer Sebin Song
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 10
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 111
View all changes introduced in this branch ↗︎

Copy link
Member

@taoeffect taoeffect left a comment

Choose a reason for hiding this comment

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

Fantastic work @SebinSong! Tested and it works well. 👍

@taoeffect taoeffect merged commit c1b2191 into master Aug 29, 2024
4 checks passed
@taoeffect taoeffect deleted the sebin/task/#2158-investigate-reduced-motion-feature branch August 29, 2024 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Reduced Motion" setting does nothing
2 participants