Repository navigation
fix(linux): CSS keyframe animations, mouse enter/leave/move and ActivityIndicator spin - #11623
Merged
Merged
Conversation
KeyframeAnimation sets the style's keyframe values when it starts, and they win over local values, so the Linux Animation's local writes didn't show until the animation ended (animate-pulse never pulsed). Like iOS and Android, an animation with valueSource 'keyframe' now writes the keyframe values.
A GtkEventControllerMotion, attached while any of them has a listener, raises the events (mouseMove with getX/getY) and keeps the hover visual state, as Windows does. MasonKit's :hover and onMouseLeave relied on them.
GTK left the spinner's CSS animation still when gtk_spinner_start ran before the widget was on screen (or inside its map signal), until a theme change restyled it. It now starts on the turn after the spinner is mapped.
|
View your CI Pipeline Execution ↗ for commit 61d876d
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Linux fixes found running the shadcn desktop template on MasonKit.
CSS keyframe animations (
ui/animation/index.linux.ts).KeyframeAnimationsets the style's keyframe values when it starts, and they win over local values. The LinuxAnimationwrote local values every frame, so nothing visible changed until the animation ended (animate-pulsenever pulsed). Like iOS and Android, an animation withvalueSource: 'keyframe'now writes the keyframe values.mouseEnter,mouseLeave,mouseMove(ui/core/view/index.linux.ts). Linux raised none of them. While any has a listener, aGtkEventControllerMotionon the view's widget raises them (mouseMovewithgetX/getYin the view's coordinates) and keeps thehovervisual state, as Windows does. MasonKit's:hoverandonMouseLeavedepend on these.ActivityIndicator (
ui/activity-indicator/index.linux.ts). Whenbusywas set before the spinner was on screen, GTK left its CSS animation still until a theme change restyled it. Starting it from inside themapsignal had the same result. It now starts on the turn after the spinner is mapped.Tested on Ubuntu 22.04 (GTK 4.6, Pop!_OS): the skeleton pulses, chart hover and
:hoverstyles work, and the spinner turns without a theme change.