Skip to content

fix(widgets): GeocoderWidget dark theme colors (#9899)#9974

Open
chrisgervang wants to merge 5 commits intomasterfrom
claude/fix-deckgl-9899-xrY08
Open

fix(widgets): GeocoderWidget dark theme colors (#9899)#9974
chrisgervang wants to merge 5 commits intomasterfrom
claude/fix-deckgl-9899-xrY08

Conversation

@chrisgervang
Copy link
Collaborator

@chrisgervang chrisgervang commented Feb 1, 2026

Closes #9899

Replace hardcoded colors in GeocoderWidget and DropdownMenu with CSS
variables to properly support dark theme. The dropdown button, menu,
and input field now inherit colors from the theme system.

https://claude.ai/code/session_01583bxG6ieS5bGfaVJUDuRY


Note

Low Risk
Primarily styling refactors to use theme CSS variables, with a small UI refresh behavior change (updateHTML() after geocode) that could affect render frequency but not data/security-critical paths.

Overview
Fixes GeocoderWidget dark-theme rendering by removing inline/hardcoded styling in geocoder-widget.tsx and DropdownMenu, replacing it with new class names and comprehensive CSS in modules/widgets/src/stylesheet.css that uses existing theme variables.

Behaviorally, GeocoderWidget.geocode() now forces an updateHTML() after geocoding so the UI refreshes to show updated history and error state, and DropdownMenu now returns null when there are no menu items. The pure-JS widgets example is updated to include _GeocoderWidget (with optional geolocation) alongside the existing widgets.

Written by Cursor Bugbot for commit c26bef0. This will update automatically on new commits. Configure here.

Replace hardcoded colors in GeocoderWidget and DropdownMenu with CSS
variables to properly support dark theme. The dropdown button, menu,
and input field now inherit colors from the theme system.

https://claude.ai/code/session_01583bxG6ieS5bGfaVJUDuRY
Move inline styles from GeocoderWidget and DropdownMenu components to
the stylesheet for better customizability. Users can now override these
styles via CSS without modifying the components.

https://claude.ai/code/session_01583bxG6ieS5bGfaVJUDuRY
@coveralls
Copy link

coveralls commented Feb 1, 2026

Coverage Status

coverage: 91.091%. remained the same
when pulling c26bef0 on claude/fix-deckgl-9899-xrY08
into 1510545 on master.

@chrisgervang chrisgervang added this to the v9.3 milestone Feb 2, 2026
- Apply glass effect (backdrop blur, shadows, rounded corners) to geocoder container
- Integrate input and dropdown button as a unified component
- Replace triangle icon with SVG chevron that rotates when open
- Hide dropdown button when history is empty
- Add updateHTML() call after geocode to re-render with updated history
- Use consistent system UI fonts for input and dropdown menu
- Add example usage of GeocoderWidget in widgets example

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

.deck-widget .deck-widget-geocoder-input:last-child {
border-top-right-radius: calc(var(--button-corner-radius, 8px) - 1px);
border-bottom-right-radius: calc(var(--button-corner-radius, 8px) - 1px);
}
Copy link

Choose a reason for hiding this comment

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

Input has incorrect corners when error shown without dropdown

Low Severity

The CSS selector .deck-widget-geocoder-input:last-child is intended to restore rounded right corners when the dropdown is absent. However, when there's an error message but no dropdown (empty history + geolocation disabled + failed geocode), the error div becomes the last child, not the input. This causes the input to retain flat right corners despite having no adjacent dropdown button — the error div wraps to the next row due to width: 100% and flex-wrap.

Fix in Cursor Fix in Web

}

.deck-widget .deck-widget-dropdown-item:hover {
background: var(--button-stroke, rgba(255, 255, 255, 0.3));
Copy link

Choose a reason for hiding this comment

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

Dropdown item hover effect invisible in all themes

Medium Severity

The dropdown item hover style uses var(--button-stroke) for the background color, but --button-stroke is designed to match the theme's base color (light stroke on light themes, dark stroke on dark themes). Since the dropdown menu uses --button-background which has the same hue, the hover effect is imperceptible. In LightGlassTheme, it's semi-transparent white on white. In DarkGlassTheme, it's semi-transparent dark on dark. Users won't see any visual feedback when hovering over dropdown items.

Fix in Cursor Fix in Web

…tion in example

- Style error message as themed popup below widget instead of breaking layout
- Enable geolocation option in widgets example

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

[Bug] Geocoder Widget showing wrong color in dark theme

3 participants

Comments