Skip to content

fix(regression-test): Fix types, syntax issues and re-enable contras tests - #2700

Open
matyasf wants to merge 3 commits into
masterfrom
fix_regression_test
Open

fix(regression-test): Fix types, syntax issues and re-enable contras tests#2700
matyasf wants to merge 3 commits into
masterfrom
fix_regression_test

Conversation

@matyasf

@matyasf matyasf commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Import components directly from @instructure/ui/latest across the regression-test pages instead of aliasing them and casting to any.
  • Fix all the surfaced TypeScript and syntax issues.
  • Fix tests failing because of contrast issues (unless its a bug, then its fixed in a future PR).

Test Plan

Check the regression test visual diffs that they are valid:

  • Spot-check the avatar page — the theme override token renames change the rendered colors, so verify those three avatars still look intentional.
  • Spot-check the form-errors and select pages in the browser; the added screen reader labels and handler changes touch a11y behavior.

🤖 Generated with Claude Code

matyasf and others added 2 commits August 27, 2026 13:20
…and react types

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Import components directly from @instructure/ui/latest instead of aliasing them and casting to
any. Fix the type errors this surfaced: narrow Select highlight/select handler ids, use const
assertions for View background and shadow lists, type the FormMessage array, pass tabIndex as a
number, and add the missing Avatar name and DateTimeInput screen reader labels. Also update the
Avatar theme overrides to the current color token names.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@matyasf matyasf self-assigned this Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 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-2700/

Built to branch gh-pages at 2026-08-27 14:23 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Visual regression report

Cypress suite: ✅ Passing

Visual diff: ⚠️ Changes detected.

Status Count
Unchanged 62
Changed 34
New 0
Removed 0

Accessibility (axe): ✅ No violations.

📊 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 (34)

avatar-canvas.png — 3217 pixels differ

avatar-dark.png — 4447 pixels differ

avatar-light.png — 3245 pixels differ

billboard-canvas.png — 5095 pixels differ

billboard-dark.png — 5447 pixels differ

billboard-light.png — 5094 pixels differ

colorpicker-canvas.png — 2831 pixels differ

colorpicker-dark.png — 3750 pixels differ

colorpicker-light.png — 2831 pixels differ

drilldown-canvas.png — 130 pixels differ

drilldown-dark.png — 200 pixels differ

drilldown-light.png — 194 pixels differ

filedrop-canvas.png — 4176 pixels differ

filedrop-dark.png — 4176 pixels differ

filedrop-light.png — 4176 pixels differ

form-errors-canvas.png — 101 pixels differ

form-errors-dark.png — 146 pixels differ

form-errors-light.png — 119 pixels differ

img-canvas.png — 218557 pixels differ

img-dark.png — 216905 pixels differ

img-light.png — 218555 pixels differ

link-canvas.png — 225 pixels differ

link-dark.png — 4626 pixels differ

link-light.png — 4611 pixels differ

menu-canvas.png — 6281 pixels differ

menu-dark.png — 6462 pixels differ

menu-light.png — 6463 pixels differ

small-components-canvas.png — 218119 pixels differ

small-components-dark.png — 218318 pixels differ

small-components-light.png — 216290 pixels differ

tooltip-dark.png — 3600 pixels differ

view-canvas.png — 87914 pixels differ

view-dark.png — 96035 pixels differ

view-light.png — 88696 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 27, 2026
…st rules

Reworks the pages that needed axe opt-outs so they pass instead:

- inherit the theme's base text color on `html`/`body`, so pages no longer rely
  on the browser default black
- wrap the `*-inverse` and `*-on` Text samples in matching inverse/alert Views
- give the `color: inherit` sample and the plain Tooltip input explicit
  foreground and background colors
- label the View background swatches outside the swatch instead of inside

Drops the now-unneeded `a11y: false` and `contrastSkipThemes` entries for the
small-components, breadcrumb, form-errors, tooltip, treebrowser, and view
pages. The remaining Button and Link skips are dark-theme token bugs, so their
reasons now point at the exact tokens to fix.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@matyasf matyasf changed the title fix(regression-test): remove as-any casts and bump dev dependencies fix(regression-test): Fix types and contrast issues Aug 27, 2026
github-actions Bot pushed a commit that referenced this pull request Aug 27, 2026
'for an inverse variant) but its label resolves to white instead of the ' +
'dark text its own wrapper uses — 1.1:1. Fix the dark theme inverse ' +
'button text token.'
'Theme token, not fixable here: the `withBackground={false}` ' +

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

verified with design, that this is a real bug

contrastSkipReason:
'Inverse Link renders white on the light #f2f4f5 surface (1.1:1); same ' +
'dark-theme inverse token bug as the Button page.'
'Theme token, not fixable here: `color="link-inverse"` draws from link ' +

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

verified with design, that this is a real bug

<div>
<Avatar
size="xx-small"
name="AI Assistant"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is a required prop, with proper typing it would fail without this prop added

<Avatar
name="Heather Wheeler"
color="accent1"
themeOverride={{ accent1TextColor: '222222' }}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

was renamed here 06f373b

@matyasf matyasf changed the title fix(regression-test): Fix types and contrast issues fix(regression-test): Fix types, syntax issues and re-enable contras tests Aug 27, 2026
@matyasf
matyasf requested a review from balzss August 27, 2026 20:17
size="medium"
heading="Well, this is awkward."
message="Think there should be something here?"
hero={(size: string) => <IconGradebookLine size={size} />}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I dont know why this triggered a VRT change...

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