-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[ES|QL] Supports chain controls #242909
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
Open
stratoula
wants to merge
22
commits into
elastic:main
Choose a base branch
from
stratoula:esql-chaining-variables
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[ES|QL] Supports chain controls #242909
Changes from 17 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
737027e
[ES|QL] Supports chain controls
stratoula d864dcb
Fix test
stratoula f594625
Fix reset
stratoula 978c07b
Merge branch 'main' into esql-chaining-variables
stratoula f7ede1c
Small refactoring
stratoula dd98597
Display existing variables
stratoula 3d2772b
Fix
stratoula 097a7ef
Merge branch 'main' into esql-chaining-variables
stratoula 1bba682
Merge with main and resolve conflicts
stratoula 1c20d7e
Mark incompatible selections
stratoula ead29c0
Change the label
stratoula 107d02b
Fixes
stratoula 2f2145e
Some fixes
stratoula 331469f
Merge branch 'main' into esql-chaining-variables
stratoula d56bb6a
Some cleanup
stratoula 1e7d4ee
More cleanup
stratoula 21ba7b8
More changes
stratoula b9e5bfe
Adds some unit tests
stratoula 5b425e1
Merge branch 'main' into esql-chaining-variables
stratoula 02dfbc7
Merge branch 'main' into esql-chaining-variables
stratoula 11af326
Merge with main and resolve conflicts
stratoula ffabc88
Merge branch 'main' into esql-chaining-variables
stratoula File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,7 +79,7 @@ export const OptionsListControl = ({ | |
| disableMultiValueEmptySelection?: boolean; | ||
| }) => { | ||
| const popoverId = useMemo(() => htmlIdGenerator()(), []); | ||
| const { componentApi, displaySettings } = useOptionsListContext(); | ||
| const { componentApi, displaySettings, customStrings } = useOptionsListContext(); | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The invalid selection label is not making sense here as the value is valid (the chart works) but is not part of the updated list. In order to introduce a new custom label I add a customStrings option in the context. It can be a property too. Let me know what you prefer. |
||
|
|
||
| const [isPopoverOpen, setPopoverOpen] = useState<boolean>(false); | ||
| const [ | ||
|
|
@@ -152,9 +152,10 @@ export const OptionsListControl = ({ | |
| <EuiFlexItem grow={false}> | ||
| <EuiToolTip | ||
| position="top" | ||
| content={OptionsListStrings.control.getInvalidSelectionWarningLabel( | ||
| invalidSelections.size | ||
| )} | ||
| content={ | ||
| customStrings?.invalidSelectionsLabel ?? | ||
| OptionsListStrings.control.getInvalidSelectionWarningLabel(invalidSelections.size) | ||
| } | ||
| delay="long" | ||
| > | ||
| <EuiToken | ||
|
|
@@ -164,9 +165,12 @@ export const OptionsListControl = ({ | |
| color="euiColorVis9" | ||
| shape="square" | ||
| fill="dark" | ||
| title={OptionsListStrings.control.getInvalidSelectionWarningLabel( | ||
| invalidSelections.size | ||
| )} | ||
| title={ | ||
| customStrings?.invalidSelectionsLabel ?? | ||
| OptionsListStrings.control.getInvalidSelectionWarningLabel( | ||
| invalidSelections.size | ||
| ) | ||
| } | ||
| data-test-subj={`optionsList__invalidSelectionsToken-${componentApi.uuid}`} | ||
| css={styles.invalidSelectionsToken} // Align with the notification badge | ||
| /> | ||
|
|
@@ -185,6 +189,7 @@ export const OptionsListControl = ({ | |
| invalidSelections, | ||
| componentApi.uuid, | ||
| styles, | ||
| customStrings, | ||
| ]); | ||
|
|
||
| const button = ( | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The change here is: