[Discover] Add discover SplitButton component#231786
Conversation
f776b0a to
86611c1
Compare
| import { defaultConfig } from '@kbn/storybook'; | ||
| import { merge as webpackMerge } from 'webpack-merge'; | ||
| import { resolve } from 'path'; | ||
|
|
||
| const mockConfig = { | ||
| resolve: { | ||
| alias: { | ||
| '@kbn/esql/public': resolve(__dirname, '../public/mocks/esql_editor.tsx'), | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| module.exports = { | ||
| ...defaultConfig, | ||
| webpackFinal: (config) => webpackMerge(config, mockConfig), | ||
| }; |
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
...atform/plugins/shared/unified_search/public/query_string_input/split_button/split_button.tsx
Outdated
Show resolved
Hide resolved
...atform/plugins/shared/unified_search/public/query_string_input/split_button/split_button.tsx
Show resolved
Hide resolved
...atform/plugins/shared/unified_search/public/query_string_input/split_button/split_button.tsx
Outdated
Show resolved
Hide resolved
c4e60f5 to
571a487
Compare
akowalska622
left a comment
There was a problem hiding this comment.
LGTM, thanks for changes!
ThomThomson
left a comment
There was a problem hiding this comment.
Can we move the split button itself into a package? I know it will be useful in other places -the Dashboard top nav for instance.
I assume this is only meant to be temporary until EUI supports split-buttons? Still, it might be best to have our temporary code in one place.
31b8469 to
f692508
Compare
|
LGTM, great work @AlexGPlay! For smaller screens, I want to recommend using the combo Split button on smaller screens following current behaviour: Split button with new behaviour: As a side note, I noticed that we are going to "responsive mode" quite early, at the 1440px mark. Could we revise this limit and apply these styles at 768px like the appBar, for example? cc @ThomThomson responsiveness.mp4 |
kertal
left a comment
There was a problem hiding this comment.
Thx for the move to the package, FYI @andreadelrio
I think we need to adjust code ownership for this until EUI takes over , else nobody owns this
https://github.com/elastic/kibana/blob/main/.github/CODEOWNERS
kertal
left a comment
There was a problem hiding this comment.
LGTM, just had a quick look, @akowalska622 had a closer one, so data discovery is covered. just one question about the yarn.lock
1c66daa to
52a976b
Compare
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
History
cc @AlexGPlay |
## Summary Closes elastic#225702 Adds a split button that can be later used in the new background search implementation. | Example | Screenshot | |--|--| | Both icons | <img width="169" height="47" alt="image" src="https://github.com/user-attachments/assets/71c9af0d-f6e6-4030-9525-0ec49e4fb98d" /> | | Default | <img width="167" height="54" alt="image" src="https://github.com/user-attachments/assets/fdb31a84-c521-445f-ad20-f23fee6c3976" /> | | Danger | <img width="165" height="50" alt="image" src="https://github.com/user-attachments/assets/7370076f-b7b7-4a96-b915-d6122cecc02d" /> | | Success | <img width="161" height="48" alt="image" src="https://github.com/user-attachments/assets/0348edb4-f02f-4286-8319-b326ede24572" /> | | Warning | <img width="161" height="51" alt="image" src="https://github.com/user-attachments/assets/611a2ef3-5a62-46c4-b12d-050f3000a01a" /> | | Disabled | <img width="165" height="53" alt="image" src="https://github.com/user-attachments/assets/5412881a-7cd5-49c0-bab1-9533ec50049c" /> | There are more examples in the storybook. #### How to test? To test it you can go to the component storybook by running `yarn storybook unified_search` and going to http://localhost:9001/?path=/story/split-button--default ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary Closes elastic#225702 Adds a split button that can be later used in the new background search implementation. | Example | Screenshot | |--|--| | Both icons | <img width="169" height="47" alt="image" src="https://github.com/user-attachments/assets/71c9af0d-f6e6-4030-9525-0ec49e4fb98d" /> | | Default | <img width="167" height="54" alt="image" src="https://github.com/user-attachments/assets/fdb31a84-c521-445f-ad20-f23fee6c3976" /> | | Danger | <img width="165" height="50" alt="image" src="https://github.com/user-attachments/assets/7370076f-b7b7-4a96-b915-d6122cecc02d" /> | | Success | <img width="161" height="48" alt="image" src="https://github.com/user-attachments/assets/0348edb4-f02f-4286-8319-b326ede24572" /> | | Warning | <img width="161" height="51" alt="image" src="https://github.com/user-attachments/assets/611a2ef3-5a62-46c4-b12d-050f3000a01a" /> | | Disabled | <img width="165" height="53" alt="image" src="https://github.com/user-attachments/assets/5412881a-7cd5-49c0-bab1-9533ec50049c" /> | There are more examples in the storybook. #### How to test? To test it you can go to the component storybook by running `yarn storybook unified_search` and going to http://localhost:9001/?path=/story/split-button--default ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary Closes elastic#225702 Adds a split button that can be later used in the new background search implementation. | Example | Screenshot | |--|--| | Both icons | <img width="169" height="47" alt="image" src="https://github.com/user-attachments/assets/71c9af0d-f6e6-4030-9525-0ec49e4fb98d" /> | | Default | <img width="167" height="54" alt="image" src="https://github.com/user-attachments/assets/fdb31a84-c521-445f-ad20-f23fee6c3976" /> | | Danger | <img width="165" height="50" alt="image" src="https://github.com/user-attachments/assets/7370076f-b7b7-4a96-b915-d6122cecc02d" /> | | Success | <img width="161" height="48" alt="image" src="https://github.com/user-attachments/assets/0348edb4-f02f-4286-8319-b326ede24572" /> | | Warning | <img width="161" height="51" alt="image" src="https://github.com/user-attachments/assets/611a2ef3-5a62-46c4-b12d-050f3000a01a" /> | | Disabled | <img width="165" height="53" alt="image" src="https://github.com/user-attachments/assets/5412881a-7cd5-49c0-bab1-9533ec50049c" /> | There are more examples in the storybook. #### How to test? To test it you can go to the component storybook by running `yarn storybook unified_search` and going to http://localhost:9001/?path=/story/split-button--default ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>



Summary
Closes #225702
Adds a split button that can be later used in the new background search implementation.
There are more examples in the storybook.
How to test?
To test it you can go to the component storybook by running
yarn storybook unified_searchand going to http://localhost:9001/?path=/story/split-button--defaultChecklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:*label is applied per the guidelinesbackport:*labels.