TryGhost
OSS
Ghost
Removed admin-x-framework's dependency on admin-x-design-system ref https://linear.app/ghost/issue/PLA-190/decouple-admin-x-framework-from-admin-x-design-system admin-x-framework is the long-lived foundation library, while admin-x-design-system is a legacy design system being replaced by shade. The framework depending on the design system meant every framework consumer dragged the legacy package into its dependency graph, and would block deleting the design system later. The design system has no reverse dependency on the framework, so the decouple is one-directional. Per coupling site: - use-handle-error.ts (showToast, runtime): moved a self-contained copy of the design system's error toast into src/utils/toast.tsx. The framework already depended on react-hot-toast directly, and the design system's showToast is only a styled react-hot-toast custom render, so the markup, classes, testid and the two icons were copied verbatim. Error toasts still render identically inside the design system's <Toaster> in admin-x-settings (the only surface that mounts a react-hot-toast Toaster today). Injecting a toast handler through FrameworkProvider was rejected as an unnecessary configuration seam. - utils/api/hooks.ts (usePagination, runtime): copied the hook (plus PaginationMeta/PaginationData) into src/hooks/use-pagination.ts. The framework's createPaginatedQuery is its own pagination contract; the design system keeps its copy because its Table/Pagination components use the PaginationData type, and a design-system->framework dependency must not be introduced. TypeScript's structural typing keeps the framework's pagination result assignable to design system props. - use-form.ts (ButtonColor, type): inlined the literal union. okProps stays structurally assignable to the design system's Button color. - focus-koenig-editor-on-bottom-click.ts (KoenigInstance, type): inlined the type. Consumers that type editor refs against the design system's KoenigInstance stay compatible structurally. - test/render.tsx (DesignSystemAppProps, type): inlined the minimal {darkMode, fetchKoenigLexical} shape the standalone renderer actually passes; it stays assignable to admin-x-settings' designSystem prop. The framework's toast markup now lives outside the design system, so its Tailwind classes must be scanned explicitly: added admin-x-framework/src to the @source lists of the central admin pipeline and admin-x-settings' standalone build instead of relying on the identical classes in the design system's own Toast staying scanned.
nx run ghost-monorepo:lint:boundaries
Sign in / Sign up
Open main menu
Succeeded
CI Pipeline Execution
nx run ghost-monorepo:lint:boundaries
Click to copy
Linux
4 CPU cores
read-write
access token used
ec5e4860
29331