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

Fix minor Console regressions introduced during EUIfication. #41089

Merged
merged 5 commits into from
Jul 25, 2019

Conversation

cjcenizal
Copy link
Contributor

This PR fixes a few regressions introduced as part of #39341.
This PR contains these changes:

  • Snakecase help_example.txt filename.
  • Hide polling options when no autocomplete options are selected.
  • Apply className to settings modal so its width doesn't change when the polling options are hidden.
  • Only fetch changed autocomplete settings when modal is saved.

Release notes

7.3.0 introduced a couple minor regressions in the UX around changing autocompletion settings, most notably that changed settings were not re-fetched immediately when the they were saved. This has been fixed.

- Snakecase help_example.txt filename.
- Hide polling options when no autocomplete options are selected.
- Apply className to settings modal so its width doesn't change when the polling options are hidden.
- Only fetch changed autocomplete settings when modal is saved.
@cjcenizal cjcenizal added Feature:Console Dev Tools Console Feature Feature:Dev Tools regression release_note:fix v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.4.0 v7.3.1 labels Jul 14, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Tested locally and everything works as expected! I did have a question around the implementation of refetching the autocomplete settings on save. Also, I think there are a few TS errors that need to be addressed.

return changedSettingsAccum;
}, {});
mappings.retrieveAutoCompleteInfo(changedSettings);
} else if (isPollingChanged && newSettings.polling) {
Copy link
Contributor

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 line 57.

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

isPollingChanged will also be true 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.

Copy link
Contributor

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?

if (newSettings.polling) { ... 

Copy link
Contributor Author

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!

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding this!

@cjcenizal
Copy link
Contributor Author

Thanks for the review @alisonelizabeth! I replied to your comment and fixed the TS errors. Could you take another look?

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Thanks for addressing my feedback @cjcenizal! Responded to your comment with one suggestion, otherwise LGTM.

return changedSettingsAccum;
}, {});
mappings.retrieveAutoCompleteInfo(changedSettings);
} else if (isPollingChanged && newSettings.polling) {
Copy link
Contributor

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.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@cjcenizal cjcenizal merged commit d4d8e15 into elastic:master Jul 25, 2019
@cjcenizal cjcenizal deleted the console/eui-regressions branch July 25, 2019 03:48
cjcenizal added a commit to cjcenizal/kibana that referenced this pull request Jul 25, 2019
…#41089)

- Snakecase help_example.txt filename.
- Hide polling options when no autocomplete options are selected.
- Apply className to settings modal so its width doesn't change when the polling options are hidden.
- Only fetch changed autocomplete settings when modal is saved.
cjcenizal added a commit to cjcenizal/kibana that referenced this pull request Jul 25, 2019
…#41089)

- Snakecase help_example.txt filename.
- Hide polling options when no autocomplete options are selected.
- Apply className to settings modal so its width doesn't change when the polling options are hidden.
- Only fetch changed autocomplete settings when modal is saved.
cjcenizal added a commit that referenced this pull request Jul 25, 2019
…#41942)

- Snakecase help_example.txt filename.
- Hide polling options when no autocomplete options are selected.
- Apply className to settings modal so its width doesn't change when the polling options are hidden.
- Only fetch changed autocomplete settings when modal is saved.
cjcenizal added a commit that referenced this pull request Jul 31, 2019
…#41943)

- Snakecase help_example.txt filename.
- Hide polling options when no autocomplete options are selected.
- Apply className to settings modal so its width doesn't change when the polling options are hidden.
- Only fetch changed autocomplete settings when modal is saved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Console Dev Tools Console Feature Feature:Dev Tools regression release_note:fix Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.3.1 v7.4.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants