stoplightio / json-schema-viewer

A JSON Schema viewer React component
Apache License 2.0
175 stars 37 forks source link

feat: special treatment for top level rows #135

Closed marcelltoth closed 3 years ago

marcelltoth commented 3 years ago

Implements stoplightio/elements#1030

marbemac commented 3 years ago

Didn't have time to check root level use cases beyond the one in demo w array - @philsturgeon over to you to try to verify as many root situations as possible (that they are handled well and are easy to understand as end user).

@marcelltoth two small UI things:

  1. root prop name should be same size as other props (it's 11px versus 12px - in general i'm not sure if setting things to text size small so high up in tree, and then overriding to base is best since most of it should be base size, but up to you).
  2. font weight for prop names should be semibold, not bold
Screen Shot 2021-04-15 at 11 26 49 AM
mpodlasin commented 3 years ago

Didn't have time to check root level use cases beyond the one in demo w array - @philsturgeon over to you to try to verify as many root situations as possible (that they are handled well and are easy to understand as end user).

@marcelltoth two small UI things:

1. root prop name should be same size as other props (it's 11px versus 12px - in general i'm not sure if setting things to text size small so high up in tree, and then overriding to base is best since most of it should be base size, but up to you).

2. font weight for prop names should be semibold, not bold
Screen Shot 2021-04-15 at 11 26 49 AM
  1. I changed font sizes
  2. Changed bold to semibold, but in this font the change is not visible, next available weight is medium, but it looks too thin.
marbemac commented 3 years ago

Changed bold to semibold, but in this font the change is not visible, next available weight is medium, but it looks too thin.

That's OK - please leave as semibold, we'll be using Inter in our applications and it is a free font so will document it as the recommended font to pair Elements with.

stoplight-bot commented 3 years ago

:tada: This PR is included in version 4.0.0-beta.14 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

stoplight-bot commented 3 years ago

:tada: This PR is included in version 4.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: