-
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] introduce unified user messages system #147818
[Lens] introduce unified user messages system #147818
Conversation
becaa38
to
3933fe8
Compare
d59b3f0
to
fbec723
Compare
fbec723
to
0de8d2c
Compare
875505b
to
8f3afc6
Compare
16f46bd
to
6a5e7bf
Compare
…ck-render-on-missing-field
…m:andrewctate/kibana into 143673/dont-block-render-on-missing-field
...ck/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
Outdated
Show resolved
Hide resolved
...ck/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
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.
Tested locally and it works.
Left some minor code refactoring nits. Approving to not block.
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.
Left one small comment, but LGTM otherwise.
x-pack/plugins/lens/public/app_plugin/get_application_user_messages.tsx
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.
Changes LGTM! Thanx Andrew, I really like the new system and will become even more handy in the future:)
…m:andrewctate/kibana into 143673/dont-block-render-on-missing-field
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Summary
Preparation for #147485, #143673
This PR revamps the code that surfaces feedback in Lens. Warnings, deprecation messages, and errors are merged into a unified concept of the
UserMessage
. Guiding principles:Architecture changes
Current State
Warnings and errors are distinct entities. Ad hoc methods and call stacks have been added each time messages needed to be displayed in new UI locations. Warnings surfaced from children in the component tree are pushed to the Redux store in order to display them at a higher hierarchical level. Dimension trigger state is controlled by visualization configuration.
New State
Most user messages originate from
visualization.getUserMessages
,datasource.getUserMessages
, andgetApplicationUserMessages
. When messages need to be generated outside those routines,addUserMessages
utility makes them available globally. Redux store is no longer in play. Dimension trigger state is now controlled by user messages just like every other display location. Messages are queried for display via the globalgetUserMessages
API.Example test cases
Display locations
Editor toolbar
clientip
Embeddable badge
Trigger shard failures by following these instructions
Dimension trigger
Visualization
@timestamp
Text-based languages query input
discover:enableSql
in Advanced SettingsBanner
lens:useFieldExistenceSampling
in Advanced SettingsChecklist
Delete any items that are not applicable to this PR.