-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
fix(android): RootLayout shade cover blinking animation #10750
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
fix(android): RootLayout shade cover blinking animation #10750
Conversation
WalkthroughThe Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
npm error Exit handler never called! ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
View your CI Pipeline Execution ↗ for commit a8c8466.
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/core/ui/layouts/root-layout/index.android.ts (1)
101-103
: Conditional assignment prevents unwanted background color animation.The conditional check correctly prevents the background color animator from being created when
backgroundColor
is undefined, which eliminates the blinking effect.Consider applying the static analysis suggestion to use optional chaining on line 80:
- const isBackgroundGradient = backgroundColor && backgroundColor.startsWith('linear-gradient'); + const isBackgroundGradient = backgroundColor?.startsWith('linear-gradient');
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/core/ui/layouts/root-layout/index.android.ts
(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/core/ui/layouts/root-layout/index.android.ts (2)
packages/core/ui/core/view/index.android.ts (1)
View
(317-1268)packages/core/ui/layouts/root-layout/index.d.ts (1)
TransitionAnimation
(40-49)
🪛 Biome (1.9.4)
packages/core/ui/layouts/root-layout/index.android.ts
[error] 80-80: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: test-ios
- GitHub Check: test-android
🔇 Additional comments (2)
packages/core/ui/layouts/root-layout/index.android.ts (2)
79-79
: Good fix for preventing unwanted background color animations!Making the
backgroundColor
parameter optional instead of having a default value correctly addresses the blinking issue. This ensures background color animation only occurs when explicitly requested, preventing the unwanted blinking effect during initialization and closing phases.
82-82
: Correct array sizing logic for optional backgroundColor.The updated logic properly sizes the animation array based on whether a background color animator will be included. When
backgroundColor
is undefined or it's a gradient, the array size is 6; otherwise it's 7.
PR Checklist
What is the current behavior?
On android,
RootLayout
shade cover has a strange dark blinking on shade animation start.That is because we enforce a default color in cases when color shouldn't be animated (init and close).
What is the new behavior?
This PR makes sure that
RootLayout
will animate shade cover color only when needed.As for default shade color, it's already set on a previous step so it doesn't break.
Summary by CodeRabbit