-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
animations: Support reduced motion #26376
Conversation
We can likely get rid of the whole In case you want to try it, remove this line and run |
From the issue thread linked though it seems some people like the animations… which is why I wen that route instead whatever the long term solution is, could this be applied in the meantime? it's an accessibility issue, and though it probably doesn't impact many people, and we could work around it with css applied in the useragent, it'd be great to do something about it! I'll look into removing the animation module in the meantime edit: Looked into fomantic's issues when disabling transitions, and it seems like it uses javascript tricks that obscure how it works… I'd probably need to figure out how to set up a proper dev environment, and really don't feel like digging into that right now. I've already spend hours debugging their libraries for issues like this, and gave up |
a7236ca
to
1dc0c84
Compare
Removed the unused rules for the static transitions, and simplified the pulse animation :D will work on the spinner |
Added a first draft for SVG loading indicators. More info in the commit! Is it fine to load the SVG from the CSS? I did it this way because it seemed simpler and shouldn't break any existing code, but maybe it should be done as a reusable template/component… If bigger changes are needed, I'll let someone more familiar with the codebase take over. I can't really do any major refactor as this is my first PR and I don't know the codebase well yet, if at all. As far as I'm concerned, in its current state, this PR solves the motion issue, though the latest commit likely introduces other issues. I'll write a better commit message for the second commit before this gets merged, or is it better if I squash the two commits? Thanks for your help! |
Most animations in gitea are handled by fomantic-ui, but as it doesn't support reduced motion, this commit adds a hacky workaround to force-disable motion animations. It also makes gitea's built-in animations respect reduced-motion.
f851d1d
to
7b98cd4
Compare
I think maybe this PR should focus only on the loading icon replacement and we defer the animation removal to later. I want to try removing the transitions module soon, and if I succeed, it will be much cleaner than these style overrides. |
This is based on the work of Utkarsh Verma (n3r4zzurr0 on GitHub), under the MIT license.
7b98cd4
to
e39c6b2
Compare
I'm not really interested on working on this further if the main focus isn't reduced motion support… I mostly wanted to do something about that year-old issue, and don't have much interest on doing anything else. I've spent a lot more time on this than I wanted to, and don't really want to do any more work. Feel free to cherrypick and merge my spinners commit if you want to, I'll leave this PR as a draft if someone else wants to pick back up where I left off |
Maybe we should close then, I can not really accept these CSS hacks for the animation removal. I think we are clear we don't want these animations, even when the user has the reduced motion preference disabled. As I said, I will investigate separately what it takes to remove the Fomantic module, which is imho the proper solution. As for the spinner, I imagine it will be a tricky endevour because it will likely need some size adjustments based on location in use. |
Transition module removal in #26469. |
#26469 has been merged |
The spinner replacement is still valuable here, need to check if it works. |
The Fomantic loader (spinner) has been removed by #26670 If I understand correctly, (this PR) it's willing to use SVG spinner instead of CSS spinner in the future? |
SVG spinners would be ideal yes, because these can be swapped easily to static SVGs for |
I think we can close this as I assume the original author may have lost interest. We can re-open anytime of course. |
Most animations in gitea are handled by fomantic-ui, but as it doesn't support reduced motion, this commit adds a hacky workaround to force-disable motion animations. It also makes gitea's built-in animations respect reduced-motion.
I tried patching the issue upstream, but gave up after a few hours because of how messy and hard to work with their codebase is. This fixes #15709.