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

[Unified search] Redesign search bar #126566

Merged
merged 97 commits into from
Apr 12, 2022

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented Mar 1, 2022

Summary

This PR will be merged into a feature branch

Implements the rest of the changes of the phase 1 of the unified search project.
unified_search_phase1

Specifically:

  • It moves the add filter button to the top row
  • It merges the 3 menus:
    • Language switcher
    • Saved queries management
    • Filter options

image

The goal of this PR is to improve the design and UX of the current search experience and prepare the ground for the text-based languages.

Significant changes have been made to the menu for better handling of the saved queries.
image

  • Load saved query button is enabled only when there are saved queries
  • Save changes also are enabled when a change is made in a loaded saved query
  • Apply to all is enabled only when filters are enabled
  • Clear all is enabled when filters/query/saved query are enabled

Note

We are going to investigate and address in a new PR, the following things:

  • how the different parts of the unified search component work on the embed mode
  • when a user selects to load only the filterBar on the embed mode, do we need the add filter button?

Storybook

image

node scripts/storybook.js unified_search

Checklist

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula stratoula added the Feature:Unified search Unified search related tasks label Mar 9, 2022
@clintandrewhall
Copy link
Contributor

I would highly recommend adopting a package-first approach. We're still working through the best practices in Shared UX, but creating a plugin-by-default will probably soon be an anti-pattern.

Probably not worth doing now, since you have this reviewed and ready-to-go... I just wanted to mention it for future components. Once our team has a good handle on package-first development, we'll share our results...!

@stratoula
Copy link
Contributor Author

This sounds great Clint. Yes for the first phase the plan is to go with the new plug-in but a package solution is def something we can discuss for the future.

@@ -725,7 +725,7 @@ export default class QueryStringInputUI extends PureComponent<Props, State> {
placeholder={
this.props.placeholder ||
i18n.translate('unifiedSearch.query.queryBar.searchInputPlaceholder', {
defaultMessage: 'Search',
defaultMessage: 'Start typing to search or filter...',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it important to say both search and filter here? Will the user understand the difference?

Also, type might not be the right term here, since the user can also select terms and copy and paste.

Also for the menu, is it clear to the user what "Apply all" and "Clear all" apply to?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cchaos @ghudgins what do you think about it? I think that the user testing is going to also help on these.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to find text that provokes understanding that this is specifically for filtering down the data that exists on the page. That it is separate from the global search which is used for navigation. Simply Search is just not enough. Even more than this, I think we need to indicate the current filtering language that is selected in this placeholder text. We used to have the language switcher visible at all times, but since we've moved it to a less visible location, we should indicate that the search input requires certain formatting.

Copy link
Contributor

@gchaps gchaps Apr 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the description, @cchaos. Here is a suggestion for the placeholder text:

Filter your data using xxx syntax

where xxx is KQL, Lucene, etc.

Copy link
Contributor

@cchaos cchaos Apr 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that for specific language syntaxes, but there's also an option for the search bar to be plain text. I don't think we would want

Filter your data using text syntax

Maybe for plain text it's just..?

Filter your data

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works.

Would the Filter your data text ever be close to the Add filter button, as in Discover?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where the Add filter button now lives:
Screen Shot 2022-04-06 at 18 04 21 PM

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DataDiscovery.team owned code LGTM 👍 Tested Discover, Graph in Chrome, Safari, Firefox, works as expected. Feeling excitement for the unification of our search 🥳 .

@@ -297,7 +297,7 @@ describe('QueryBar ', () => {
});

describe('SavedQueryManagementComponent state', () => {
test('popover should hidden when "Save current query" button was clicked', async () => {
test('popover should remain open when "Save current query" button was clicked', async () => {
Copy link
Contributor

@YulNaumenko YulNaumenko Apr 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing that. I like the new behavior.

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.

Fantastic work! I'm happy with these current changes for the feature branch PR.

In a follow up I'll also address:

  • Even better responsiveness
  • Another Tour for pointing out the Add Filter placement
  • Add an Add filter option to the full filter menu
  • Tooltips on icon-only buttons
  • Final audit of all current locations

Then I think together we can also follow up on:

  • Read only state for embedded views (dashboard)
  • Permissions

Copy link
Contributor

@YulNaumenko YulNaumenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security Solution changes LGTM! Tested: the new component covers all previous functionality, but with the much better UX!

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.

This works really well, thanks!

Nit: IMHO The popover should close on selecting a new query language, otherwise it's hiding the fact that the query gets cleared:
Kapture 2022-04-12 at 10 28 59

Just an unrelated idea, but I love the vertical screen space we are gaining by this - should we do something similar to the "Filter by type" popover and move it into an icon button next to the field name search? What do you think @cchaos ? This would give us another additional field shown above the fold.
Screenshot 2022-04-12 at 10 39 25

@stratoula
Copy link
Contributor Author

I like both ideas :) About the language switcher I can create a follow up PR if @cchaos agrees!

@elastic elastic deleted a comment from kibana-ci Apr 12, 2022
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Test Failures

  • [job] [logs] Default CI Group #10 / Actions and Triggers app Rule Details Header should reenable a disabled the rule

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
unifiedSearch 147 148 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
unifiedSearch 49 48 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dashboard 295.4KB 295.4KB +3.0B
discover 403.6KB 403.8KB +189.0B
graph 476.8KB 477.2KB +452.0B
lens 1.1MB 1.1MB +195.0B
securitySolution 4.8MB 4.8MB -222.0B
unifiedSearch 139.0KB 143.8KB +4.8KB
visualizations 164.5KB 164.6KB +31.0B
total +5.4KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
navigation 9.4KB 9.4KB -3.0B
unifiedSearch 47.1KB 39.2KB -7.9KB
visTypeMarkdown 7.0KB 7.0KB +34.0B
visTypeTimelion 10.0KB 10.0KB +18.0B
visualizations 45.8KB 45.8KB +18.0B
total -7.9KB
Unknown metric groups

API count

id before after diff
unifiedSearch 52 51 -1

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

@stratoula stratoula merged commit 7ad845a into elastic:unified-search-1 Apr 12, 2022
@cchaos
Copy link
Contributor

cchaos commented Apr 12, 2022

@flash1293 Of course I love the idea of doing that (making the filter by type button smaller), but I remember having to have moved this to an explicit button way back when because no one was finding it as a simple button icon: #46615

I think because when icons are attached to inputs they tend to look like submit buttons or just icons labeling the input, not as separate actions. But... we also didn't have the base style icon buttons like we do now. However, I'd worry that it competes with the filter button from KQL. You could consider using the custom toolbar button style and use the kqlField icon type.

image

cc @MichaelMarcialis to help provide some guidance there

stratoula added a commit that referenced this pull request May 6, 2022
* [Unified search] Moves dataview picker to the search bar (#126560)

* [Unified search] Moves dataview picker to the search bar

* alter texts

* Remove unused file

* [ChangeDataView] Design cleanup

* Fix services mock failure

* Show newly created datavuew on the list

* Keep dataview picker in discover in mobile view

* Cleanup

* Cleanup translations

* Fix some discover FTs

* Fix management FTs

* More test fixes

* Added a dismissible tour

* Pulled the selectabl list into a new component

… for reuse

Called `DataViewsList`. I then changed Lens’ config panel’s own EuiSelectableList to use this new component instead.

*Didn’t do any test updates*

* Fix broken jest test

* Use the same picker component on Discover mobile view

* Apply some CI fixes

* Fix more functional tests

* More FTs fixes

* Close the tour popover for lens tests

* More FTs fixes

* Fix lens FTs

* Using new `styles.ts` pattern for custom styles and allowing for `fullWidth` buttons

* Better tour text and i18n

* Update copy

* No exclamation point

* Cleanup

* Fixes on discover tests

* Fixes on Lens Fts - create runtime fields

* Fixes on edit permission of add field in discover and some FTs fixes

* Further Fts fixes

* More FTs fixes

* Made tour opt-in with `showNewMenuTour`

* Refactor the OSS FTs to change less files

* Further cleanup on the FTs

* Remove unecessary action

* Fix dataview creation bug

* Add a unit test to the new component

* More fixes

* Fix OSS a11y tests

* Adds another unit test for Lens permissions

* Make a change to stabilize the tests

* Clear flyout prop as it is not used anymore

* Deisgn fixes for mobile view

* Address PR comments WIP

* Update the layrpanl dataview list when a new dataview is created

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* fix test

* Fix CI

* Fix i18n checks

* [Unified search] Redesign search bar (#126566)

* [Unified search] Redesign search bar

* Changes to the saved queries design

* Remove `globalQueryBar` from nested under `.kbnTopNavMenu__wrapper`

* [Security Solution] Removing overrides of `.globaQueryBar`

* Cleanup of `.globalQueryBar` styles and variants

* General layout fixes/adjustments

* More general layout fixes and better defaults

* Enable Clear all button if saved query is applied

* Clear should be enabled if searched query is applied but not the save as new

* fix some bugs on enabling and disabling the menu options

* [design] Working on Load Filter set menu

* Indicate selection even before the user clicks apply

* prettify the time text

* Add delete saved qquery confirmation modal

* Some cleaning up

* Fix the manage saved queries link

* Enable load filter set if saved query is created for the first time

* Some fixes on linting and on translations

* Clanup scss

* Make some fixes

* Fix navigatation unit test

* Fix translations check

* Fix rest jest tests

* Fix some functional tests

* Fix checks

* Fixes the appearance of the searchbar components depending on the flags

* Fix OSS tests

* Fixes on tests and query bar logic

* Fix the OSS ally tests

* Fix graph and lens KQL bar display problems, apply saveQuery flag correctly

* Fix more tests

* Fix security solution test

* Undo tweaks for graph

* Better fix for Graph

- Emulate new look, not old
- Uses same context menu panel as the new one
- Provides the same button type (filter button)

* Fix checks and jest test

* Further fixes

* Fix language switcher test

* Hopefully fixes the rest of the solution tests

* Cleanup

* Fixes on maps filtering

* Fix Discover padding

* [Discover] Added New Field button to bottom of fields list

* Simple responsive behavior

* Quick filter updates

* CI fixes

* area-label fix

* 18n translate the add filed btn in discover

* Fix lens functional test

* fix functional tests

* Refactor and add unit test for the add filter button

* Add unit test to the saved management list component

* Stabilize lens test

* Second try to solve the flakiness

* Fix panels depending on the flags

* Fix jest tests

* Fix double menu when only the queryInput is on

* Add storybook for the different layouts of the unified search bar

* Fix ci checks

* Removee hooks comment

* Fix flakiness

* Fix problem with lens dataview change

* Fix checks

* Ensure that the query is submitted

* Fixes oon CI

* Fixes flakiness

* Fix checks CI

* Update texts

* Cleanup

* Fix unskipped funtional test

* Fix FT

* Update src/plugins/unified_search/public/saved_query_form/save_query_form.tsx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Fix eslint

* Fix checks

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Fix jest

* Fix jest tests

* Stabilize discover security tests

* [Unified search] Further enhancements (#129877)

* [Unified search] Redesign search bar

* Changes to the saved queries design

* Remove `globalQueryBar` from nested under `.kbnTopNavMenu__wrapper`

* [Security Solution] Removing overrides of `.globaQueryBar`

* Cleanup of `.globalQueryBar` styles and variants

* General layout fixes/adjustments

* More general layout fixes and better defaults

* Enable Clear all button if saved query is applied

* Clear should be enabled if searched query is applied but not the save as new

* fix some bugs on enabling and disabling the menu options

* [design] Working on Load Filter set menu

* Indicate selection even before the user clicks apply

* prettify the time text

* Add delete saved qquery confirmation modal

* Some cleaning up

* Fix the manage saved queries link

* Enable load filter set if saved query is created for the first time

* Some fixes on linting and on translations

* Clanup scss

* Make some fixes

* Fix navigatation unit test

* Fix translations check

* Fix rest jest tests

* Fix some functional tests

* Fix checks

* Fixes the appearance of the searchbar components depending on the flags

* Fix OSS tests

* Fixes on tests and query bar logic

* Fix the OSS ally tests

* Fix graph and lens KQL bar display problems, apply saveQuery flag correctly

* Fix more tests

* Fix security solution test

* Undo tweaks for graph

* Better fix for Graph

- Emulate new look, not old
- Uses same context menu panel as the new one
- Provides the same button type (filter button)

* Fix checks and jest test

* Further fixes

* Fix language switcher test

* Hopefully fixes the rest of the solution tests

* Cleanup

* Fixes on maps filtering

* Fix Discover padding

* [Discover] Added New Field button to bottom of fields list

* Simple responsive behavior

* Quick filter updates

* CI fixes

* area-label fix

* 18n translate the add filed btn in discover

* Fix lens functional test

* fix functional tests

* Refactor and add unit test for the add filter button

* Add unit test to the saved management list component

* Stabilize lens test

* Second try to solve the flakiness

* Fix panels depending on the flags

* Fix jest tests

* Fix double menu when only the queryInput is on

* Add storybook for the different layouts of the unified search bar

* Fix ci checks

* Removee hooks comment

* Fix flakiness

* Fix problem with lens dataview change

* Fix checks

* Ensure that the query is submitted

* Fixes oon CI

* Fixes flakiness

* Fix checks CI

* Update texts

* Cleanup

* Fix unskipped funtional test

* Fix FT

* Fixes filter bar responsiveness

* Add filter button option to the main menu

* Filter form design pass

- Added tooltip around “Add filter” icon button
- Fixed padding
- Stubbed in “Add” vs “Edit” labels

* Query menu icon button tooltip

* ‘Update’ not ‘Edit’ button label

* Apply different strings for adding filter mode vs edit

* Hide Manage SO link if the user donesnt have the permissions

* Fix the wrapping of the badges and datepicker badge

* Minor props naming fix

* Fix checks

* Fix mobile

* Cleanup

* Fix checks

* Faux button group

* Changes on the search input placeholder

* Fix CI

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Fix translations

* Fix security solution add filter bug

* Filter bar / items: Reduce to only necessary wrappers and styles

- Switch to Emotion for styling
- Rename `FilterBadgesWrapper` to `FilterItems`
- Move `FilterItems` and `FilterItem` so own folder `filter_item/`

# Conflicts:
#	src/plugins/unified_search/public/filter_bar/filter_bar.tsx
#	src/plugins/unified_search/public/filter_bar/filter_editor/lib/filter_label.tsx
#	src/plugins/unified_search/public/filter_bar/filter_item/filter_item.tsx
#	src/plugins/unified_search/public/filter_bar/filter_item/filter_items.tsx
#	src/plugins/unified_search/public/filter_bar/filter_view/index.tsx
#	src/plugins/unified_search/public/query_string_input/filter_editor_wrapper.tsx
#	src/plugins/unified_search/public/search_bar/search_bar.tsx

* Fix styles by removing styled-components

Also added prop `afterQueryBar` to signify that it needs the top margin

# Conflicts:
#	packages/kbn-babel-preset/styled_components_files.js

* Refactor `SearchBar` and `QueryBarTopRow` a bit

- Added `showSubmitButton` to explicitely hide the submit button (defaults to true)
- SearchBar always renders the `QueryBarTopRow` which now fully controls visibility of the pieces
- Renamed class with new `uni` prefix
- Tried and failed to use Emotion

* Update usages

# Conflicts:
#	x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx

* Fix a test

* Fix jest test

* Attaches filter menu when no add button and better dropdown styles

* Fix lint errors

* Clearing the query and filters of a saved query should unload the saved query

* Do not allow to update the loaded saved query if no filters or no query

* Fix Graph by creating reusable `KibanaFilterButtonGroup`

* Use EuiTheme for SearchBar styles

Updated `displayStyle` for Lens & Discover

* Fix displayStyle prop problem

* Correct alignment of data visualizer

* Super nit comment

* Data visualizer improvements

* Apply useMemo in editPermission cont in Discover

* Fix translations checks

* Fix translations checks

* Fix filter badge popover bug

* [Submit button] Changed to EuiSuperUpdateButton

- Quickly adds tooltip content and filled state for more prominence when dirty
- Fixed 18n

* Fix tests

* Align the position with the other tolltips and check that functional tests succeed

* Give some time to the tooltip to disappear

* Fix tests

* Fix CI checks

* Address PR comments

* Move constants outside render

* Apply PR comments

* Fix dataview picker glich

* lovercase emotion function

* Fix a11y problem on dataview picker

* Lowercase rest of emotion style functions

* Clean up

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
kertal pushed a commit to kertal/kibana that referenced this pull request May 24, 2022
…ic#128401)

* [Unified search] Moves dataview picker to the search bar (elastic#126560)

* [Unified search] Moves dataview picker to the search bar

* alter texts

* Remove unused file

* [ChangeDataView] Design cleanup

* Fix services mock failure

* Show newly created datavuew on the list

* Keep dataview picker in discover in mobile view

* Cleanup

* Cleanup translations

* Fix some discover FTs

* Fix management FTs

* More test fixes

* Added a dismissible tour

* Pulled the selectabl list into a new component

… for reuse

Called `DataViewsList`. I then changed Lens’ config panel’s own EuiSelectableList to use this new component instead.

*Didn’t do any test updates*

* Fix broken jest test

* Use the same picker component on Discover mobile view

* Apply some CI fixes

* Fix more functional tests

* More FTs fixes

* Close the tour popover for lens tests

* More FTs fixes

* Fix lens FTs

* Using new `styles.ts` pattern for custom styles and allowing for `fullWidth` buttons

* Better tour text and i18n

* Update copy

* No exclamation point

* Cleanup

* Fixes on discover tests

* Fixes on Lens Fts - create runtime fields

* Fixes on edit permission of add field in discover and some FTs fixes

* Further Fts fixes

* More FTs fixes

* Made tour opt-in with `showNewMenuTour`

* Refactor the OSS FTs to change less files

* Further cleanup on the FTs

* Remove unecessary action

* Fix dataview creation bug

* Add a unit test to the new component

* More fixes

* Fix OSS a11y tests

* Adds another unit test for Lens permissions

* Make a change to stabilize the tests

* Clear flyout prop as it is not used anymore

* Deisgn fixes for mobile view

* Address PR comments WIP

* Update the layrpanl dataview list when a new dataview is created

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* fix test

* Fix CI

* Fix i18n checks

* [Unified search] Redesign search bar (elastic#126566)

* [Unified search] Redesign search bar

* Changes to the saved queries design

* Remove `globalQueryBar` from nested under `.kbnTopNavMenu__wrapper`

* [Security Solution] Removing overrides of `.globaQueryBar`

* Cleanup of `.globalQueryBar` styles and variants

* General layout fixes/adjustments

* More general layout fixes and better defaults

* Enable Clear all button if saved query is applied

* Clear should be enabled if searched query is applied but not the save as new

* fix some bugs on enabling and disabling the menu options

* [design] Working on Load Filter set menu

* Indicate selection even before the user clicks apply

* prettify the time text

* Add delete saved qquery confirmation modal

* Some cleaning up

* Fix the manage saved queries link

* Enable load filter set if saved query is created for the first time

* Some fixes on linting and on translations

* Clanup scss

* Make some fixes

* Fix navigatation unit test

* Fix translations check

* Fix rest jest tests

* Fix some functional tests

* Fix checks

* Fixes the appearance of the searchbar components depending on the flags

* Fix OSS tests

* Fixes on tests and query bar logic

* Fix the OSS ally tests

* Fix graph and lens KQL bar display problems, apply saveQuery flag correctly

* Fix more tests

* Fix security solution test

* Undo tweaks for graph

* Better fix for Graph

- Emulate new look, not old
- Uses same context menu panel as the new one
- Provides the same button type (filter button)

* Fix checks and jest test

* Further fixes

* Fix language switcher test

* Hopefully fixes the rest of the solution tests

* Cleanup

* Fixes on maps filtering

* Fix Discover padding

* [Discover] Added New Field button to bottom of fields list

* Simple responsive behavior

* Quick filter updates

* CI fixes

* area-label fix

* 18n translate the add filed btn in discover

* Fix lens functional test

* fix functional tests

* Refactor and add unit test for the add filter button

* Add unit test to the saved management list component

* Stabilize lens test

* Second try to solve the flakiness

* Fix panels depending on the flags

* Fix jest tests

* Fix double menu when only the queryInput is on

* Add storybook for the different layouts of the unified search bar

* Fix ci checks

* Removee hooks comment

* Fix flakiness

* Fix problem with lens dataview change

* Fix checks

* Ensure that the query is submitted

* Fixes oon CI

* Fixes flakiness

* Fix checks CI

* Update texts

* Cleanup

* Fix unskipped funtional test

* Fix FT

* Update src/plugins/unified_search/public/saved_query_form/save_query_form.tsx

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Fix eslint

* Fix checks

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* Fix jest

* Fix jest tests

* Stabilize discover security tests

* [Unified search] Further enhancements (elastic#129877)

* [Unified search] Redesign search bar

* Changes to the saved queries design

* Remove `globalQueryBar` from nested under `.kbnTopNavMenu__wrapper`

* [Security Solution] Removing overrides of `.globaQueryBar`

* Cleanup of `.globalQueryBar` styles and variants

* General layout fixes/adjustments

* More general layout fixes and better defaults

* Enable Clear all button if saved query is applied

* Clear should be enabled if searched query is applied but not the save as new

* fix some bugs on enabling and disabling the menu options

* [design] Working on Load Filter set menu

* Indicate selection even before the user clicks apply

* prettify the time text

* Add delete saved qquery confirmation modal

* Some cleaning up

* Fix the manage saved queries link

* Enable load filter set if saved query is created for the first time

* Some fixes on linting and on translations

* Clanup scss

* Make some fixes

* Fix navigatation unit test

* Fix translations check

* Fix rest jest tests

* Fix some functional tests

* Fix checks

* Fixes the appearance of the searchbar components depending on the flags

* Fix OSS tests

* Fixes on tests and query bar logic

* Fix the OSS ally tests

* Fix graph and lens KQL bar display problems, apply saveQuery flag correctly

* Fix more tests

* Fix security solution test

* Undo tweaks for graph

* Better fix for Graph

- Emulate new look, not old
- Uses same context menu panel as the new one
- Provides the same button type (filter button)

* Fix checks and jest test

* Further fixes

* Fix language switcher test

* Hopefully fixes the rest of the solution tests

* Cleanup

* Fixes on maps filtering

* Fix Discover padding

* [Discover] Added New Field button to bottom of fields list

* Simple responsive behavior

* Quick filter updates

* CI fixes

* area-label fix

* 18n translate the add filed btn in discover

* Fix lens functional test

* fix functional tests

* Refactor and add unit test for the add filter button

* Add unit test to the saved management list component

* Stabilize lens test

* Second try to solve the flakiness

* Fix panels depending on the flags

* Fix jest tests

* Fix double menu when only the queryInput is on

* Add storybook for the different layouts of the unified search bar

* Fix ci checks

* Removee hooks comment

* Fix flakiness

* Fix problem with lens dataview change

* Fix checks

* Ensure that the query is submitted

* Fixes oon CI

* Fixes flakiness

* Fix checks CI

* Update texts

* Cleanup

* Fix unskipped funtional test

* Fix FT

* Fixes filter bar responsiveness

* Add filter button option to the main menu

* Filter form design pass

- Added tooltip around “Add filter” icon button
- Fixed padding
- Stubbed in “Add” vs “Edit” labels

* Query menu icon button tooltip

* ‘Update’ not ‘Edit’ button label

* Apply different strings for adding filter mode vs edit

* Hide Manage SO link if the user donesnt have the permissions

* Fix the wrapping of the badges and datepicker badge

* Minor props naming fix

* Fix checks

* Fix mobile

* Cleanup

* Fix checks

* Faux button group

* Changes on the search input placeholder

* Fix CI

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Fix translations

* Fix security solution add filter bug

* Filter bar / items: Reduce to only necessary wrappers and styles

- Switch to Emotion for styling
- Rename `FilterBadgesWrapper` to `FilterItems`
- Move `FilterItems` and `FilterItem` so own folder `filter_item/`

# Conflicts:
#	src/plugins/unified_search/public/filter_bar/filter_bar.tsx
#	src/plugins/unified_search/public/filter_bar/filter_editor/lib/filter_label.tsx
#	src/plugins/unified_search/public/filter_bar/filter_item/filter_item.tsx
#	src/plugins/unified_search/public/filter_bar/filter_item/filter_items.tsx
#	src/plugins/unified_search/public/filter_bar/filter_view/index.tsx
#	src/plugins/unified_search/public/query_string_input/filter_editor_wrapper.tsx
#	src/plugins/unified_search/public/search_bar/search_bar.tsx

* Fix styles by removing styled-components

Also added prop `afterQueryBar` to signify that it needs the top margin

# Conflicts:
#	packages/kbn-babel-preset/styled_components_files.js

* Refactor `SearchBar` and `QueryBarTopRow` a bit

- Added `showSubmitButton` to explicitely hide the submit button (defaults to true)
- SearchBar always renders the `QueryBarTopRow` which now fully controls visibility of the pieces
- Renamed class with new `uni` prefix
- Tried and failed to use Emotion

* Update usages

# Conflicts:
#	x-pack/plugins/security_solution/public/common/components/query_bar/index.tsx

* Fix a test

* Fix jest test

* Attaches filter menu when no add button and better dropdown styles

* Fix lint errors

* Clearing the query and filters of a saved query should unload the saved query

* Do not allow to update the loaded saved query if no filters or no query

* Fix Graph by creating reusable `KibanaFilterButtonGroup`

* Use EuiTheme for SearchBar styles

Updated `displayStyle` for Lens & Discover

* Fix displayStyle prop problem

* Correct alignment of data visualizer

* Super nit comment

* Data visualizer improvements

* Apply useMemo in editPermission cont in Discover

* Fix translations checks

* Fix translations checks

* Fix filter badge popover bug

* [Submit button] Changed to EuiSuperUpdateButton

- Quickly adds tooltip content and filled state for more prominence when dirty
- Fixed 18n

* Fix tests

* Align the position with the other tolltips and check that functional tests succeed

* Give some time to the tooltip to disappear

* Fix tests

* Fix CI checks

* Address PR comments

* Move constants outside render

* Apply PR comments

* Fix dataview picker glich

* lovercase emotion function

* Fix a11y problem on dataview picker

* Lowercase rest of emotion style functions

* Clean up

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Unified search Unified search related tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants