-
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
[Lens] Export lens save modal #100381
[Lens] Export lens save modal #100381
Conversation
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.
It looks like this PR exposes two parts:
- attributes service via contract
- static modal export which expects to get the attributes services passed via react context
This seems like more complexity than necessary, can't we just expose the modal via contract with a reference to the attributes service baked in? This way the user doesn't have to take care of two different flavors of lens export which have to be mixed together afterwards.
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
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.
When saving a lens vis to the library only, the id is put into the URL, then disappearing again. Reloading the page will bring you to an empty editor.
- Go to Lens
- Configure chart
- Save to library (no dashboard)
- Reload page
- Should re-render with saved vis
@flash1293 good catch, fixed an unnecessary redirect call back call. |
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.
Not sure whether this broke with the recent change, but the example is not actually navigating to dashboard:
- Click Save visualization
- Select new dashboard
- Click save
- Toast appears and it stays on example app instead of navigating to dashboard
@elasticmachine merge upstream |
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.
Tested and everything worked fine, great work!
Left one comment - I think there are two ways how we can resolve it:
- Omit the spinner for these async loadings
- Render the spinner in an
EuiOverlayMask
so it will change from a fullscreen spinner to a fullscreen modal
}, []); | ||
|
||
if (!lensServices) { | ||
return <EuiLoadingSpinner />; |
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.
Not sure about the loading spinner components here and in line 20 - as the real component is an EuiModal
it will be rendered absolutely positioned while the loading spinner will be inline which is probably not what the user expects: (note the spinner appearing below the chart - depending on the layout it could lead to jumping content)
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.
Tested and LGTM, thanks for adding this
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
async chunk count
History
To update your PR or re-run it, just comment with: cc @shahzad31 |
Co-authored-by: Kibana Machine <[email protected]>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Shahzad <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Summary
fix #94585
Export lens save modal functionality so that it can be used outside lens
SaveModalComponent
is exported from Lens that can be used outside lens to trigger save modal.