Skip to content

Conversation

@marklundin
Copy link
Collaborator

  • Updated import paths for ReactQueryProvider and other components to ensure consistency.
  • Deleted unused files and components, including various example pages and utility functions, to streamline the codebase.
  • Adjusted TypeScript configuration for improved module resolution.
  • Enhanced overall organization of the documentation structure for better clarity and maintainability.

This pull request introduces significant enhancements to the PlayCanvas documentation system, including support for dynamic metadata generation, improved component imports, and a new metadata structure for organizing examples and documentation. Below are the most important changes grouped by theme:

Dynamic Metadata and Page Rendering:

  • Added dynamic metadata generation in [[...mdxPath]]/page.tsx, enabling metadata to be fetched and parsed for example pages using .meta.json files. This also includes rendering examples with the Playground component for interactive code previews. (packages/docs/app/[[...mdxPath]]/page.tsxR1-R63)

Component Import Adjustments:

  • Updated component imports in layout.tsx and client-mdx-components.js to use the @docs-components alias instead of relative paths, improving consistency and maintainability. [1] [2]

Metadata Structure for Examples and Documentation:

  • Introduced a new _meta.tsx file for organizing example pages with titles, links, and categories, providing a structured way to manage examples in the documentation.
  • Added a _meta.tsx file for the docs section to define metadata for core documentation topics such as installation, guide, and API.

Repository Link Update:

  • Corrected the docsRepositoryBase URL in layout.tsx to remove the trailing slash, ensuring proper linking to the GitHub repository.

- Updated import paths for ReactQueryProvider and other components to ensure consistency.
- Deleted unused files and components, including various example pages and utility functions, to streamline the codebase.
- Adjusted TypeScript configuration for improved module resolution.
- Enhanced overall organization of the documentation structure for better clarity and maintainability.
@marklundin marklundin added documentation Improvements or additions to documentation chore labels Apr 30, 2025
@marklundin marklundin self-assigned this Apr 30, 2025
@marklundin marklundin requested a review from Copilot April 30, 2025 13:35
@pkg-pr-new
Copy link

pkg-pr-new bot commented Apr 30, 2025

Open in StackBlitz

npm i https://pkg.pr.new/playcanvas/react/@playcanvas/react@121

commit: 5bfe65f

Copy link
Contributor

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

This pull request refactors the documentation structure by introducing dynamic metadata generation, adjusting component imports, and removing unused components to streamline the codebase.

  • Added dynamic metadata generation in the MDX page renderer with interactive Playground integration.
  • Updated component import paths to use the "@docs-components" alias and corrected the repository URL formatting.
  • Introduced new metadata files (_meta.tsx) to better structure documentation and examples.

Reviewed Changes

Copilot reviewed 81 out of 81 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/docs/content/docs/_meta.tsx Created a meta record for core documentation topics.
packages/docs/content/_meta.tsx Defined an examples list in the metadata structure for example pages.
packages/docs/client-mdx-components.js Updated ReactQueryProvider import to use the "@docs-components" alias.
packages/docs/app/layout.tsx Removed trailing slash from docsRepositoryBase URL.
packages/docs/app/[[...mdxPath]]/page.tsx Implemented dynamic metadata generation and interactive Playground.

@marklundin marklundin merged commit 6ed3fc9 into main Apr 30, 2025
5 checks passed
@marklundin marklundin deleted the chore-docs-refactor branch April 30, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants