-
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
Toast notifications: ignore undefined options #126120
Merged
pgayvallet
merged 3 commits into
elastic:main
from
pgayvallet:kbn-xxx-toast-API-undefined
Feb 22, 2022
Merged
Toast notifications: ignore undefined options #126120
pgayvallet
merged 3 commits into
elastic:main
from
pgayvallet:kbn-xxx-toast-API-undefined
Feb 22, 2022
Conversation
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
pgayvallet
added
bug
Fixes for quality problems that affect the customer experience
release_note:skip
Skip the PR/issue when compiling release notes
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
v8.1.0
v8.2.0
labels
Feb 22, 2022
Pinging @elastic/kibana-core (Team:Core) |
afharo
approved these changes
Feb 22, 2022
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.
LGTM
pgayvallet
added
the
auto-backport
Deprecated - use backport:version if exact versions are needed
label
Feb 22, 2022
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Feb 22, 2022
* Toast notifications: ignore undefined options * just use omitBy (cherry picked from commit 2cabe1a)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Feb 22, 2022
* Toast notifications: ignore undefined options * just use omitBy (cherry picked from commit 2cabe1a)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Feb 22, 2022
* Toast notifications: ignore undefined options * just use omitBy (cherry picked from commit 2cabe1a)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Feb 22, 2022
* Toast notifications: ignore undefined options * just use omitBy (cherry picked from commit 2cabe1a) Co-authored-by: Pierre Gayvallet <[email protected]>
kibanamachine
added a commit
that referenced
this pull request
Feb 22, 2022
* Toast notifications: ignore undefined options * just use omitBy (cherry picked from commit 2cabe1a) Co-authored-by: Pierre Gayvallet <[email protected]>
kibanamachine
added a commit
that referenced
this pull request
Feb 22, 2022
* Toast notifications: ignore undefined options * just use omitBy (cherry picked from commit 2cabe1a) Co-authored-by: Pierre Gayvallet <[email protected]>
lucasfcosta
pushed a commit
to lucasfcosta/kibana
that referenced
this pull request
Mar 2, 2022
* Toast notifications: ignore undefined options * just use omitBy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auto-backport
Deprecated - use backport:version if exact versions are needed
bug
Fixes for quality problems that affect the customer experience
release_note:skip
Skip the PR/issue when compiling release notes
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
v7.17.1
v8.0.1
v8.1.0
v8.2.0
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.
Summary
Because of the way the
notifications
service of theuseKibana
hook fromkibana_react
uses core'stoast
API, by passing every properties, even undefined ones instead of excluding them:kibana/src/plugins/kibana_react/public/notifications/create_notifications.tsx
Lines 16 to 33 in 6dc31d7
The internal logic of the toast API to add default values for
id
andtoastLifeTimeMs
was broken, asis
{ toastLifeTimeMs: undefined }
This PR fixes it by removing options having
undefined
values before performing the spread.Closes #125582.