fix: add stellar dark mode support for mobile badges and donation ban…#489
fix: add stellar dark mode support for mobile badges and donation ban…#489Prashant1git wants to merge 8 commits intoopenfoodfacts:mainfrom
Conversation
|
@Prashant1git is attempting to deploy a commit to the openfoodfacts Team on Vercel. A member of the Team first needs to authorize it. |
|
What is stellar dark mode? Also, we don't have a host |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdded ancestor-based dark-mode CSS ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
web-components/src/components/mobile-badges/mobile-badges.ts (1)
34-36: Remove duplicated:hostrule.Line 34–36 duplicates the exact block already defined at Line 31–33.
Suggested cleanup
:host { display: block; } - :host { - display: block; - }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@web-components/src/components/mobile-badges/mobile-badges.ts` around lines 34 - 36, Remove the duplicated :host CSS rule in the mobile-badges component: locate the two identical ":host { display: block; }" blocks in mobile-badges.ts (the :host rule around lines ~31–36) and delete the redundant one so only a single :host { display: block; } remains; if any other styles were meant to be different, consolidate them into the remaining :host block instead of duplicating.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@web-components/src/components/mobile-badges/mobile-badges.ts`:
- Around line 34-36: Remove the duplicated :host CSS rule in the mobile-badges
component: locate the two identical ":host { display: block; }" blocks in
mobile-badges.ts (the :host rule around lines ~31–36) and delete the redundant
one so only a single :host { display: block; } remains; if any other styles were
meant to be different, consolidate them into the remaining :host block instead
of duplicating.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 5d2368d4-41ac-43c0-8cb9-3943b71a4a09
📒 Files selected for processing (2)
web-components/src/components/donation-banner/donation-banner.tsweb-components/src/components/mobile-badges/mobile-badges.ts
@Prashant1git can you please answer? |
Updated styles for mobile badges in dark mode.
quick update @VaiTon! looked deeper into the code and realized the web components have an internal "darkModeListener "that automatically applies a .dark-mode class to the wrapper when dark mode is active. so I completely removed |
What
donation-banner.tsandmobile-badges.ts..dark-modeclasses with:host-context(.dark)to ensure these web components correctly listen to and inherit the main website's global dark theme toggle, while maintaining fallback support.Screenshot
Fixes bug(s)
Part of
Summary by CodeRabbit