FormidableLabs / envy

Node.js Telemetry & Network Viewer
https://envy-webui.vercel.app
MIT License
107 stars 0 forks source link

Use monaco-editor for code display #173

Closed carbonrobot closed 10 months ago

carbonrobot commented 10 months ago

Use monaco-editor for code display instead of @microlink/react-json-view.

We want to remove the current editor to resolve the dependency issues with npm. See #171 for more information. Monaco Editor is the tool that powers the VS Code Editor. Having a lightweight editor allows us the opportunity to allow editing and replaying in the UX in a future update and provides built in language support/syntax highlighting for multiple response types.

Before

image

After

image

Also fixes an issue where large auth tokens that are large expand vertically

Before

image

After

image

changeset-bot[bot] commented 10 months ago

🦋 Changeset detected

Latest commit: c3b16d6b28a371ddf737fc13a643e0d280fc13f2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages | Name | Type | | -------------- | ----- | | @envyjs/webui | Minor | | @envyjs/apollo | Minor | | @envyjs/core | Minor | | @envyjs/nextjs | Minor | | @envyjs/node | Minor | | @envyjs/web | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

carbonrobot commented 10 months ago

@kgpax good call, will see what we can do here

carbonrobot commented 10 months ago

@kgpax Updated. I was unable to find a solution to "Automatically truncate large values". The only options are word wrap, but thats not really the same thing. Play around with the current build and let me know what you think.

kgpax commented 10 months ago

@kgpax Updated. I was unable to find a solution to "Automatically truncate large values". The only options are word wrap, but thats not really the same thing. Play around with the current build and let me know what you think.

I think the truncation in the previous component was there because the default behaviour was to wrap the text (i.e., a long value would wrap over multiple lines)... therefore the truncation made it better because each line was a different property.

Given that this editor has word-wrap disabled, we kind of get that same overall experience, so on reflection I'd say that the truncation isn't really necessary any more.

carbonrobot commented 10 months ago

Preview Package Publishing

🦋  success packages published successfully:
🦋  @envyjs/apollo@0.9.0-next.0
🦋  @envyjs/core@0.9.0-next.0
🦋  @envyjs/nextjs@0.9.0-next.0
🦋  @envyjs/node@0.9.0-next.0
🦋  @envyjs/web@0.9.0-next.0
🦋  @envyjs/webui@0.9.0-next.0