Repository navigation
Conversation
NotificationOriginProvider tags notifications raised beneath it with the module and connection they came from, recording an enclosing module as the parent. NotificationsProvider takes an optional interceptor that decides whether each notification is shown. A NotificationsProvider inside another now renders only its children, so notifications from nested applications are shown once, by the outermost provider. The contexts are kept on the global object, so module federation remotes with their own copy of the package find the host's provider. Showcase examples and Playwright component tests cover nesting, suppression and origins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for papaya-valkyrie-395400 canceled.
|
On main every provider and caller share one notification object, so a caller outside any NotificationsProvider still has its notifications shown, as long as a provider is mounted on the page. vuu-shell relies on this: its WorkspaceProvider sits above the shell's NotificationsProvider. Callers outside every provider now use the most recently mounted outermost provider, so that keeps working. The package README explains what this version adds and what it means for compatibility. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Explains what the new notification attributes are for in a portal, what the Vuu server sends today (RPC response notification actions and the NOTIFICATIONS table), and what it would need to add: an application column and a topic column on the notifications table, record and dismissal fields and a Success level on notification actions. Also notes the client changes to go with them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
The first piece of
ui-portal-latest(#2657) split out for main. It brings the branch's@vuu-ui/vuu-notificationschanges on their own, because nothing in them depends on@vuu-ui/coreor any other portal change.NotificationOriginProvidertags notifications raised beneath it with anorigin(moduleId,connectionId, andparentModuleIdwhen nested). A notification that already has an origin keeps it.useNotificationOriginreads the current one.NotificationsProvidertakes an optionalinterceptorthat returns"present"or"suppress"for each notification.NotificationsProviderinside another now renders only its children, so notifications from nested applications are shown once, by the outermost provider. On main providers are never nested (vuu-shell and individual showcase examples), so current behaviour is unchanged.WorkspaceProvidersits above the shell'sNotificationsProvider.recordflag on notifications, and exports of the descriptor types and theisToastNotification/isWorkspaceNotificationguards.The package README now explains what this version adds, with a compatibility section and a section on what the Vuu server would need to add to make full use of these attributes in a portal.
Compatibility
The changes are backward compatible: exports and notification fields are only added,
childrenis widened, and an app with one provider behaves as before. Two cases differ, and neither occurs on main outside showcase examples:The branch tested this with a Vitest DOM test. Here it's a Playwright component test instead, with three showcase examples under
Notifications/NotificationOrigins.Package versions and
"type": "module"are left as they are on main; they belong to the later version bump.Test plan
npm run typecheck: cleanvitest run: 1709 passplaywright test --project=components-chromium packages/vuu-notifications: 8 pass (4 existing, 4 new), including one for a caller outside the provider. It fails without the fallback.🤖 Generated with Claude Code