Skip to content

Conversation

@stevenle
Copy link
Member

@stevenle stevenle commented Feb 4, 2026

Motivation

  • Migrate the root-cms UI to use preact-iso instead of preact-router to align with the project's current routing/hooks API and remove the ad-hoc type shim.
  • Update navigation usages to the useLocation hook and the preact-iso Router/Route exports so routing data and navigation are accessed via the new API.

Description

  • Replaced preact-router Route/Router imports with preact-iso in the app shell (packages/root-cms/ui/ui.tsx).
  • Swapped usages of route/useRouter to the useLocation hook from preact-iso and adjusted call sites to read url or route from useLocation() in multiple components including Layout, CollectionPage, NewDocModal, CopyDocModal, DataSourceForm, ReleaseForm, DocEditor, EditDataSourcePage, and EditReleasePage.
  • Updated packages/root-cms/package.json to replace the preact-router dependency with preact-iso and removed the custom preact-router.d.ts shim file.
  • Minor callback dependency update in DocEditor to include the route reference where appropriate to keep hooks stable.

Testing

  • No automated tests were run for this change (per project instructions).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant