-
Notifications
You must be signed in to change notification settings - Fork 175
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
Create an onReady and onError callback for standalone gnav #2873
Conversation
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## stage #2873 +/- ##
=======================================
Coverage 96.29% 96.29%
=======================================
Files 240 240
Lines 54739 54750 +11
=======================================
+ Hits 52709 52724 +15
+ Misses 2030 2026 -4 ☔ View full report in Codecov by Sentry. |
@@ -317,7 +317,9 @@ class Gnav { | |||
await yieldToMain(); | |||
await task(); | |||
} | |||
|
|||
// Dispatching an event when gnav loads and is visible | |||
window.dispatchEvent(new CustomEvent('feds:nav.ready')); |
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.
window.dispatchEvent(new CustomEvent('feds:nav.ready')); | |
window.dispatchEvent(new CustomEvent('feds:nav:ready')); |
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.
On another note, since it's a milo block, should we dispatch milo:globalnav:ready
? That follows the other eventlisteners such as milo:modal:closed
within the ecosystem
As a more general question, why is that needed and what is the use-case? The ticket and description don't mention anything |
@mokimo This is currently required for the Adobe Home team, but we thought it would be a good use case to support as a standalone component. They want to display a loader state until the Gnav fully loads and be able to handle/track any errors that occur within their app. |
This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR. |
41ec6c5
to
35bebf5
Compare
@narcis-radu @mokimo Could you please review the updated changes? |
76d8f71
to
039fa9b
Compare
Reminder to set the |
Skipped 2873: "Create an onReady and onError callback for standalone gnav" due to file "libs/blocks/global-navigation/global-navigation.js" overlap. Merging will be attempted in the next batch |
3057b7a
to
40b7b0c
Compare
Resolves: MWPW-158168
Test URLs:
Qa: https://adobecom.github.io/nav-consumer/navigation.html?authoringpath=/federal/dev&env=stage&navbranch=gnav-event