Skip to content

refactor(apollo-vertex): decouple shell components from framework-specific routing []#358

Draft
KokoMilev wants to merge 1 commit intomainfrom
refactor/shell-framework-agnostic-routing
Draft

refactor(apollo-vertex): decouple shell components from framework-specific routing []#358
KokoMilev wants to merge 1 commit intomainfrom
refactor/shell-framework-agnostic-routing

Conversation

@KokoMilev
Copy link
Contributor

Vertical repos must pass linkComponent and pathname to ApolloShell after syncing:

import { Link, useLocation } from "@tanstack/react-router";
const { pathname } = useLocation();
<ApolloShell linkComponent={Link} pathname={pathname} ... />

Copilot AI review requested due to automatic review settings March 17, 2026 19:29
@github-actions
Copy link

github-actions bot commented Mar 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-canvas 🟢 Ready Preview, Logs Mar 17, 2026, 12:34:32 PM
apollo-landing 🟢 Ready Preview, Logs Mar 17, 2026, 12:32:08 PM
apollo-ui-react 🟢 Ready Preview, Logs Mar 17, 2026, 12:32:08 PM
apollo-vertex 🟢 Ready Preview, Logs Mar 17, 2026, 12:32:59 PM
apollo-wind 🟢 Ready Preview, Logs Mar 17, 2026, 12:32:25 PM

@KokoMilev KokoMilev force-pushed the refactor/shell-framework-agnostic-routing branch from bde5c80 to d6cdee6 Compare March 17, 2026 19:29
@github-actions
Copy link

github-actions bot commented Mar 17, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

  • apps/apollo-vertex/package.json
  • pnpm-lock.yaml

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors the Apollo Vertex shell registry to remove its hard dependency on @tanstack/react-router by injecting routing primitives (linkComponent + pathname) via context, enabling the shell to be consumed with different routing solutions (e.g., Next.js, TanStack Router).

Changes:

  • Removed @tanstack/react-router from apps/apollo-vertex dependencies/lockfile and replaced direct router usage with a new shell router context.
  • Updated shell navigation items to use ShellLink and useShellPathname instead of Link/useLocation.
  • Updated the Shell docs page rendering to use iframe previews and documented the new ApolloShell API requirements.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-lock.yaml Removes TanStack Router and transitive packages from lockfile.
apps/apollo-vertex/package.json Drops @tanstack/react-router dependency from the Vertex app.
apps/apollo-vertex/templates/ShellTemplate.tsx Passes linkComponent and pathname into ApolloShell (Next.js integration).
apps/apollo-vertex/registry/shell/shell.tsx Adds required linkComponent/pathname props and wraps shell in ShellRouterProvider.
apps/apollo-vertex/registry/shell/shell-router-context.tsx Introduces router context + ShellLink abstraction for framework-agnostic navigation.
apps/apollo-vertex/registry/shell/shell-nav-item.tsx Switches nav item routing from TanStack router to shell router context.
apps/apollo-vertex/registry/shell/shell-minimal-nav-item.tsx Switches minimal nav item routing from TanStack router to shell router context.
apps/apollo-vertex/registry.json Registers the new shell-router-context.tsx file in the registry.
apps/apollo-vertex/app/vertex-components/shell/page.mdx Updates live examples to iframe previews and documents new linkComponent/pathname props.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Comment on lines +51 to +53
<ShellRouterContext value={{ LinkComponent: linkComponent, pathname }}>
{children}
</ShellRouterContext>
Comment on lines 59 to +61
navItems={variant === "minimal" ? minimalNavItems : navItems}
linkComponent={Link}
pathname={pathname}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants