fix(ui): fix fill dropdown testid ambiguity and missing translations#7889
Merged
steveruizok merged 2 commits intomainfrom Feb 11, 2026
Merged
fix(ui): fix fill dropdown testid ambiguity and missing translations#7889steveruizok merged 2 commits intomainfrom
steveruizok merged 2 commits intomainfrom
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
There was a problem hiding this comment.
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.
packages/tldraw/src/lib/ui/components/StylePanel/DefaultStylePanelContent.tsx
Show resolved
Hide resolved
Deploying with
|
| 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.
Contributor
|
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. |
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
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In order to fix a Playwright test failure caused by duplicate
data-testid="style.fill"elements and missing tooltip translations, this PR adds atestIdTypeprop toStylePanelDropdownPickerPropsand applies it to the fill-extra dropdown.The fill-extra dropdown introduced in #7885 originally used
uiType="fill-extra", which broke tooltip translations (keys likefill-extra-style.nonedon't exist). The first commit fixed this by changinguiTypeback to"fill", but that caused both the button picker and dropdown picker to emitdata-testid="style.fill", breaking the Playwright strict mode selector. The second commit addstestIdTypeto decouple the test ID from the translation key, giving the dropdowndata-testid="style.fill-extra"while keepinguiType="fill"for correct translations.Change type
bugfixTest plan
getByTestId('style.fill')resolves uniquelyRelease notes
API changes
testIdTypetoStylePanelDropdownPickerPropsto override the test ID prefix independently ofuiType