fix: enforce explicit colors on sidebar panels#1320
Merged
Conversation
ipyvue 1.12.0 inherits Vuetify theme colors that can render as light text on light backgrounds, making sidebar panel headers and contents unreadable. Pin background and foreground colors on the sidebar toggle and settings buttons, layer manager, and custom widget panels so the UI remains legible regardless of the host theme.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to make sidebar controls/panels consistently legible regardless of the host Vuetify/Jupyter theme by pinning explicit background/text colors and centralizing those values as module-level constants.
Changes:
- Added centralized sidebar color constants (
SIDEBAR_PANEL_BACKGROUND,SIDEBAR_PANEL_TEXT_COLOR). - Applied explicit text color styling to sidebar toggle/settings buttons (floating sidebar + container sidebar).
- Applied explicit background/text color styling to Layer Manager and Custom Widget expansion panels.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🚀 Deployed on https://69f2ce69a75a9fb4ffcd021d--opengeos.netlify.app |
- Apply SIDEBAR_PANEL_BACKGROUND and SIDEBAR_PANEL_TEXT_COLOR to the floating sidebar v.Card overlay so the panel background respects the centralized constants instead of hardcoded white. - Add a text_color parameter to LayerManagerWidget so callers customizing the header background can keep header contrast; use it consistently for icons, close button, and panel content. - Add a text_color parameter to CustomWidget for the same reason; default still matches SIDEBAR_PANEL_TEXT_COLOR. - Convert implicit string-literal concatenation in Container/Map sidebar button style_ values to single f-strings for readability.
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.
Summary
SIDEBAR_PANEL_BACKGROUND,SIDEBAR_PANEL_TEXT_COLOR) for consistency.Test plan
Mapthat has a sidebar and confirm the toggle, settings, layer manager, and custom widget panels all render with readable text.