-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support for custom systems #74
Conversation
🦋 Changeset detectedLatest commit: 4a1a936 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@@ -759,111 +759,221 @@ | |||
resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" | |||
integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ== | |||
|
|||
"@esbuild/[email protected]": |
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.
We should consider syncing the esm build dep versions, so we don't carry multipl
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.
This is just the result of yarn add -D esbuild
. How should this be done? Would we need to add a "resolutions"
section to the main package.json
to force a specific version where other dependencies have this as a subdependency?
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.
Looks like the "vite" dependency in "example-express-client" is where the other one is coming from: https://github.com/vitejs/vite/blob/v4.4.9/packages/vite/package.json#L70
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.
@carbonrobot is this something that we need to do? Not sure whether it's worth forcing the vite
dependency in one of our examples to use a specific esbuild
version. The main import we have is the 0.19.x
one which we specify, the 0.18.x
sits in the node_modules/vite/node_modules
directory, somewhat out of harms way.
f8a1119
to
56b15c3
Compare
2987c12
to
04a9942
Compare
…intent when self-hosting the envy UI
What does this PR do
base64
data rather than a file path. This is so that:new URL('filePath.svg', import.meta.url);
approach whichparcel
seemed to love but all other tooling and build steps despised.integration
bundle which allows other apps to create their own systems to be registered with the@envyjs/webui
viewer.@envyjs/webui
viewer app component to allow thew viewer to be hosted in another application for customisation.npx @envyjs/webui
command to support a--noUi
flag, which would prevent it from starting the default viewer application, and only start the collector web socket server.Hear me out...
I was hoping to find a way to be able to have custom systems be something that could be registered against the default viewer application running on
http://localhost:9998/
when you runnpx @envyjs/webui
.However, this has proven to be quite troublesome to implement. The main issues are:
That latter one proved to be the most challenging aspect. The only interface we have with
@envyjs/webui
is with the node processes which start the collector and the viewer web server. If we were able to register custom systems with the node process that starts the viewer web server, then this would still not be something that the actual running web application will see.I remain fairly confident that this is something that can be solved, but in the interest of delivering something of value and allowing for iteration, this PR takes a different initial tact.
How to customise the Envy web viewer
I've added some initial documentation to
docs/customizing.md
, but the summarise, in your client application which will send traces, you would:<EnvyViewer />
component exported from@envyjs/webui
.npx @envyjs/webui
command with the--noUi
flag<EnvyViewer />
component instead.Example
I've updated the
examples/apollo-client
application to demonstrate this:/src/viewer.html
andsrc/viewer.js
files to be used as entry points for a newparcel
-served application./src/systems/CatFacts.tsx
./src/systems/CocktailDb.tsx
<EnvyViewer />
usage in./src/viewer.js
This means that we now recognise requests to these two systems:
These systems also become something that you can filter by:
Show me!
yarn example:apollo
from the root of the repo.http://localhost:4002
in your browser for the custom hosted Envy viewerhttp://localhost:4001
in another browser tab for the application