-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix minor Console regressions introduced during EUIfication. #41089
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d7db0b9
Fix minor Console regressions introduced during EUIfication.
cjcenizal 8bc9011
Merge branch 'master' into console/eui-regressions
cjcenizal 5d575ed
Fix TS error.
cjcenizal 871cbd2
Merge branch 'master' into console/eui-regressions
cjcenizal f8f0372
Remove redundant condition.
cjcenizal 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 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 |
---|---|---|
|
@@ -61,3 +61,7 @@ | |
z-index: $euiZLevel1 + 2; | ||
margin-top: 22px; | ||
} | ||
|
||
.conApp__settingsModal { | ||
min-width: 460px; | ||
} |
This file contains 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
File renamed without changes.
This file contains 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 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 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 |
---|---|---|
|
@@ -287,6 +287,16 @@ function retrieveSettings(settingsKey, settingsToRetrieve) { | |
} | ||
|
||
// Retrieve all selected settings by default. | ||
// TODO: We should refactor this to be easier to consume. Ideally this function should retrieve | ||
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. Thanks for adding this! |
||
// whatever settings are specified, otherwise just use the saved settings. This requires changing | ||
// the behavior to not *clear* whatever settings have been unselected, but it's hard to tell if | ||
// this is possible without altering the autocomplete behavior. These are the scenarios we need to | ||
// support: | ||
// 1. Manual refresh. Specify what we want. Fetch specified, leave unspecified alone. | ||
// 2. Changed selection and saved: Specify what we want. Fetch changed and selected, leave | ||
// unchanged alone (both selected and unselected). | ||
// 3. Poll: Use saved. Fetch selected. Ignore unselected. | ||
|
||
function retrieveAutoCompleteInfo(settingsToRetrieve = settings.getAutocomplete()) { | ||
if (pollTimeoutId) { | ||
clearTimeout(pollTimeoutId); | ||
|
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.
Is&& newSettings.polling
needed? Looks like it is already being checked on line57
.After looking at this further, should the initial check on line
57
be removed? I think we would want to fetch any changed settings regardless if polling is turned on or off.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.
My line of thought here is that users disabled polling because the fetch request is so expensive. So, I think they'd be unhappy with any fetch that's automatically executed without them clicking the "Fetch now" button. Does that make sense? I'm going to add a comment to explain that for now but I'm still open to changing this if you think we can improve it.
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.
Ok, makes sense. Thanks for adding the comment! I think you can still delete
&& newSettings.polling
(my original comment). Otherwise, this is fine with me.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.
isPollingChanged
will also betrue
if the user has turned off polling. So we need to make sure we're fetching the settings only if the user has turned polling on, but not when they've turned it off.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.
isn't that already being handled on line 60 though?
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.
Oh you're right! I missed that. Thank you for persisting in pointing it out to me 😅 Will fix!