feat(widget): per-tab navigation config and per-tab sdkConfig routing#781
Draft
effie-ms wants to merge 2 commits into
Draft
feat(widget): per-tab navigation config and per-tab sdkConfig routing#781effie-ms wants to merge 2 commits into
effie-ms wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: dc8bbac The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
E2E Examples — all passedAll examples passed in the latest run. |
E2E Playground resultsDetails
📥 Download full HTML report (open the run → Artifacts → |
53fa01e to
9f97fb1
Compare
572513c to
a80d82f
Compare
9c39a0a to
6ae7bef
Compare
a80d82f to
65f2d16
Compare
5b24746 to
dc8bbac
Compare
✅ E2E Dev Smoke — passing
4 passed · 0 failed · 0 skipped · 21s |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Which Linear task is linked to this PR?
N/A
Why was it implemented this way?
Two related changes that let a header navigation tab carry its own widget config.
1. Per-tab config on
_navigationTabs. Changed fromNavigationTabKey[]to{ tabKey, config: Partial<WidgetConfig> }[]. The widget-side preset table (navigationTabsByKey) is removed — each tab'svariant/mode/modeOptions(and now any config field) is supplied by the integrator and merged onto the widget config when the tab is active. This keeps tab behaviour out of the widget and in config rather than storing presets on the widget side.2. Active-tab
sdkConfigreaches the SDK client. The per-tab merge happens inNavigationTabsStoreProvider, which previously sat insideStoreProvider— belowSDKClientProvider— so a per-tabsdkConfig.apiUrlnever reached the client. The provider is relocated aboveSDKClientProvider(betweenThemeProviderand the SDK client), so the merged config (includingsdkConfig.apiUrl) drives the client, which recreates on tab switch. A tab can now route all SDK calls to a dedicated backend endpoint purely via config:Tab switching is locked while a route is executing (
useRouteExecutionIndicator().active) so the SDK client/apiUrlcan't be swapped out from under an in-flight execution.I18nProvider/ThemeProviderstay above the relocated provider and keep reading base config, sotheme/appearance/languagesare not tab-overridable (documented trade-off; not needed here).Visual showcase (Screenshots or Videos)
N/A
Checklist before requesting a review