Skip to content

fix: preserve Material foreground pairs in Ionic colors - #67

Merged
rdlabo merged 4 commits into
mainfrom
fix/material-on-colors
Nov 9, 2026
Merged

rdlabo merged 4 commits into
mainfrom
fix/material-on-colors

Conversation

@rdlabo

@rdlabo rdlabo commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

When a device supplies Material You foreground roles, explicitly colored Ionic components currently replace them with calculated black/white contrast colors. Map onPrimary, onSecondary, onTertiary and onError to the corresponding primary/secondary/tertiary/danger contrast and contrast-RGB variables.

Missing roles independently retain Ionic's existing contrast calculation, including when optional roles disappear after refresh. Backgrounds, neutral palettes, shade/tint calculations, success and warning are unchanged. Update the guide, bridge-color assertions, and add unit and rendered button/card coverage. The rendered test uses components registered by the demo page.

Validation:

  • Build and lint passed; 34 unit tests and 7 related browser tests passed locally. The final button/card tests additionally passed 6 executions with retries disabled.
  • Inspected light/dark browser screenshots with captured Android 17 colors.
  • Physical Pixel 8a, Android 17: read the actual native palette and verified background/foreground equality for four explicitly colored Ionic buttons in both modes (8 pairs); inspected both screenshots. Used a temporary diagnostic panel and restored System mode afterward.
  • The physical demo used merged plugin source at c412a48200dbcc77fe6134a6bb7ace7cc360ed6f; installed published 2.1.1 did not expose the native getter. A separate app ID preserved the existing demo. Local Android build overrides are excluded.

Screenshot baselines are regenerated through CI via /update-screenshots; local golden images were not overwritten. Physical verification covers the color pairs, not a full device UI review.

During final CI validation, an existing searchbar test counted inputs before Ionic rendered them. It now waits for an input per searchbar; 10 local repetitions passed with retries disabled. CI now fails on flaky tests rather than accepting retry-only passes. This changes test synchronization only; production searchbar CSS is unchanged.

CI regenerated the baseline images, which were visually compared. The meaningful changes are foreground colors on device-colored components; the default segment/toggle baselines also contain seven pixels of rendering variation in total.

rdlabo commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/update-screenshots

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

❌ Failed to update screenshots.

Please check the workflow run for details.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Playwright test results

passed  265 passed

Details

stats  265 tests across 18 suites
duration  3 minutes, 4 seconds
commit  6767506
info  This detailed result covers Ionic 9 only. Ionic 8 runs against the same screenshots in a separate matrix job; check the workflow run for both results. To update the screenshots, comment with /update-screenshots.

rdlabo commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/update-screenshots

github-actions Bot added a commit that referenced this pull request Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

📊 Ionic 9 Playwright Test Report

View the detailed Ionic 9 report: https://webview-native-ui.github.io/ionic-theme-md3/pr-67/

Ionic 8 runs against the same screenshots in a separate matrix job. View both results in the workflow run.

github-actions Bot added a commit that referenced this pull request Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

✅ Screenshots have been updated successfully!

The new screenshots have been committed to this PR.

github-actions Bot added a commit that referenced this pull request Nov 9, 2026
github-actions Bot added a commit that referenced this pull request Nov 9, 2026
@rdlabo
rdlabo merged commit 478e6b1 into main Nov 9, 2026
11 checks passed
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.

1 participant