Skip to content

fix: enforce explicit colors on sidebar panels#1320

Merged
giswqs merged 3 commits intomasterfrom
fix/sidebar-panel-colors
Apr 30, 2026
Merged

fix: enforce explicit colors on sidebar panels#1320
giswqs merged 3 commits intomasterfrom
fix/sidebar-panel-colors

Conversation

@giswqs
Copy link
Copy Markdown
Member

@giswqs giswqs commented Apr 30, 2026

Summary

  • Pin background and text colors on sidebar toggle and settings buttons, layer manager panels, and custom widget panels so they remain legible when the host Vuetify theme would otherwise render light-on-light.
  • Centralize the values in two module-level constants (SIDEBAR_PANEL_BACKGROUND, SIDEBAR_PANEL_TEXT_COLOR) for consistency.

Test plan

  • Open a notebook with a Map that has a sidebar and confirm the toggle, settings, layer manager, and custom widget panels all render with readable text.
  • Verify the sidebar still works under both light and dark Jupyter themes.

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.
Copilot AI review requested due to automatic review settings April 30, 2026 03:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread leafmap/maplibregl.py
Comment thread leafmap/maplibregl.py
Comment thread leafmap/maplibregl.py
Comment thread leafmap/maplibregl.py Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

- 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.
@github-actions github-actions Bot temporarily deployed to pull request April 30, 2026 03:37 Inactive
@giswqs giswqs merged commit e6e883f into master Apr 30, 2026
17 checks passed
@giswqs giswqs deleted the fix/sidebar-panel-colors branch April 30, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants