Skip to content

fix(ui): dark-mode destructive fill opacity and blue link button tone - #33714

Merged
shah-harshit merged 6 commits into
mainfrom
ai-mode-next-steps
Sep 21, 2026
Merged

shah-harshit merged 6 commits into
mainfrom
ai-mode-next-steps

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Dark-mode-only fixes to the core-components Button, per the dark-mode palette guideline. Light mode is unchanged.

  • Destructive button — dark --color-bg-error-solid (and _hover) now use --alpha(theme(--color-error-*) / 90%), softening the solid error fill to 0.9 opacity in dark. Shared token: among buttons only primary-destructive reads it.
  • Link button (link-color) — added tw:dark:text-link / tw:dark:hover:text-link-hover (+ icon). Dark link text is now the blue-300 link tone (#84caff) instead of the gray brand-secondary step; light keeps brand-secondary.
  • Storybook — Colors and LinkColors stories set theme: 'both' so the destructive + link variants render side-by-side in light|dark.

Testing

  • Structural verification against globals.css: --alpha(... / N%) is the existing dark pattern (e.g. --color-bg-error-primary); tw:text-link/tw:text-link-hover generate from --text-color-link/-hover, declared identically to the working text-brand-secondary.
  • Build/Storybook visual pass not run in this worktree (no node_modules).

Summary by Gitar

  • UI & Styling updates:
    • Updated dark-mode border, icon, overlay, and surface token definitions in globals.css
    • Enabled theme: 'both' parameter in Modal.stories.tsx and BaseButton.stories.tsx stories

This will update automatically on new commits.

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no outstanding correctness or repository-rule violations remain.

Summary

This PR refines core-component dark-mode styling while preserving light-mode behavior.

  • Applies dark-specific link tones and scoped 90% destructive-button fills.
  • Updates dark modal overlay, surface, border, icon, and brand tint tokens.
  • Adds side-by-side theme coverage for button stories and a portal-aware dark modal story.

Reviews (4) · Last reviewed commit: "fix(ui): move dark-mode toggle into rend..."

Apply 0.9 opacity to the dark error-solid fill (primary-destructive button)
and flip the link-color button to the blue-300 link tone in dark, per the
dark-mode palette guideline. Light mode stays unchanged. Show both variants
side-by-side in Storybook (Colors, LinkColors).
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 72%
72.39% (103316/142706) 57.5% (62924/109420) 58.53% (20590/35174)

useEffect in an anonymous Storybook decorator tripped react-hooks/rules-of-hooks
(UI checkstyle). Move the .dark-mode body toggle into the story's render (where
useState already runs), dropping the decorator.
@gitar-bot

gitar-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown
Code Review ✅ No issues found 1 closed / 1 findings

🟡 Medium risk · Dark-mode shared tokens and button behavior change across core UI components.

Dark-mode palette refinements to the Button component: destructive button now uses 90% opacity on the error fill, and link buttons display blue link text (#84caff) instead of gray in dark mode, with light mode unchanged. The dark error-solid opacity scope was adjusted to affect only buttons. No issues found.

✅ 1 closed
✅ Quality: Dark error-solid opacity change affects non-button consumers

📄 openmetadata-ui-core-components/src/main/resources/ui/src/styles/globals.css:1247-1248
The PR softens --color-bg-error-solid/_hover to 90% opacity in the dark theme and the summary scopes the impact to "among buttons only primary-destructive reads it." However this CSS variable backs the bg-error-solid utility, which is also consumed outside buttons in dark mode: the inbox notification count badge (InboxIconButton.tsx bg-error-solid), the featured-icon error variants (featured-icon.tsx dark:bg-error-solid), and RelationshipTypePicker.component.tsx. All of these now render at 90% opacity in dark mode, letting the underlying surface bleed through (e.g. the small white-on-red count badge becomes slightly translucent). Confirm this softening is intended for those components too, or scope the opacity change to the destructive button token rather than the shared feedback token.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

Copy link
Copy Markdown

@shah-harshit
shah-harshit added this pull request to the merge queue Sep 21, 2026
Merged via the queue into main with commit d7a211a Sep 21, 2026
107 checks passed
@shah-harshit
shah-harshit deleted the ai-mode-next-steps branch September 21, 2026 18:30

This branch was previously deployed

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

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants