Repository navigation
chore: Add variant and icon usage to Token telemetry - #5067
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Add focused tests covering the reported telemetry values.
Review effort: Lite
Findings: 1
What changed in this PR
Adds Token telemetry for variant, state, and icon usage without changing rendering.
Changes:
- Defaults
varianttonormal. - Reports variant, read-only, disabled, and icon presence.
| File | Description |
|---|---|
src/token/index.tsx |
Adds Token telemetry configuration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+20
to
+21
| props: { variant, readOnly: props.readOnly, disabled: props.disabled }, | ||
| metadata: { hasIcon: Boolean(props.icon) }, |
NathanZlion
marked this pull request as ready for review
September 28, 2026 15:22
NathanZlion
had a problem deploying
to
allure-report
September 28, 2026 15:51 — with
GitHub Actions
Failure
srungta08
previously approved these changes
Oct 20, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5067 +/- ##
=======================================
Coverage 97.72% 97.72%
=======================================
Files 996 996
Lines 32152 32152
Branches 11859 11860 +1
=======================================
Hits 31422 31422
Misses 723 723
Partials 7 7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
NathanZlion
force-pushed
the
chore/token-telemetry-variant
branch
from
October 20, 2026 12:57
d1ccefd to
0229c91
Compare
srungta08
approved these changes
Oct 20, 2026
This branch was successfully deployed
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.

Description
Token reports no props to component telemetry, so we can't tell how many consumers use
variant="inline"or pass an icon. We need that to decide whether inline tokens should render icons atx-smallacross all themes (today only OneTheme overrides it).This passes
variant,readOnlyanddisabledas telemetry props, andhasIconas metadata, following the sameuseBaseComponentpattern as TokenGroup and Button.variantnow defaults to'normal'in the public wrapper so unset variants report asnormalrather thanundefined. Rendering is unchanged, since the internal component already defaulted to'normal'.Related links, issue #, if available: n/a
How has this been tested?
gulp quick-buildpasses locally.jest -c jest.unit.config.js src/token).Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.