Skip to content

Bug(chart): Three-dot menu button alignment broken by linkHoverBg theme token #36795

@innovark37

Description

@innovark37

Screenshot

Image Image Image Image

Description

The three-dot menu button on chart has a visual alignment issue when a custom theme defines a linkHoverBg color for buttons. The icon appears off-center, pushed to the right edge of the button's hover background area.

Current Behavior

Default theme:

  • linkHoverBg is transparent by default
  • Button has padding-right: 0
  • Icon appears visually centered ✅

Custom theme:

  • linkHoverBg is not transparent, e.g., rgba(0,0,0,0.04)
  • Button has padding-right: 0
  • Icon appears pushed to the right edge of the hover background ❌

Root Causes

  1. CSS issue: padding-right: 0 removes necessary spacing for the hover background
  2. Semantic issue: Using buttonStyle="link" for a menu toggle button (not an actual link)
  3. Theme incompatibility: Custom theme tokens expose the layout flaw

Steps to Reproduce

  1. Apply custom theme in config.py
THEME_DEFAULT = {
    "components": {
      "Button": {
        "linkHoverBg": "rgba(0,0,0,0.04)"
      }
    },
    "algorithm": "default",
}
THEME_DARK = {
    "components": {
      "Button": {
        "linkHoverBg": "rgba(255,255,255,0.08)"
      }
    },
    "algorithm": "dark",
}
  1. Navigate to any dashboard with charts
  2. Hover over any chart's three-dot menu button (top-right corner)
  3. Observe the visual defect - three-dot icon is not centered within the hover background

Metadata

Metadata

Assignees

No one assigned

    Labels

    #bug:cosmeticCosmetic/layout/design tweak neededglobal:themingRelated to theming Superset

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions