Skip to content

feat(ui-tag): new Tag v3 implementation - #2687

Open
git-nandor wants to merge 6 commits into
masterfrom
INSTUI-5130_new_tag_design_implementation
Open

feat(ui-tag): new Tag v3 implementation#2687
git-nandor wants to merge 6 commits into
masterfrom
INSTUI-5130_new_tag_design_implementation

Conversation

@git-nandor

Copy link
Copy Markdown
Contributor

Summary

  • Add Tag v3 (library v11_8) with the new design; v2 preserved and frozen to /v11_7 imports.
  • renderIcon leading icon that auto-sizes to the Tag size; href/onClick render a focusable link/button body (underlined text for links).
  • dismissible now renders a separate close button controlled by the new onDismiss callback — only the close button dismisses.
  • Focus ring moved from the whole tag to the individual focusable elements (link/button body and close button).
  • New src/exports/c.ts and package.json ./v11_8 + ./latest point to v3.

Test Plan

  • Tab through a link + dismissible Tag: the label/icon group and the close button receive focus rings independently; clicking only the X dismisses.
  • Visual: leading icon sizing across small/medium/large; link underline; focus-ring radius/height.
  • Note: umbrella @instructure/ui v11_8 wiring and the small-components regression page update are deferred to the release bump (umbrella /latest still resolves Tag to v2 until then).

Fixes INSTUI-5130

🤖 Generated with Claude Code

@git-nandor git-nandor self-assigned this Aug 12, 2026
@git-nandor git-nandor changed the title feat(ui-tag): add Tag v3 with leading icon, link, and per-element focus feat(ui-tag): new Tag v3 implementation Aug 12, 2026
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://instructure.design/pr-preview/pr-2687/

Built to branch gh-pages at 2026-08-25 07:29 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Visual regression report

Cypress suite:Failing — see the run logs.

Visual diff: ⚠️ Changes detected.

Status Count
Unchanged 88
Changed 8
New 0
Removed 0

Accessibility (axe): ⚠️ 15 violations on 7 screenshots.

Impact Issue Rule Elements Screenshots
serious Text contrast is too low color-contrast 15 7

📊 View full report — click a screenshot's ⚠ badge to see each violation boxed on the image, with the offending element named and contrast failures shown as color swatches.

Diff images (8)

select-canvas.png — 2979 pixels differ

select-dark.png — 8804 pixels differ

select-light.png — 7949 pixels differ

small-components-canvas.png — 311024 pixels differ

small-components-dark.png — 342361 pixels differ

small-components-light.png — 330282 pixels differ

tooltip-dark.png — 66 pixels differ

tooltip-light.png — 65 pixels differ

Baselines come from the visual-baselines branch. They refresh on every merge to master. The Cypress suite line covers the a11y and console-error assertions — a ❌ there means the suite found real issues even if the visual diff is clean.

github-actions Bot pushed a commit that referenced this pull request Aug 12, 2026
@git-nandor
git-nandor requested a review from adamlobler August 13, 2026 06:19
github-actions Bot pushed a commit that referenced this pull request Aug 13, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 13, 2026
@danegivens

Copy link
Copy Markdown
Collaborator

This looks PERFECT! the only thing that was missed is the color of the tag on the rebrand light theme...in that theme the tag should be the opacity navy that is used for our secondary buttons!

@adamlobler

Copy link
Copy Markdown
Collaborator

This looks PERFECT! the only thing that was missed is the color of the tag on the rebrand light theme...in that theme the tag should be the opacity navy that is used for our secondary buttons!

It’s because this branch is still using v1.5.0 of the tokens. We should update it to the latest version.

@HerrTopi
HerrTopi requested a review from danegivens August 14, 2026 19:10
github-actions Bot pushed a commit that referenced this pull request Aug 18, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 18, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 18, 2026
@git-nandor
git-nandor requested a review from balzss August 24, 2026 08:41
git-nandor and others added 6 commits August 25, 2026 09:12
Introduce a v3 of Tag (library v11_8) implementing the new design. v2 is
preserved unchanged and frozen to v11_7 imports; the new ./v11_8 export and
./latest point to v3.

- renderIcon leading icon that auto-sizes to the Tag size
- link/button body via href/onClick, with the label and icon as one
  focusable group (underlined text for links)
- dismissible renders a separate close button controlled by the new
  onDismiss callback; only the close button dismisses the tag
- focus ring moved from the whole tag to the individual focusable elements
  (link/button body and close button)

BREAKING CHANGE: Tag latest now resolves to v3. Dismissible tags are
dismissed via the new onDismiss prop instead of onClick, and the focus ring
appears on the close button / link body rather than the whole tag. Consumers
pinned to @instructure/ui-tag/v11_7 are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the @instructure/ui v11_8 barrel (Tag from ui-tag/v11_8, everything else
still at v11_7) and register v11_8 in the docs versioned-components map so the
docs render the new Tag v3 (with renderIcon/href/onDismiss). Point the umbrella
./latest at v11_8.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Use a single Tag with an icon in the README example instead of one per size.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A plain clickable Tag (onClick, no href, not dismissible) now renders the root
as the <button> and shows the focus outline around the entire tag. Link and
dismissible Tags keep the per-element outline on the link body / close button.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…g v3

Follow the Alert v2 renderCloseButtonLabel pattern: providing
renderDismissButtonLabel renders the close button and supplies its screen
reader label (applied as the button's aria-label). This fixes the axe
button-name violation the separate close button had, since it now has a
discernible, prop-driven (i18n-friendly) name. The dismissible boolean is
removed.

Also refresh the small-components regression page with Tag v3 variants
(leading icon in three sizes, clickable button, dismissible, link, disabled).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…g icon gap

Bump the instructure-design-tokens dependency from v1.5.0 to v1.8.0, which adds
the tag.leadElementLabel token. Tag v3 now uses leadElementLabel for the gap
between the leading icon and the label, and iconMargin for the close button
spacing and the tag's start padding (keeping the start edge in sync with the
trailing close button).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@git-nandor
git-nandor force-pushed the INSTUI-5130_new_tag_design_implementation branch from 4937158 to 2d98c33 Compare August 25, 2026 07:24
github-actions Bot pushed a commit that referenced this pull request Aug 25, 2026
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.

3 participants