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] Moves dataview picker to the search bar #126560

Merged

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented Mar 1, 2022

This is a feature branch PR, it will merge into elastic:unified-search-1 instead of main.

Note: We'll be tackling the full layout with this and the KQL bar in the next PR. This is just getting the the menu combined and putting it roughly in the area of the KQL bar.

Summary

Combines data view management actions into data view selection menu and moves data view picker for Lens and Discover to the search bar.

Screen Shot 2022-03-15 at 17 15 31 PM

Adds a dismissible tour (stored in localStorage) to indicate to users that the UI has changed.

Screen Shot 2022-03-15 at 17 15 26 PM

Notes

This PR is NOT going to be merged in main but on the unified-search-1 feature branch. There are some additional tasks that will follow:

  • Move ui folder to the data plugin --> create the unified_search plugin
  • Move logic that is duplicated atm in both Discover and Lens to the new plugin (this can't happen at this PR due to circular dependencies)

Checklist

Delete any items that are not applicable to this PR.

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

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

@elasticmachine merge upstream

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.

Pushed you a few design updates. I'll tackle the full layout with this and the KQL bar in the other PR.

Quick bug I found:

When creating a new data view on the fly, after saving and closing the flyout, it's currently selected and shown in the button, but the list isn't refreshed to show it:
Screen Shot 2022-03-10 at 17 30 11 PM

For Lens:

They have another instance of a data view selector in the configuration panel which is just the simple list without all the extra data view mangement stuff. But I feel like this is still a good opportunity to re-use the same data view list component. Especially since then we'll have consistent placeholder text and such.

Is it possible at this time to make the EuiSelectable portion of the new picker standalone too?
Screen Shot 2022-03-10 at 17 56 56 PM

@cchaos
Copy link
Contributor

cchaos commented Mar 11, 2022

@elasticmachine merge upstream

@cchaos
Copy link
Contributor

cchaos commented Mar 11, 2022

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

merge conflict between base and head

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor Author

stratoula commented Mar 14, 2022

@cchaos I fixed the bug and restored the datavew picker on the mobile view (Discover).
About the Lens second picker, I suggest to do it after moving the ui folder to its own plugin. I changed the placeholder to be in sync with the search bar one.

@cchaos

This comment was marked as outdated.

@stratoula
Copy link
Contributor Author

I actually implemented @kertal's suggestions for mobile view. It looks like that now
image

@kertal
Copy link
Member

kertal commented Mar 18, 2022

I actually implemented @kertal's suggestions for mobile view. It looks like that now
image

Thx @stratoula, for me, it looks more logical this way (Nit: bottom margin of data view could be similar to the time picker bottom margin)

Interesting, because it never drew my attention until now:

In the normal view, the order is

query bar | time filter

But in the mobile view

time filter |query bar

I guess this switch was because of filters would look ugly in a sandwich of query bar and time filter, and I'm pretty sure when unified search progresses this order won't be different in normal and mobile view

@stratoula
Copy link
Contributor Author

stratoula commented Mar 18, 2022

Exactly, I also noticed that now :) This is the reason I decided to proceed with your suggestion and not leave it for later :D
Now the order is respected. About the margin I dont have a strong opinion. I will wait for Caroline's feedback on the changes!

@cchaos
Copy link
Contributor

cchaos commented Mar 18, 2022

Thanks @kertal , we'll be taking care of the final layout in the next PR. I thought I had put in a sentence in the summary regarding that, but I guess not... sorry about the confusion.

@kertal
Copy link
Member

kertal commented Mar 18, 2022

Thanks @kertal , we'll be taking care of the final layout in the next PR. I thought I had put in a sentence in the summary regarding that, but I guess not... sorry about the confusion.

Oh, no worries, no confusion, just wanted to express my first impressions, knowing this is not the final stage, no blocker in sight from data discovery. great work!

@stratoula stratoula marked this pull request as ready for review March 18, 2022 17:23
@stratoula stratoula requested review from a team as code owners March 18, 2022 17:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@stratoula
Copy link
Contributor Author

@elasticmachine merge upstream

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 want to echo the thing @kertal mentioned - index patterns can get quite long and we should restrict the size somehow:
Screenshot 2022-03-21 at 11 22 29

On creating a new data view from within Lens (yay for adding that as a side effect), it doesn't tell the app to reload its internal data view list:
I created the super long one from within the flyout, but it's not showing in the layer dropdown:
Screenshot 2022-03-21 at 11 23 50

Might be unrelated but the "create data view" flyout is extremely laggy for me.

No blockers from my side as this is going to a feature branch but we should make sure to address before the final merge

@@ -20,6 +20,7 @@
"share",
"presentationUtil",
"dataViewFieldEditor",
"dataViewEditor",
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like this is only used for the permissions, is there any difference between userPermissions of dataViewEditor and dataViewFieldEditor? The implementation looks identical

Copy link
Contributor Author

@stratoula stratoula Mar 21, 2022

Choose a reason for hiding this comment

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

It is also used for opening the dataView editor which is not the same with the dataview field editor. From my understanding these are two different editors with different permissions.

Copy link
Contributor

Choose a reason for hiding this comment

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

A right, makes sense

@stratoula
Copy link
Contributor Author

Update from @flash1293 's comments:

  • I reverted the picker full width to the max-width option. Let's check the mobile view on the next PR [Unified search] Redesign search bar #126566
  • I fixed the bug with the layerpanel dataview list not being updated when a new dataview is created
  • Removed the double dataview.id check

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
data 533 537 +4
discover 430 427 -3
total +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
data 2833 2838 +5

Async chunks

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

id before after diff
data 116.6KB 117.3KB +674.0B
discover 380.5KB 377.1KB -3.4KB
lens 1.1MB 1.1MB +1.4KB
total -1.4KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
data 27 29 +2

Page load bundle

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

id before after diff
data 457.3KB 463.0KB +5.6KB
Unknown metric groups

API count

id before after diff
data 3446 3451 +5

ESLint disabled line counts

id before after diff
discover 34 32 -2

Total ESLint disabled count

id before after diff
discover 36 34 -2

History

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

@stratoula stratoula merged commit 0271e79 into elastic:unified-search-1 Mar 21, 2022
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>
@tylersmalley tylersmalley added ci:cloud-deploy Create or update a Cloud deployment and removed ci:deploy-cloud labels Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:cloud-deploy Create or update a Cloud deployment Feature:Unified search Unified search related tasks Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Team:Visualizations Visualization editors, elastic-charts and infrastructure ui-copy Review of UI copy with docs team is recommended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants