Skip to content
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

Merged
merged 12 commits into from
Mar 6, 2020

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Mar 4, 2020

Summary

Fixes #57428 by adding a filter errored state

image

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@lizozom lizozom added bug Fixes for quality problems that affect the customer experience v8.0.0 Team:AppArch release_note:skip Skip the PR/issue when compiling release notes v7.7.0 labels Mar 4, 2020
@lizozom lizozom requested a review from flash1293 March 4, 2020 11:48
@lizozom lizozom requested a review from a team as a code owner March 4, 2020 11:48
@lizozom lizozom self-assigned this Mar 4, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@lizozom
Copy link
Contributor Author

lizozom commented Mar 4, 2020

@elasticmachine merge upstream

Copy link
Member

@lukasolson lukasolson left a 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

Copy link
Contributor

@flash1293 flash1293 left a 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).

@lizozom
Copy link
Contributor Author

lizozom commented Mar 5, 2020

@flash1293 thanks for the review.
I'll try rendering it in an errored state

@lizozom lizozom requested a review from cchaos March 5, 2020 11:07
Copy link
Contributor

@cchaos cchaos left a 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:

Screen Shot 2020-03-05 at 08 20 03 AM

I can pass you up a PR later today.

@lizozom
Copy link
Contributor Author

lizozom commented Mar 5, 2020

@elasticmachine merge upstream

@lizozom
Copy link
Contributor Author

lizozom commented Mar 5, 2020

@cchaos I agree that your design is much clearer!

@lizozom lizozom requested a review from a team as a code owner March 5, 2020 19:24
Copy link
Contributor

@cchaos cchaos left a 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 ;)

Copy link
Contributor

@flash1293 flash1293 left a 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.

src/plugins/data/public/ui/filter_bar/filter_item.tsx Outdated Show resolved Hide resolved
@lizozom lizozom added the v7.6.2 label Mar 6, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@lizozom lizozom merged commit 5db1b0a into elastic:master Mar 6, 2020
lizozom pushed a commit to lizozom/kibana that referenced this pull request Mar 7, 2020
* 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]>
lizozom pushed a commit that referenced this pull request Mar 7, 2020
…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]>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 9, 2020
* 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)
  ...
@lizozom lizozom removed the v7.6.2 label May 19, 2020
lizozom pushed a commit to lizozom/kibana that referenced this pull request May 19, 2020
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filter bar breaks if non-existing fields are referenced
6 participants