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

[Enterprise Search] Add helpers for flash messages #77677

Merged

Conversation

scottybollinger
Copy link
Contributor

@scottybollinger scottybollinger commented Sep 16, 2020

Summary

With the current FlashMessages implementation, the setting of a simple message is quite verbose. This PR exposes simple methods that set single-string messages, which covers most use cases in the logic files.

Before

FlashMessagesLogic.actions.setFlashMessages({
  type: 'success',
  message: 'Successfully created bird.',
});

After

setSuccessMessage('Successfully created bird.');

Checklist

@scottybollinger scottybollinger added Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.10.0 labels Sep 16, 2020
@scottybollinger scottybollinger requested a review from a team September 16, 2020 20:47
@scottybollinger scottybollinger changed the title [Enterprise Search] Add a helper for success messages [Enterprise Search] Add a helpers for flash messages Sep 16, 2020
Copy link
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

Love it!

@scottybollinger scottybollinger changed the title [Enterprise Search] Add a helpers for flash messages [Enterprise Search] Add helpers for flash messages Sep 16, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
enterpriseSearch 272 +1 271

async chunks size

id value diff baseline
enterpriseSearch 433.7KB +956.0B 432.7KB

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

@scottybollinger scottybollinger merged commit bd6b389 into elastic:master Sep 16, 2020
@scottybollinger scottybollinger deleted the scottybollinger/success-message branch September 16, 2020 23:06
scottybollinger added a commit to scottybollinger/kibana that referenced this pull request Sep 16, 2020
* [Enterprise Search] Add a helper for success messages

* Move method to separate file

* Update test names

* D R Y

* I really need to slow down  🤦🏼‍♂️

* PR feedback

* Typo
scottybollinger added a commit that referenced this pull request Sep 17, 2020
* [Enterprise Search] Add a helper for success messages

* Move method to separate file

* Update test names

* D R Y

* I really need to slow down  🤦🏼‍♂️

* PR feedback

* Typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants