-
Notifications
You must be signed in to change notification settings - Fork 16
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 support for schema pattern attribute #32
Conversation
update from parent
src/json-schema-view.js
Outdated
@@ -142,6 +143,10 @@ export default class JSONSchemaView { | |||
<span class="range maxLength">maxLength:${this.schema.maxLength}</span> | |||
`} | |||
|
|||
${_if(!this.isCollapsed && this.schema.pattern)` | |||
<span class="range pattern">pattern:${this.schema.pattern}</span> |
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.
Do you want to add some css to this?
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.
Didn't have any specific CSS requirements in mind - i added the class just in case....
If my UX designer suddenly throws some requirements at me I'll put in another PR if thats OK?
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.
Yes, we want tot make sure this is not a value and is just a modifier like range and others.
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.
@mohsen1 OK, since you mentioned if... I've added some rudimentary support to at least make it legible if happen to be using the dark theme! |
Thanks for merging.... can you publish 2.0.1 to npmjs please? |
This very simple change also allows the display of schema pattern attributes
If this could be merged and an updated release pushed to npmjs that would be appreciated please!