-
Notifications
You must be signed in to change notification settings - Fork 4
Page Builder plugin #6
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
base: main
Are you sure you want to change the base?
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…5-migrate-core-page-builder-models-to-medusa-v2
<Shell leftSidebar={<EditorSidebar />} rightSidebar={<PostSettingsSidebar />}> | ||
{children} | ||
</Shell> |
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.
Why do these need to be passed in here? Just include them in the Shell?
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.
I was thinking it could be reused, but maybe I should just do as you suggested for now.
…5-migrate-core-page-builder-models-to-medusa-v2
- Posts Data Table - Single Column Layout - Header, ActionMenu, etc
…nents - Remove CreatePostButton component and replace with simple Create button - Add comprehensive PostsDataTable with filtering, sorting, and mock data - Streamline content page layout and navigation
…n types - Rename model exports to include 'Model' suffix for clarity (e.g., Post to PostModel). - Introduce common types for post-related entities in a new common.ts file. - Update references in the PageBuilderService and model files to use the new names.
- Introduce pageBuilderModuleEvents with a POST_CREATED event for better event handling. - Ensure PageBuilderService is imported for module functionality.
- Change handle column to be nullable in the PostModel. - Add migration to alter handle column type and drop not null constraint. - Update snapshot to reflect changes in the database schema.
- Add types for post creation in mutations.ts. - Create createPostWorkflow to handle post creation logic. - Implement createPostStep for managing post creation and deletion. - Export common types and mutations from index.ts for better modularity.
- Implement middlewares for creating and listing posts in the admin section. - Define schemas for post creation and query validation using Zod. - Create route handlers for GET and POST requests to manage posts. - Remove obsolete admin pages route file.
- Introduce ExtendedMedusaSDK to encapsulate admin and store resources. - Create AdminPageBuilderResource for managing admin post operations. - Implement ExtendedAdmin and ExtendedStore classes to extend Medusa functionality. - Define types for admin page builder operations in types.ts. - Establish StorePageBuilderResource for future store-related functionalities.
- Create sdk.ts to initialize ExtendedMedusaSDK with backend URL configuration.
… in Header - Update Header component to use Fragment for better key management in action mapping. - Ensure consistent usage of React components for improved readability.
- Add useAdminCreatePost hook for creating posts with mutation handling. - Introduce useAdminListPosts and useAdminFetchPost hooks for fetching posts and individual post details. - Update ContentPage to utilize the new post creation hook and manage loading state. - Refactor PostsDataTable to use the new admin hooks for data fetching and filtering. - Enhance type definitions for better clarity and consistency across components.
- Add POST_UPDATED event to pageBuilderModuleEvents for handling post updates. - Introduce UpdatePostStepInput and UpdatePostWorkflowInput types for post update operations. - Create updatePostWorkflow to manage the update process and emit events. - Implement updatePostStep for updating posts with rollback functionality.
- Introduce updatePostSchema for validating post updates. - Create UpdatePostDTO type for structured update requests. - Implement PUT route handler for updating posts using the new updatePostWorkflow. - Enhance admin post middlewares to include update functionality.
- Introduce deletePostWorkflow and deletePostStep for handling post deletions. - Add DELETE route handler for removing posts by ID. - Implement validation schemas for post creation, update, and deletion. - Refactor middlewares to include new admin post item routes. - Update pageBuilderModuleEvents to include POST_DELETED event for better event handling.
- Introduce updatePost method for modifying existing posts. - Implement deletePost method for removing posts by ID. - Update type definitions to include AdminPageBuilderUpdatePostBody and AdminPageBuilderDeletePostResponse. - Refactor types to enhance clarity and maintainability.
- Implement useAdminUpdatePost and useAdminDeletePost hooks for managing post updates and deletions. - Update PostsDataTable to utilize the new delete functionality with toast notifications. - Refactor usePostsDataTableColumns to support updated action handlers for editing, duplicating, and deleting posts. - Remove obsolete use-posts-data-table-columns file for cleaner codebase.
- Add duplicatePostWorkflow to handle the duplication of posts. - Create duplicatePostStep for generating a new post based on an existing one. - Implement duplicatePostRelationsStep to manage the relations of the duplicated post. - Ensure proper handling of sections, featured images, authors, and tags during duplication.
- Introduce DuplicatePostStepInput and DuplicatePostWorkflowInput types for handling post duplication. - Implement AdminPageBuilderDuplicatePostResponse type for response structure. - Add duplicatePost method in AdminPageBuilderResource to facilitate post duplication via API.
- Implement POST route handler in route.ts to facilitate post duplication. - Utilize duplicatePostWorkflow to process duplication requests and return the duplicated post.
…able - Implement useAdminDuplicatePost hook for duplicating posts. - Update PostsDataTable to include duplication action with toast notifications. - Refactor usePostsDataTableColumns to support duplicate action in column definitions.
… post relations step
…ataTable - Add useQueryParams hook for managing query parameters in URL. - Refactor PostsDataTable to utilize usePostTableQuery for handling pagination, filtering, and sorting. - Simplify state management by integrating query parameters into the data table logic.
…nfiguration - Create package.json for page-builder-types with dependencies and configuration. - Add .gitignore to exclude node_modules. - Define type declarations for posts, storefronts, and common types in TypeScript. - Implement interfaces for paginated responses, post creation, updating, and deletion. - Establish foundational types for post management in the page builder.
- Bump version to 0.0.6-beta.3 in package.json. - Add AdminPageBuilderResource for managing posts in the admin interface. - Introduce StorePageBuilderResource for storefront integration. - Extend ExtendedAdminSDK and ExtendedStorefrontSDK to include page builder resources. - Update dependencies to @medusajs/types and @medusajs/js-sdk version 2.6.1.
- Update post-related types and workflows to utilize new enum values for post statuses, types, and content modes. - Refactor validations and routes to use updated type imports from @lambdacurry/medusa-page-builder-types. - Remove deprecated common types and SDK files to streamline the codebase. - Bump dependencies in package.json to version 2.6.1 for various Medusa packages. - Introduce new enum-values module for better organization of post-related constants.
- Replace ExtendedMedusaSDK with MedusaPluginsSDK for improved integration. - Update type imports to use @lambdacurry/medusa-page-builder-types across various hooks and components. - Refactor PostsDataTable and related query hooks to streamline data handling and enhance type safety.
…age-builder-models-to-medusa-v2 feat(page-builder): add core models/links/services/module
…t-implementation Post Management implementation
No description provided.