Skip to content

fix(Logo): give Azure logo gradients unique ids - #1332

Open
oranjan wants to merge 1 commit into
ClickHouse:mainfrom
oranjan:fix/806-azure-gradient-ids
Open

oranjan wants to merge 1 commit into
ClickHouse:mainfrom
oranjan:fix/806-azure-gradient-ids

Conversation

@oranjan

@oranjan oranjan commented Nov 28, 2026 •

Copy link
Copy Markdown

Description

  • The Azure logo used hardcoded gradient ids, so every copy on a page shared them. In Safari, when a Select shows Azure in both the trigger and the open list, the trigger's gradients end up resolving to the list's copy. Once the list closes, 3 of the 4 shapes paint nothing and only the solid #0078D4 piece is left.
  • Uses useId() to give each instance its own gradient ids, the same pattern Polaris.tsx already uses.
  • Adds a test that two Azure logos don't share gradient ids (it fails on the old code) and that every url(#…) fill points at a gradient inside the same svg.

Links and tickets

Fixes #806

Good to know

  • Reproduced in Safari on current main and on the commit the issue was filed against (chore: 🤖 add select text+icon storybook story (cloud provider) #801), using the Forms/Select → CloudProvider story in dark theme. Could not reproduce in Chrome 139, 144 or 158, so it looks Safari only. The theme is not the cause; it just happened to be dark in the report.
  • Kept this PR to Azure only. 43 other logos and 59 icon/flag/payment assets also use hardcoded ids with url(#…), and the example in docs/converting-svg-to-react-components.md uses one too. Happy to do a follow-up if you want them all moved to useId().

Checklist

  • Breaking changes? (add migration notes in changesets)
  • Visual changes? (specify in changesets)
  • Design review needed?

Contribution

  • Sufficient research before PR
  • Self-reviewed the PR
  • Manually tested the changes (when applies - visual confirmation in Storybook)
  • build and build-storybook work locally
  • Tests and Stories are aligned with the changes

Accessibility

N/A: only the internal gradient ids changed. The logo's role="img" and aria-label are unchanged.

Screenshots

Safari, Forms/Select → CloudProvider, dark theme, Azure selected and list closed.

Before:
before

After:
after

🤖 Generated with Claude Code


Note

Low Risk
Scoped SVG id fix for one logo with regression tests; no API or accessibility surface changes.

Overview
Fixes a Safari-only rendering bug where the Azure logo lost its gradient fills when multiple copies appeared on one page (e.g. a Select trigger and dropdown both showing Azure). Hardcoded linearGradient ids caused url(#…) references to resolve to another instance's defs.

The Azure logo component now uses React useId() to assign unique gradient ids per mount, matching the existing Polaris logo pattern. Azure.test.tsx asserts instances don't share gradient ids and that every gradient fill references a def inside the same SVG.

Includes a patch changeset for @clickhouse/click-ui.

Reviewed by Cursor Bugbot for commit 52235e0. Bugbot is set up for automated code reviews on this repo. Configure here.

Every Azure logo shared hardcoded gradient ids, so in Safari a Select
showing Azure in both the trigger and the open list could resolve the
trigger's gradients to the list's copy, leaving only the solid piece
once the list closed. Use useId() per instance, like Polaris.

Fixes ClickHouse#806

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 52235e0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clickhouse/click-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@oranjan
oranjan marked this pull request as ready for review November 28, 2026 14:56

This branch has not been deployed

No deployments
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.

Azure Icon occasionally struggles with dark them active state.

1 participant