-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
[Visualize] Allows editing broken visualizations caused by runtime fields changes #94798
Conversation
A note to the current way this is designed: I don't think we should link the user to the saved object page. There are several reasons this is a bad idea: (a) it needs different permissions than saving (and opening) visualizations, (b) we're anyway considering making that page a read only page potentially, so you could not necessarily edit the saved obejct in the future there. If we load a visualization in a state where a field doesn't exist or has a wrong type, we should completely stay in the editor and just have the editor be in an invalid state, the same as you'd see if you selected an aggregation but not a field yet. Thus the user needs to change the field to bring the editor in the valid state again and then can save the visualization. |
Okay, got it. I removed link from error message and update editor so that it will be in invalid state in these cases. |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@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.
Some initial comments:
- When I delete the field and refresh my viz, I can see the toast twice. Moreove I would expect to be an error message when I open the split series accordion.
- The toasts do not disappear, as a result they "follow" me and if I open the visualization again I can see 4 toasts etc.
- For a broken visualization on a dashboard I see an error label and only when I hover it it visible what the problem is. I suggest to be minimal for users with no edit permissions and more explanatory for the users who can actually edit and fix it. @ThomThomson wdyt?
The above applies to fields that their type changes too.
src/plugins/vis_default_editor/public/components/controls/field.tsx
Outdated
Show resolved
Hide resolved
@stratoula I like the idea to have the tooltip less descriptive for users without edit permissions, but having a small error label like that doesn't match particularly well with the error reporting for lens. It would be ideal if it was possible to match this |
Thank you @ThomThomson, I agree. This is what I meant with more explanatory 😄 We should def match with Lens |
@elasticmachine merge upstream |
Pinging @elastic/kibana-app (Team:KibanaApp) |
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.
Just one comment of a change that we no need anymore. Other than that it seems fine to me.
@ppisljar do you want to also check it?
src/plugins/visualizations/public/embeddable/visualize_embeddable.ts
Outdated
Show resolved
Hide resolved
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.
Kibana App code LGTM. I tested it locally and it works fine. I can now edit my broken visualizations and I see a warning icon on the aggregation that causes the problem.
I would like to display the error as in Lens for consistency but I think it is fine for now
is the error still visible on dashboard ? i think it should be. my reasoning would be that:
|
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @VladLasitsa |
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.
appservices code LGTM
@elasticmachine run elasticsearch-ci/docs |
…elds changes (elastic#94798) * Add possibility to open visualization when saved field doesn't exists anymore * Fix tests * Fix some remarks * Remove unneeded code * Fix tests * Fix tests * Fix some remarks * Fixed problem with double error popover in visualizations * Fix CI * Fix type * Fix API docs * Don't show error popup for error related to runtime fields * Fix some remarks Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…elds changes (elastic#94798) * Add possibility to open visualization when saved field doesn't exists anymore * Fix tests * Fix some remarks * Remove unneeded code * Fix tests * Fix tests * Fix some remarks * Fixed problem with double error popover in visualizations * Fix CI * Fix type * Fix API docs * Don't show error popup for error related to runtime fields * Fix some remarks Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
…elds changes (#94798) (#96580) * Add possibility to open visualization when saved field doesn't exists anymore * Fix tests * Fix some remarks * Remove unneeded code * Fix tests * Fix tests * Fix some remarks * Fixed problem with double error popover in visualizations * Fix CI * Fix type * Fix API docs * Don't show error popup for error related to runtime fields * Fix some remarks Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Closes: #93921, #93924, #93928
Summary
Adds possibility to open visualization when a user deleted the field or changed its type so that user can fix it.
Now user can open visualization and see error. Also editor will be in invalid state. Moreover I added error message in validation by focus leaving from combobox if user doesn't select another field.
In case when we delete field
In case when we change type of field