-
Notifications
You must be signed in to change notification settings - Fork 251
fix: docs ui #1033
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
fix: docs ui #1033
Conversation
|
Deploy preview for stoplight-elements ready! Built with commit 60cd548 |
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.
| }: ISchemaViewerProps) => { | ||
| const [selectedIndex, setSelectedIndex] = React.useState(0); | ||
|
|
||
| export const SchemaViewer = ({ className, title, description, schema, errors, viewMode }: ISchemaViewerProps) => { |
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 don't like this name.
What is the difference between JsonSchemaViewer and SchemaViewer? 😂
I would go for something like SchemaWithDescription? DescriptionAndSchema?
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 used SchemaViewer as there was ISchemaViewerProps interface.
SchemaWithDescription might be fine as it was SchemaWithExamples before.
|
Should there be a title? There's no title in schema, we could just show a name like in toc but there wasn't anything before and that wasn't the requirement so I didn't touch it. |
You are right. This is not a regression. I thought it was. No problem then! |
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.
Approving, but I am strongly encouraging to change that SchemaViewer name ;)


Fixes: stoplightio/json-schema-viewer#122
Needs: stoplightio/json-schema-viewer#132 for jsv divider light color.Batch of ui fixes (not so mega in the end).