Skip to content

fix(ui-select,ui-text-input): show messages for non-editable selects - #2707

Open
git-nandor wants to merge 1 commit into
masterfrom
INSTUI-5172_fix_non-editable_selects_hidden_messages
Open

fix(ui-select,ui-text-input): show messages for non-editable selects#2707
git-nandor wants to merge 1 commit into
masterfrom
INSTUI-5172_fix_non-editable_selects_hidden_messages

Conversation

@git-nandor

@git-nandor git-nandor commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Problem

A Select sets its TextInput to readonly to hide the keyboard cursor,
but the form field layer hides messages for readonly fields. Non-editable
Selects and SimpleSelects therefore rendered the error border without the message text.

Fix

  • TextInput v2 gets an optional forceMessages prop that keeps messages visible in the readonly state; Select v2 sets it where it forces readonly itself.

Test Plan

  • Docs app: a SimpleSelect with error message and no onInputChange should show the message text under the input.
<div>
  <TextInput
    renderLabel="TextInput readonly with forceMessages"
    interaction="readonly"
    defaultValue="Alaska"
    messages={[{ type: 'error', text: 'TextInput error message' }]}
    forceMessages
  />
  <SimpleSelect
    renderLabel="SimpleSelect with an error message"
    messages={[{ type: 'error', text: 'SimpleSelect error message' }]}
  >
    <SimpleSelect.Option id="opt-1" value="1">value 1</SimpleSelect.Option>
    <SimpleSelect.Option id="opt-2" value="2">value 2</SimpleSelect.Option>
  </SimpleSelect>

  <Select
    renderLabel="Select with an error message"
    inputValue="Alaska"
    messages={[{ type: 'error', text: 'Select error message' }]}
  >
    <Select.Option id="opt-1">Alaska</Select.Option>
    <Select.Option id="opt-2">Arizona</Select.Option>
  </Select>
</div>
  • Visual regression: the select page has a new MessagesExample (Select + SimpleSelect with an error message)

Fixes INSTUI-5172

🤖 Generated with Claude Code

TextInput gets a `forceMessages` prop that keeps the messages visible in the readonly state, and
Select sets it where it forces readonly itself.

Closes: INSTUI-5172

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

Co-Authored-By: Claude <noreply@anthropic.com>
@git-nandor git-nandor self-assigned this Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 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-2707/

Built to branch gh-pages at 2026-09-03 14:57 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

github-actions Bot pushed a commit that referenced this pull request Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Visual regression report

Cypress suite: ✅ Passing

Visual diff: ⚠️ Changes detected.

Status Count
Unchanged 93
Changed 3
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 (3)

select-canvas.png — 164272 pixels differ

select-dark.png — 164080 pixels differ

select-light.png — 164019 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.

@git-nandor
git-nandor requested a review from balzss September 3, 2026 15:04
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