Skip to content

Conversation

@obenland
Copy link
Member

@obenland obenland commented Dec 5, 2025

Proposed changes:

  • Replace hash-based routing with TanStack Router using @wordpress/boot package patterns
  • Routes now use ?p=/path URL format for forward compatibility with Gutenberg's routing infrastructure
  • Add code-split route modules (content.ts for stage/inspector, route.ts for lifecycle)
  • Router dynamically determines when to show inspector panel based on route configuration
  • Sidebar navigation uses router hooks (useLocation, useNavigate) for multi-route support

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  1. Go to Settings > ActivityPub and navigate to the Social Web tab
  2. Verify the URL changes to ?p=/ format (not hash-based)
  3. Click a post in the feed - inspector should open and URL updates with postId param
  4. Click Close button - inspector closes and postId is removed from URL
  5. Use browser back/forward - navigation should work correctly
  6. Refresh the page with a post selected - should restore the correct state

Replace hash-based routing with TanStack Router using the @wordpress/boot
package patterns for forward compatibility with Gutenberg's routing
infrastructure. Routes now use ?p=/path URL format with code-split route
modules.
@obenland obenland added the Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary. label Dec 5, 2025
@obenland obenland self-assigned this Dec 5, 2025
@obenland obenland requested a review from a team December 5, 2025 23:02
@github-actions github-actions bot added the [Focus] Editor Changes to the ActivityPub experience in the block editor label Dec 5, 2025
Improves type safety and documentation in the TanStack Router integration:
- Add explicit return types to functions
- Import and use proper TanStack Router types (RouterHistory, HistoryLocation,
  RouteComponent, AnyRouter)
- Add comments explaining strictNullChecks workarounds
- Use void operator for ignored promises
- Remove unused defaultNotFoundComponent
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@obenland obenland merged commit 905f70f into add/reader Dec 8, 2025
16 checks passed
@obenland obenland deleted the update/router branch December 8, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Focus] Editor Changes to the ActivityPub experience in the block editor Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants