refactor(apollo-vertex): decouple shell components from framework-specific routing []#358
Draft
refactor(apollo-vertex): decouple shell components from framework-specific routing []#358
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
bde5c80 to
d6cdee6
Compare
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned Files
|
There was a problem hiding this comment.
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-routerfromapps/apollo-vertexdependencies/lockfile and replaced direct router usage with a new shell router context. - Updated shell navigation items to use
ShellLinkanduseShellPathnameinstead ofLink/useLocation. - Updated the Shell docs page rendering to use iframe previews and documented the new
ApolloShellAPI 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} |
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.
Vertical repos must pass
linkComponentandpathnametoApolloShellafter syncing: