stoplightio / json-schema-viewer

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

fix: bump json-schema-tree to 1.1.2 #121

Closed mmiask closed 3 years ago

mmiask commented 3 years ago

A part of fixing: https://github.com/stoplightio/elements/issues/989 - Elements hang with the new JSV on board, if we open a complex model containing multiple $refs and allOfs

This bumps the json-schema-tree that recently bumped json-schema-merge-allof which is fixing that problem (we checked by manually modifying the lockfile to use the latest json-schema-merge-allof)

marcelltoth commented 3 years ago

@P0lip we are investigating whether the included snapshot change was intentional. Can you double check please?

P0lip commented 3 years ago

I checked it yesterday when I was releasing JST@1.1.2, and it's good. I did side-by-side comparison and didn't notice any UI change. The reason the snapshots are different is because the $ref handling has improved, and as a result we have more mirror nodes. Since JSV does not expand mirrored nodes by default, the snapshots have been updated, since we only dump the initial state of component, without any user interaction. From user perspective, nothing should change, perhaps with the exception that some node might be now collapsed, and they weren't before. This is not a new behavior, however, as $refs were always supposed to be collapsed by default.

In other words, underlying DOM structure has changed now, because some nodes are no longer existent until a user collapses a row. BTW If you're in doubt, you can just use a particular schema in storybook and compare it. I verified all of them, and didn't spot any difference, but I encourage you to do the same, just to double-check.

marcelltoth commented 3 years ago

Amazing, thank you!

stoplight-bot commented 3 years ago

:tada: This PR is included in version 4.0.0-beta.8 :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: