Repository navigation
fix(Tooltip): Text content reads on the tooltip surface, through theme text roles for the inverted surface #12410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
cixzhang
wants to merge
34
commits into
main
Choose a base branch
from
fix-tooltip-content-contrast
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+762
−46
Open
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
de9bf69
fix(Tooltip): content keeps contrast on the inverted surface
cixzhang 28ddf08
fix(Tooltip): keep the media-side helper inside useTooltip
cixzhang 63e5d50
fix(Tooltip): measure the content's media side inside the open layer;…
cixzhang 80b6792
fix(Tooltip): content reads the media tokens and keeps the surface te…
cixzhang 805e5f9
fix(Tooltip): string and number content renders without the media wra…
cixzhang f9d7d99
docs(Tooltip): the media wrapper comment says it renders while closed
cixzhang c9fae25
Merge remote-tracking branch 'refs/remotes/l4/main-new' into lane4/pr…
cixzhang 22494e5
perf(Tooltip): the media context adds about 0.4 to 1.3 KB to a page, …
cixzhang fc6ef3b
Merge main into #12410
cixzhang d28b067
Merge main into fix-tooltip-content-contrast
cixzhang 2a718c7
fix(Tooltip): the content's side follows the theme's surface in the p…
cixzhang 2212a34
fix(Tooltip): keep the side code local to Tooltip and out of the firs…
cixzhang d849f49
docs(Tooltip): record the content contrast gap before the side module…
cixzhang 305ce5e
fix(Tooltip): content takes the surface's text color until its side i…
cixzhang 499e914
docs(Tooltip): the pre-measurement content color is unmuted
cixzhang 0ff348c
chore(changeset): name the CLI for the Gothic and Matcha theme templates
cixzhang 4abee12
perf(Tooltip): import the media side statically; no loader and no aft…
cixzhang 6e51074
probe: surface-only content colors, no measurement (size probe, not f…
cixzhang bb8f887
wip: tooltip text derivation
cixzhang 5fd30c0
card-depth A: tooltip text tokens derived per theme; tooltip content …
cixzhang 45000d8
card-depth A v2: grammar names (--color-text-*-inverted); mapping on …
cixzhang 1e53364
card-depth A v3: render tooltip children directly; deps as on main (d…
cixzhang 5739253
fix(Tooltip): token-colored content takes the theme's text roles for …
cixzhang 65efcd0
Merge main into fix-tooltip-content-contrast
cixzhang a901598
docs(theme-tokens): INV15 records the text roles on the inverted surf…
cixzhang be8899d
fix(Tooltip): token docs list the inverted text roles; the derivation…
cixzhang 17f3965
chore(changeset): name the CLI, whose token docs list the inverted roles
cixzhang 9792af4
chore(Tooltip): narrow the changeset to the roles it moves; drop the …
cixzhang e9540c4
chore(theme): the derivation header names no record
cixzhang ad35457
fix(themes): Butter, Gothic, Matcha, Stone and Y2K set the inverted t…
cixzhang 19f5653
fix(theme): share the readable-ink and ratio helpers; regenerate the …
cixzhang 8718581
style(theme): format statusColor.ts
cixzhang d587f48
docs(Tooltip): bound the inverted text roles to primary, secondary an…
cixzhang b8d3143
docs(theme-tokens): INV15 scopes to tooltip content and to themes who…
cixzhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| '@astryxdesign/cli': patch | ||
| '@astryxdesign/theme-butter': patch | ||
| '@astryxdesign/theme-gothic': patch | ||
| '@astryxdesign/theme-matcha': patch | ||
| '@astryxdesign/theme-stone': patch | ||
| '@astryxdesign/theme-y2k': patch | ||
| --- | ||
|
|
||
| [fix] Tooltip content that uses `Text`, or icons colored by the primary, secondary or accent tokens, as the Tooltip docs show, now reads on the tooltip's inverted surface instead of taking the surface's own color. Its primary, secondary and accent text and icon colors (status and hue colors keep the page's values) come from three new theme tokens, `--color-text-primary-inverted`, `--color-text-secondary-inverted` and `--color-text-accent-inverted`. A theme written in hex or `rgb()` colors that does not set them gets values computed from its own colors when the theme is generated: the surface's text color, and the theme's secondary text and accent at 4.5:1 on `--color-background-inverted`. Where a theme's accent is the tooltip surface's own color, accent text takes the secondary color. The Butter, Gothic, Matcha, Stone and Y2K themes, and their templates that `astryx` copies into a project, set the three roles to named stops of their own palettes. Plain text keeps the tooltip's own text color. Nothing is measured on the page. The token reference that `astryx docs tokens` prints lists the three roles. | ||
|
|
||
| @cixzhang | ||
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.