-
Notifications
You must be signed in to change notification settings - Fork 416
Add explicit examples for numbers and text controls #935
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
Add explicit examples for numbers and text controls #935
Conversation
edgarmueller
left a comment
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.
Looks good, some remarks.
packages/examples/src/text.ts
Outdated
| { | ||
| type: 'Control', | ||
| scope: '#/properties/address', | ||
| label: 'Address', |
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.
Explicitly point that this is using trim and restrict options
| @@ -0,0 +1,73 @@ | |||
| import { registerExamples } from './register'; | |||
|
|
|||
| export const schema = { | |||
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.
Maybe we can pick a different example, since an address is not typically entered in a single text field. Also reduce the maxLength to a size of 10 which is beneficial when playing around with the examples.
packages/examples/src/numbers.ts
Outdated
| properties: { | ||
| price: { | ||
| type: 'number', | ||
| maximum: 300, |
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.
Lower to 100
| }; | ||
|
|
||
| export const uischema = { | ||
| type: 'VerticalLayout', |
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.
Add controls for integer and number as well
|
updated |
|
Thank you |
Added new example files to separate examples for numbers and texts.
Fix #865