Skip to content

fix(dify-ui): align read-only controls with Base UI - #45375

Merged
lyzno1 merged 3 commits into
mainfrom
fix/dify-ui-read-only-contract
Nov 3, 2026
Merged

lyzno1 merged 3 commits into
mainfrom
fix/dify-ui-read-only-contract

Conversation

@lyzno1

@lyzno1 lyzno1 commented Nov 3, 2026

Copy link
Copy Markdown
Member
  • Document the read-only contract in docs/styling.md: read-only locks the value, not the control.
  • Select keeps its indicator when read-only; Combobox and Autocomplete keep the popup trigger and hide only Clear and chip removal.
  • Read-only triggers, Checkbox, Radio and Switch drop hover feedback and use the default cursor; disabled still takes precedence.
  • Date, time and date-time pickers open while read-only for browsing: day and time choices don't change the value, Now/Apply are hidden, the grid and time columns expose aria-readonly, and the trigger is no longer aria-disabled.
  • Update the two web picker tests that asserted the old behavior.

Supersedes #41842.

Read-only locks the value, not the control: triggers keep their
indicators and drop hover feedback, popups open for browsing, and parts
that only commit or clear a value are hidden. Date and time pickers now
open while read-only, expose aria-readonly on their grid and time
columns, and no longer mark the trigger aria-disabled.
@github-actions github-actions Bot added web This relates to changes on the web. size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 3, 2026
@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.79%. Comparing base (e9ba0f5) to head (fc4f32f).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #45375       +/-   ##
===========================================
+ Coverage   73.31%   89.79%   +16.48%     
===========================================
  Files        6239     6239               
  Lines      390948   390965       +17     
  Branches    79291    79305       +14     
===========================================
+ Hits       286613   351077    +64464     
+ Misses      98236    33789    -64447     
  Partials     6099     6099               
Flag Coverage Δ
dify-ui 92.45% <100.00%> (+0.06%) ⬆️
web 89.80% <ø> (+41.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lyzno1
lyzno1 requested a review from zxhlyh as a code owner November 3, 2026 03:14
@lyzno1
lyzno1 added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit add8fce Nov 3, 2026
54 checks passed
@lyzno1
lyzno1 deleted the fix/dify-ui-read-only-contract branch November 3, 2026 03:28
@laipz8200 laipz8200 mentioned this pull request Nov 3, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants