Skip to content

fix(ui): fix fill dropdown testid ambiguity and missing translations#7889

Merged
steveruizok merged 2 commits intomainfrom
fix/fill-extra-translations
Feb 11, 2026
Merged

fix(ui): fix fill dropdown testid ambiguity and missing translations#7889
steveruizok merged 2 commits intomainfrom
fix/fill-extra-translations

Conversation

@steveruizok
Copy link
Copy Markdown
Collaborator

@steveruizok steveruizok commented Feb 11, 2026

In order to fix a Playwright test failure caused by duplicate data-testid="style.fill" elements and missing tooltip translations, this PR adds a testIdType prop to StylePanelDropdownPickerProps and applies it to the fill-extra dropdown.

The fill-extra dropdown introduced in #7885 originally used uiType="fill-extra", which broke tooltip translations (keys like fill-extra-style.none don't exist). The first commit fixed this by changing uiType back to "fill", but that caused both the button picker and dropdown picker to emit data-testid="style.fill", breaking the Playwright strict mode selector. The second commit adds testIdType to decouple the test ID from the translation key, giving the dropdown data-testid="style.fill-extra" while keeping uiType="fill" for correct translations.

Change type

  • bugfix

Test plan

  1. Select a geo shape
  2. Hover over the fill dropdown button — verify tooltip shows "Fill — Pattern" (not raw keys)
  3. Open the dropdown, hover each option — verify all tooltips are translated
  4. Run the style panel e2e test — verify getByTestId('style.fill') resolves uniquely
  • End to end tests

Release notes

  • Fixed duplicate test IDs and missing translations in the fill style dropdown.

API changes

  • Added optional testIdType to StylePanelDropdownPickerProps to override the test ID prefix independently of uiType

The fill-extra dropdown was using uiType="fill-extra", generating
translation keys like "fill-extra-style.none" which don't exist.
Changed to uiType="fill" to reuse existing fill-style.* translations.
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
examples Ready Ready Preview Feb 11, 2026 9:51pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
analytics Ignored Ignored Preview Feb 11, 2026 9:51pm
chat-template Ignored Ignored Preview Feb 11, 2026 9:51pm
tldraw-docs Ignored Ignored Preview Feb 11, 2026 9:51pm
tldraw-shader Ignored Ignored Preview Feb 11, 2026 9:51pm
workflow-template Ignored Ignored Preview Feb 11, 2026 9:51pm

Request Review

@huppy-bot huppy-bot bot added the bugfix Bug fix label Feb 11, 2026
Copy link
Copy Markdown

@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 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@steveruizok steveruizok added the dotcom-hotfix-please ⚙️ Triggers tldraw.com production deploy after merge label Feb 11, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Feb 11, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
image-pipeline-template e8eeaa2 Commit Preview URL

Branch Preview URL
Feb 11 2026, 09:53 PM

Expose a testIdType prop on StylePanelDropdownPicker to allow overriding the data-testid prefix (defaults to uiType). Use testIdType when rendering data-testid attributes for the toolbar and individual items. Update DefaultStylePanelContent to pass testIdType="fill-extra" for the fill-extra button. This makes test IDs configurable for cases where the UI type needs a different test prefix.
@huppy-bot
Copy link
Copy Markdown
Contributor

huppy-bot bot commented Feb 11, 2026

API Changes Check Passed

Great! The PR description now includes the required "### API changes" section. This helps reviewers and SDK users understand the impact of your changes.

@steveruizok steveruizok changed the title fix(ui): fix missing translations for fill dropdown tooltips fix(ui): fix fill dropdown testid ambiguity and missing translations Feb 11, 2026
@steveruizok steveruizok added this pull request to the merge queue Feb 11, 2026
Merged via the queue into main with commit 4642780 Feb 11, 2026
17 checks passed
@steveruizok steveruizok deleted the fix/fill-extra-translations branch February 11, 2026 22:10
huppy-bot bot pushed a commit that referenced this pull request Feb 11, 2026
…7889)

In order to fix a Playwright test failure caused by duplicate
`data-testid="style.fill"` elements and missing tooltip translations,
this PR adds a `testIdType` prop to `StylePanelDropdownPickerProps` and
applies it to the fill-extra dropdown.

The fill-extra dropdown introduced in #7885 originally used
`uiType="fill-extra"`, which broke tooltip translations (keys like
`fill-extra-style.none` don't exist). The first commit fixed this by
changing `uiType` back to `"fill"`, but that caused both the button
picker and dropdown picker to emit `data-testid="style.fill"`, breaking
the Playwright strict mode selector. The second commit adds `testIdType`
to decouple the test ID from the translation key, giving the dropdown
`data-testid="style.fill-extra"` while keeping `uiType="fill"` for
correct translations.

### Change type

- [x] `bugfix`

### Test plan

1. Select a geo shape
2. Hover over the fill dropdown button — verify tooltip shows "Fill —
Pattern" (not raw keys)
3. Open the dropdown, hover each option — verify all tooltips are
translated
4. Run the style panel e2e test — verify `getByTestId('style.fill')`
resolves uniquely

- [ ] End to end tests

### Release notes

- Fixed duplicate test IDs and missing translations in the fill style
dropdown.

### API changes

- Added optional `testIdType` to `StylePanelDropdownPickerProps` to
override the test ID prefix independently of `uiType`
huppy-bot bot added a commit that referenced this pull request Feb 11, 2026
…slations

This is an automated hotfix for dotcom deployment.

Original PR: #7889
Original Author: @steveruizok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Bug fix dotcom-hotfix-please ⚙️ Triggers tldraw.com production deploy after merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant