Help Center + Big Sky Integration Updates #107475
Merged
+93
−139
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.
This PR includes two changes for the Help Center + Big Sky & CIAB integration:
1. Fix: Add optional chaining for next-admin store access
When
helpCenterData.isNextAdminis true but thenext-adminstore hasn't been registered yet (i.e. still loading), callingselect('next-admin').getMetaMenuItems()throws a TypeError becauseselect('next-admin')returns undefined. This was causing crashes for me. The check reruns when the store changes so it still works and loads the help center after CIAB loads in.2. Support navigation continuation hook
Adds support for a
useNavigationContinuationhook that can be provided by external plugins (Big Sky). This enables conversation continuation after page navigation when using thewp-admin/navigateability specifically.This pattern was already in use for
wp-adminnavigation. It is needed because the page does a full page reload, and we need to follow-up with the model after the app has re-rendered.Testing Steps
Loading
unified-agentfeature flag (i.e./wp-admin/admin.php?page=next-admin&p=%2F)flags=unified-agentand see the unified agent correctly loads insteadNavigation
unified-agentfeature flag (i.e./wp-admin/admin.php?page=next-admin&p=%2F)?flags=unified-agentto test the unified agent