-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[feature][Canvas] Share Workpads in other Websites #46278
Conversation
Pinging @elastic/kibana-canvas |
💔 Build Failed |
6f11a80
to
8a4902b
Compare
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.
Some comments for @elastic/kibana-operations
handler(request, handler) { | ||
const workpad = request.payload; | ||
|
||
const archive = archiver('zip'); |
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.
operations: using archiver to create a zip file.
x-pack/tasks/build.js
Outdated
execa.sync(process.execPath, ['legacy/plugins/canvas/scripts/external_runtime'], { | ||
cwd: resolve(__dirname, '..'), | ||
stdio: ['ignore', 'inherit', 'inherit'], | ||
buffer: false, |
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.
operations: added the external runtime build step to the task list.
💔 Build Failed |
8a4902b
to
8981d59
Compare
💔 Build Failed |
8981d59
to
a5e2181
Compare
💚 Build Succeeded |
a5e2181
to
a240a25
Compare
💚 Build Succeeded |
💚 Build Succeeded |
* Add localization + tweak naming * Fix duplicate key * Update storyshots
💚 Build Succeeded |
* [perf] Fix perf issue with unsupported renderers * Fixing snapshots
💔 Build Failed |
💚 Build Succeeded |
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.
Looked through the code and played around with it a bit. It looks great to me. Very nice work on this.
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.
@ryankeairns It's in the PR under |
@clintandrewhall my point was that the command/script fails if you don't have webpack installed. I am proposing adding a note to check that you have webpack installed first. Unfortunately, the error was not clear in this regard, it was a lucky guess to try installing webpack :) |
@ryankeairns Webpack shouldn't need to be installed... it should be using the version bundled with |
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.
Fix for button text looks good and we've sorted out my issues with running the script.
💚 Build Succeeded |
💚 Build Succeeded |
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.
LGTM
* Branding Changes * Update snapshots
💚 Build Succeeded |
* [Canvas] Embedding Workpads in other Websites (elastic#42545) * Testing for Workpad Snapshots * Rename Snapshots to Shareables; update documentation. (elastic#46513) * [canvas][shareables] Add Localization + Tweaks (elastic#46632) * Add localization + tweak naming * Fix duplicate key * Update storyshots * [shareables] Unsupported Renderer Warning (elastic#46862) * [shareables] Unsupported Renderer Warning * Update snapshots; add test * Addressing Feedback * [canvas][shareables] Simplify and complete testing (elastic#47328) * Simplify * Updates * Finishing up * A few tweaks * Fix eslint errors; how would those happen?? * Fix CI build of runtime; assorted visual tweaks * Update x-pack/legacy/plugins/canvas/shareable_runtime/test/index.ts Co-Authored-By: Spencer <[email protected]> * Addressing feedback * Remove null-loader from root package * re-add null-loader until mitigation is found * [perf] Fix unsupported renderers performance issue (elastic#47769) * [perf] Fix perf issue with unsupported renderers * Fixing snapshots * Addressing review feedback (elastic#47775) * Addressing feedback * Addressing feedback (elastic#47883) * Branding Changes (elastic#47913) * Branding Changes * Update snapshots
Reconstitutes #42545 for 7.5. Tracks the feature branch (feature/canvas-snapshots), and changes will be merged to the feature branch by separate PR for a cleaner commit history.
Summary
This is a pull request for embedding workpads externally, without an
iframe
. It consists of a custom runtime that can render the transient, data-complete state of a given workpad.Coverage
Test coverage currently stands at
92%
. Most "uncovered" lines and statements require either an upgrade toreact
andreact-dom
to16.9
, or arewebpack
-related build files. See "Gathering Coverage" below to see the report.Details about how to build and run this are in
README.md
.Prerequisite
Before testing or running this PR locally, you must run
node scripts/shareable_runtime
from/canvas
afteryarn kbn bootstrap
and before starting Kibana. It is only built automatically when Kibana is built for production.Testing
Cloud Deployment
I've deployed this to a Cloud instance for testing by Elastic employees. If you'd like access, reach out to @clintandrewhall.
You can test this functionality in a number of ways. The easiest would be:
Download a ZIP from Canvas
python -m SimpleHTTPServer 9001
Test the Runtime Directly from Webpack
canvas/shareable_runtime/test
.canvas/shareable_runtime/index.html
to include your workpad./canvas
, runnode scripts/shareable_runtime --dev --run
Run the Storybook
From
/canvas
:node scripts/storybook
Run the Jest Tests and Gather Coverage
From
/canvas
:node scripts/jest --path shareable_runtime --coverage
.Checklist
For maintainers