Skip to content

[Bug] CustomCatalogCard metrics text is invisible in Dark Mode #1647

Description

@sahillpaul

Current Behavior

While auditing the CustomCatalogCard component for accessibility and theme compliance, I found that the metrics text (downloads, views, clones) at the bottom of the card becomes nearly invisible when the Meshery dashboard is toggled to Dark Mode.

The root cause is in src/custom/CustomCatalog/style.tsx. The MetricsDiv styled component hardcodes the text color to rgba(26, 26, 26, .8) without any theme awareness. Because the parent container (MetricsContainerFront) correctly switches its background to a dark teal in Dark Mode, this hardcoded near-black text fails WCAG contrast standards and becomes unreadable.

Expected Behavior

The metric text color should adapt dynamically to the active theme mode. Instead of a hardcoded RGBA string, it should utilize Sistent's theme tokens (specifically theme.palette.text.default), ensuring high contrast and readability against both the light and dark background states.

Screenshots/Logs

(I have attached the visual regression report showing the contrast failure in dark mode). ### Environment

  • OS: Windows
  • Environment: Local Development
  • Browser: Chrome / Edge
  • Component: Sistent CustomCatalogCard (MetricsDiv)

To Reproduce

  1. Start the Meshery UI or Sistent Storybook locally.
  2. Navigate to the Catalog page (or view CustomCatalogCard in Storybook).
  3. Toggle the application theme to Dark Mode.
  4. Scroll down to the bottom footer of any Catalog Card.
  5. Observe the text color of the metrics (Downloads, Views) blending into the dark background.

Contributor Guides and Resources

Sistent_Bug_Report_MetricsDiv.pdf

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions