-
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
Show error if field is not found during filter rendering #59298
Conversation
Pinging @elastic/kibana-app-arch (Team:AppArch) |
@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.
LGTM, added a couple of minor comments
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.
I'm not super happy with this solution. The filter will still be there in the saved object (or wherever it's coming from) but it won't be rendered anymore in the UI, so the user can't really remove it (e.g. if the broken filter is part of a visualization). In the end you have a broken visualization which isn't showing any data (because the filter is still in the request) and will produce tons of warnings every time you interact with it - so you still have to start from scratch building it. Of course there are ways to recover it (editing the saved object, deleting all filters with the cogwheel popover menu, editing the url), but the average user won't be able to achieve this.
I'm just realizing this is probably my bad because of a badly worded issue:
Expected behavior:
The filter pill should either get filtered out or be rendered in an error state.
With filtered out I meant getting filtered out completely (ie not showing up in the saved object as well as the search request anymore).
@flash1293 thanks for the review. |
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.
Thanks for the ping @lizozom, My initial thoughts are that the dark red background can get confused with the old "excluded" version of the filter pills. So my suggestion is that we need a new class for inValid
state on the FilterView
in which it looks disabled (so not being included in filters) but with some extra styles like this:
I can pass you up a PR later today.
@elasticmachine merge upstream |
@cchaos I agree that your design is much clearer! |
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.
Styles look good to me ;)
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 works as expected, LGTM.
Left two suggestions for error messages, but nothing important.
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Show error if field is not found * Errored filter state * Design adjustments * Fixing class names and making look similar to disabled * code review fixes Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: cchaos <[email protected]>
…9610) * Show error if field is not found * Errored filter state * Design adjustments * Fixing class names and making look similar to disabled * code review fixes Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: cchaos <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: cchaos <[email protected]>
* master: (154 commits) Add an optional authentication mode for HTTP resources (elastic#58589) Implement embeddable drilldown menu options (elastic#59232) [Alerting] "Create alert" graph visualization design improvements (elastic#59399) Alerting update route throttle property is missing (elastic#59580) [SIEM] Adds 'Load prebuilt rules' Cypress test (elastic#59529) Show error if field is not found during filter rendering (elastic#59298) Navigate back to discover app during test, because the saved search from the preceding test has major performance problems when used with this test (elastic#59571) Check for alert dialog when doing a force logout (elastic#59329) ensure fs deletes are not cwd dependent (elastic#59570) Empty message for APM service map (elastic#59518) [Drilldowns] <ActionWizard/> Component (elastic#59032) [Reporting] Improve the page exit error messages (elastic#59351) Ensure logged out starting state for tests that need it (elastic#59322) Hide input value from kbn-config-schema error messages (elastic#58843) [ML] Transforms: Migrate client plugin to NP. (elastic#59443) [ML] Disable failing functional tests [SIEM] Update Timeline to use the latest euiFlyoutBody style (elastic#59524) Temporarily remove the project mappings for PR labels (elastic#59493) [Alerting] replace index threshold graph usage of watcher APIs with new API (elastic#59385) [ML] Show view series link in anomalies table for machine_learning_user role (elastic#59549) ...
* Show error if field is not found * Errored filter state * Design adjustments * Fixing class names and making look similar to disabled * code review fixes Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: cchaos <[email protected]> # Conflicts: # src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_label.tsx # src/plugins/data/public/ui/filter_bar/filter_item.tsx
Summary
Fixes #57428 by adding a filter errored state
Checklist
Delete any items that are not applicable to this PR.
For maintainers