Repository navigation
UI: add ControlWithError component #81574
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
Changes from all commits
b088fd3
ec779a2
3b5e248
8a594da
9f42f42
0958668
460fc58
f5e3bbe
133da46
84dd1f1
daaf80c
3156998
f857ebb
73763c4
f19010a
56edc77
e86579d
026550c
89a004b
0ea8659
beb7ba9
ec2833d
0b7a111
c22cef1
d596cc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1 @@ | ||
| export * from './components'; | ||
| export * from './control-with-error'; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mirka wouldn't this cause issues if a consumer uses a DataViews version that depends on the ControlWithError or ValidityIndicator components exposed via the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I got the impression that we shouldn't remove these private APIs but rather deprecate them and keep them for 2 major WordPress versions (related).
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, scratch that. I just double-checked plus checked history and they had never been exported via the private APIs. |
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ControlWithErrorhandles the messaging and also the styles of that message (red/green based on invalid/valid state). However, the consumer needs to also set other styles (e.g., border to red in invalid state) based on thedata-validity-visibledata attribute, etc.This is a necessary first step, but it is also too low-level and requires tight coordination with how this works. We need to have the validated controls in UI to make this seamless to consumers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll also look into some ways to make custom composition easier.