Skip to content

feat(Chore)!: replace data-component-name with data-testid#1622

Merged
brtbrt merged 31 commits into
masterfrom
mbertamini/1598-data-testid
Jul 15, 2026
Merged

feat(Chore)!: replace data-component-name with data-testid#1622
brtbrt merged 31 commits into
masterfrom
mbertamini/1598-data-testid

Conversation

@brtbrt

@brtbrt brtbrt commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Closes #1598. Part of #626 — Major release plan 17.0.0.

Changes

  • Removes the deprecated data-component-name attribute from getPrefixedDataAttributes, which now emits only data-testid. This covers every component that renders test attributes through the shared utility.
  • Replaces the three hardcoded data-component-name attributes with data-testid: BurgerMenuIcon and NavigationBarActionGroup in navigation-bar.tsx, and Dialog in dialog.tsx.
  • Drops the redundant data-component-name on FixedFooter, which already carried a matching data-testid.

Tests

  • No test queried by data-component-name; the dedicated testid-test.tsx and all other selectors already use data-testid, so no test changes were required.
  • Verified locally: testid-test (15 passed), dialog-test (16 passed), and main-navigation-bar-test (2 passed).

Stack position — 5 of 10

This PR targets the branch from #1617 and can only be merged after #1617 lands on master. GitHub will retarget it to master automatically as the parent merges.

For the full merge strategy and ordering, see #626. Do not merge out of order.

brtbrt and others added 22 commits June 30, 2026 21:19
Remove the Tu skin entirely: skin definition, logo files and their
shells, the registry entry, the public exports, and all related
stories, screenshot tests, snapshots, storybook/playroom wiring, and
docs.

BREAKING CHANGE: the Tu skin has been removed. The TuLogo component and
the TU_SKIN, getTuSkin, and tuPalette exports are no longer available.
Closes #1597. Part of #626 — Major release plan 17.0.0.
Complete the O2-new cleanup missed in the initial replacement:

- playroom/themes.tsx: rename O2_New/O2_New_iOS to O2/O2_iOS so the
  Playroom O2 theme resolves (fixes the TypeScript build).
- audit-accessibility: audit the O2 skin instead of the removed O2-new.
- generate-design-tokens and import-mistica-icons: drop the stale
  o2-new entries so regeneration does not recreate the deleted files.
- docs: point to getO2Skin/o2Palette and a single o2 skin row.
Closes #1617. Part of #626 — Major release plan 17.0.0.
The Movistar-new skin no longer exists after its promotion to the
canonical Movistar skin, so its committed image snapshots are obsolete.
Regeneration does not delete obsolete image files, so remove them here.
These tests were pinned to the legacy Movistar skin because they were
unstable on Movistar-new. Since Movistar now is the former Movistar-new,
the warning still applies; reword it instead of dropping it.
…ng issue

Replace the free-text TODO comments with the `// todo <link> <description>`
pattern, pointing at the tracking issue for the screenshot instability.
The O2-new skin was removed from all acceptance test parametrizations
when O2-new replaced O2. These snapshot images are no longer generated
and are removed as obsolete output.
Removes the deprecated data-component-name attribute across all components.
getPrefixedDataAttributes now emits only data-testid, and the three hardcoded
data-component-name attributes (BurgerMenuIcon, NavigationBarActionGroup,
Dialog) are replaced; the duplicate on FixedFooter is dropped.

Ref: #1598
Copilot AI review requested due to automatic review settings July 2, 2026 02:17
@brtbrt brtbrt added the AI AI Generated label Jul 2, 2026
@brtbrt
brtbrt requested a review from a team July 2, 2026 02:17
@brtbrt brtbrt changed the title feat(Chore)!: replace data-component-name with data-testid feat(Chore): replace data-component-name with data-testid Jul 2, 2026
@brtbrt brtbrt linked an issue Jul 2, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is part of the 17.0.0 breaking-change plan and aims to complete the migration away from the deprecated data-component-name attribute by standardizing on data-testid across Mistica components and shared DOM utilities.

Changes:

  • Updates getPrefixedDataAttributes to stop emitting data-component-name when a componentName is provided, emitting only data-testid.
  • Replaces hardcoded data-component-name usages with data-testid in navigation-bar.tsx and dialog.tsx.
  • Removes a redundant data-component-name from FixedFooterLayout, keeping data-testid only.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/utils/dom.tsx Adjusts the shared data-attribute utility to prefer data-testid.
src/navigation-bar.tsx Replaces remaining hardcoded data-component-name attributes with data-testid.
src/fixed-footer-layout.tsx Removes redundant deprecated attribute, keeping data-testid.
src/dialog.tsx Replaces hardcoded data-component-name with data-testid on the dialog container.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/utils/dom.tsx Outdated
@brtbrt
brtbrt requested a review from Marcosld July 14, 2026 12:30
@brtbrt
brtbrt requested a review from a team July 14, 2026 12:51
@brtbrt
brtbrt changed the base branch from mbertamini/1617-remove-movistar-new to master July 14, 2026 15:40
@brtbrt brtbrt changed the title feat(Chore): replace data-component-name with data-testid feat(Chore)!: replace data-component-name with data-testid Jul 14, 2026
Comment thread doc/fonts.md

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was bad by previous PRs. fixed here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here: fixed on this PR

Comment thread src/__type_tests__/data-attributes-type-test.tsx Outdated
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown

Size stats

master this branch diff
Total JS 15.8 MB 15.8 MB -25 B
JS without icons 1.93 MB 1.93 MB -25 B
Lib overhead 96.3 kB 96.1 kB -124 B
Lib overhead (gzip) 21.2 kB 21.1 kB -29 B

Comment thread .gitignore
.directory
.DS_Store
.idea/
mistica-web.iml

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use intellij, I don't want to further commit it, unless explicitly

Comment thread src/__type_tests__/data-attributes-type-test.tsx Outdated
Remove the `never` restriction on `component-name` in `DataAttributes`,
making it a valid key for data attribute objects.
@brtbrt
brtbrt enabled auto-merge July 15, 2026 12:32
@brtbrt
brtbrt dismissed Marcosld’s stale review July 15, 2026 12:34

this is blocking the PR while Marcos is on vacations + reviewed by Abel. We're good to go

@brtbrt
brtbrt removed the request for review from Marcosld July 15, 2026 12:34
@brtbrt
brtbrt disabled auto-merge July 15, 2026 12:35
@brtbrt
brtbrt enabled auto-merge July 15, 2026 12:35
@brtbrt
brtbrt removed the request for review from a team July 15, 2026 12:35
@brtbrt
brtbrt disabled auto-merge July 15, 2026 12:35
@brtbrt
brtbrt enabled auto-merge July 15, 2026 12:35
@brtbrt
brtbrt merged commit dd9b607 into master Jul 15, 2026
12 checks passed
@tuentisre

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 16.72.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@tuentisre

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 17.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

AI AI Generated released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace data-component-name with data-testid in all mistica components

5 participants