-
Notifications
You must be signed in to change notification settings - Fork 0
CRAFT-1833: Documentation App - miscellaneous changes #612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: c651915 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
0140519 to
d973cdc
Compare
d973cdc to
b0de609
Compare
valoriecarli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is looking amazing, but you already know that. ive left a couple of things that we can follow up on at a later time, and like @ByronDWall brought up, i think its time we start thinking of adding tests to this beauty.
thank you!
|
just putting this here to keep everything in one place Where the Header is 🤩 on the
|
This is a matter of changing the If there are multiple mdx-files for a component, the Tabs are displayed and a "Meta"-Section (title, descirption, lifecycleState & tags) is displayed on top of them on every tabbed page. The displayed information comes from the frontmatter section of the |
…aversal - Added a new utility function `validateFilePath` to ensure file paths remain within the intended base directory, enhancing security against path traversal attacks. - Updated various components to utilize this validation function when constructing file paths for route files, cache paths, and generated outputs, ensuring consistent path safety across the documentation build process.
- Introduced a new file `type-definitions.ts` to manage the dynamic loading of component type definitions using a cache to optimize performance. - Updated the `ComponentPropsTable` to utilize the new `loadComponentTypeDefinitions` function for fetching component types from the manifest, improving modularity and maintainability.
- Updated the RouteManifest type to include an optional lifecycleState property. - Modified the route generation process to populate lifecycleState from metadata. - Adjusted the NimbusExportsList component to utilize the lifecycleState from the document, enhancing the display of export information.
jaikamat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's in a great place


Documentation App Revamp
Note
While many many files changed, everything is neatly compartmentalized. There is a single component change in nimbus (the Tabs component), apart from that it's only documentation changes in nimbus. Everything related to the document parsing lives now in a separate package. If you can run the docs-app locally (
pnpm nimbus:init & pnpm start:docs) and file-changes in mdx-files propagate to the frontend then I'd consider this success.To see the new TabsView, check out the
Buttoncomponent.Overview
Comprehensive revamp of the Nimbus documentation system with improved architecture, better performance, and enhanced developer experience.
Key Changes
1. New Build Package (
@commercetools/nimbus-docs-build)Standalone documentation build system with:
.mdx,.dev.mdx,.a11y.mdx,.guidelines.mdx)react-docgen-typescript2. Enhanced Build Pipeline
3. Improved Navigation & UX
New Components:
DocMetadata- Document presentation with lifecycle statesColorThemeMenu- Dynamic theme selection with previewViewTabs- Multi-view documentation navigationErrorBoundary- Graceful error handlingAppFrame- Unified layout structureNavigation Enhancements:
4. Enhanced Tabs Component
variantprop with "line" (default) and "pills" optionsselectedKeyandonSelectionChangeprops5. Developer Experience
Examples
Multi-View Documentation (Button Component)
Build Performance
Breaking Changes
None - Fully backward compatible
All changes are additive or internal refactoring:
variantprop is optional (defaults to "line" which matches previous behavior)Architecture Changes
Before
After
@commercetools/nimbus-docs-buildpackageChecklist