-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Re-add custom flash service so engines can extend cluster's template #19963
Re-add custom flash service so engines can extend cluster's template #19963
Conversation
This reverts commit b04751d.
@@ -46,7 +46,7 @@ export default class App extends Application { | |||
}, | |||
kubernetes: { | |||
dependencies: { | |||
services: ['router', 'store', 'secret-mount-path', 'flashMessages'], | |||
services: ['router', 'store', 'secret-mount-path', 'flash-messages'], |
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.
thanks for doing this!
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.
original original file: https://github.com/hashicorp/vault/pull/19925/files#diff-5ebd44ba5909c95c331fd105e463a0332fa06bfc2f1244a4324d2518c29d9e59
(still not using stickyInfo
anywhere)
import FlashMessages from 'ember-cli-flash/services/flash-messages';
export default class FlashMessageService extends FlashMessages {
stickyInfo(message: string) {
return this.info(message, {
sticky: true,
priority: 300,
});
}
}
@@ -9,7 +9,7 @@ import { action } from '@ember/object'; | |||
import { task } from 'ember-concurrency'; | |||
import { waitFor } from '@ember/test-waiters'; | |||
import errorMessage from 'vault/utils/error-message'; | |||
import FlashMessageService from 'ember-cli-flash/services/flash-messages'; | |||
import FlashMessageService from 'vault/services/flash-messages'; |
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.
anytime we see FlashMessageService
we know it refers to the custom service file
@@ -16,7 +16,7 @@ export default class KubernetesEngine extends Engine { | |||
modulePrefix = modulePrefix; | |||
Resolver = Resolver; | |||
dependencies = { | |||
services: ['router', 'store', 'secret-mount-path', 'flashMessages'], | |||
services: ['router', 'store', 'secret-mount-path', 'flash-messages'], |
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.
opted to make syntax the same across the app
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.
This looks good to me!! tysm for reverting these changes :)
Our test suite hasn't been up and running on github the last week which caused some breaking changes to be merged accidentally.
#19925 was opened to resolve the flash message service not calling our custom
stickyInfo
method (more details in this comment)However, this PR introduced new errors because we missed removing the
flash-message
service from the individual engine dependancies and updating an import file path that was merged in from a separate branch.To address these I opened #19950 but then discovered none of the flash messages in the engines were rendering because each ember engine needs its own
<FlashMessage>
template to render since it no longer had access to the FlashMessage template in cluster.hbs (see closing comment here)This PR keeps the removal of
stickyInfo
from #19925 (because I couldn't reproduce the original error and didn't want to trust renaming resolved it) but will open a draft with the rest of the changes if we decided to addember-cli-flash
as a dependency to each engine.Aforementioned draft: #19969