-
-
Notifications
You must be signed in to change notification settings - Fork 36
Cms module (page and comments) #211
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
- Updated various dependencies in package.json to their latest versions for better performance and security. - Removed the `readOnlyWriteOnlyBehavior` option from the OpenAPI TypeScript configuration. - Enhanced type definitions in sdk.gen.ts and types.gen.ts to support new blog and comment features, including CRUD operations for blogs and tags.
- Added new menu items for Comments and CMS in the admin panel. - Updated AdminIndex to utilize ApplicationConfigurationDto for improved type safety. - Enhanced API request handling with error logging and timeout management. - Introduced new query constants for comments and pages. - Improved app configuration hook to handle undefined responses gracefully. - Expanded granted policies to include CRUD operations for comments and pages.
- Added support for nested submenus in AdminMenus for improved navigation. - Updated the CMS page layout to utilize cards for better content management. - Removed the deprecated Comments page component. - Enhanced the mobile and desktop side navigation bars to handle submenu expansion and active states.
…formation - Redesigned AdminIndex to display a modern admin dashboard featuring user profile details, system status, and quick action buttons. - Introduced user profile card with authentication status, email verification, and role management. - Added system information cards for multi-tenancy status, current tenant details, and session information. - Enhanced layout with responsive design and improved user experience through card components and badges.
- Added onClick handler to links in both mobile and desktop side navigation bars to toggle submenus when applicable. - Improved user experience by ensuring submenu expansion is handled correctly based on the current state.
- Introduced a rich text editor for content input with HTML support and keyboard shortcuts for formatting. - Implemented auto-slug generation based on the page title. - Added draft saving functionality to localStorage with alerts for unsaved changes. - Enhanced form validation and error handling for better user feedback. - Redesigned the layout to include tabs for content, advanced settings, and preview, improving user navigation and experience.
- Introduced new menu item for managing menu items in the admin navigation. - Added query constants for fetching menu items and individual menu items, enhancing data retrieval capabilities.
…tyling - Added a new view action in the PageList component for navigating to individual page views. - Introduced prose styling in globals.css for improved content presentation across pages. - Updated the usePages hook to include a new method for fetching pages by slug, enhancing data retrieval capabilities.
- Removed unused policy checks in AddComment component for cleaner code. - Improved error handling in AddComment to provide user feedback on comment creation. - Updated PageView component to include comments section and added documentation for custom styles and scripts. - Introduced new query constant for fetching public comments, enhancing data retrieval capabilities.
- Refactored client types to improve type safety by replacing readable/writable types with unified types across components. - Updated form handling in various components to utilize new input types, enhancing consistency and reducing errors. - Improved error handling in hooks to allow for undefined responses, ensuring better resilience in data fetching. - Enhanced comment and page management components to align with updated type definitions, improving overall functionality.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
- Replaced hardcoded permission strings with a centralized Permissions enum for better maintainability and consistency. - Updated various components including page, menu, and comment management to utilize the new Permissions structure. - Enhanced user experience by ensuring proper permission checks for actions like creating, updating, and deleting pages and menus. - Improved code readability and reduced duplication by standardizing permission checks across the application.
Co-authored-by: antosubash <antosubash@live.com>
…and deployment Co-authored-by: antosubash <antosubash@live.com>
Co-authored-by: antosubash <antosubash@live.com>
…ation-using-docusaurus-87a9 Write project documentation using Docusaurus
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.
Bug: XSS Vulnerability in HTML Rendering
Unsanitized user-provided HTML content from the content field is rendered directly via dangerouslySetInnerHTML in the page creation form. This occurs in both the Rich Text Editor's preview mode and the dedicated "Preview" tab, leading to a Cross-Site Scripting (XSS) vulnerability.
src/src/app/admin/cms/pages/create/page.tsx#L74-L75
abp-react/src/src/app/admin/cms/pages/create/page.tsx
Lines 74 to 75 in c6b123b
| className="border rounded-md p-4 min-h-[300px] bg-background" | |
| dangerouslySetInnerHTML={{ __html: value || '<p class="text-muted-foreground">No content to preview</p>' }} |
src/src/app/admin/cms/pages/create/page.tsx#L609-L613
abp-react/src/src/app/admin/cms/pages/create/page.tsx
Lines 609 to 613 in c6b123b
| className="prose max-w-none" | |
| dangerouslySetInnerHTML={{ | |
| __html: (watch('content') || '') || '<p class="text-muted-foreground">No content to preview</p>' | |
| }} | |
| /> |
BugBot free trial expires on July 22, 2025
Learn more in the Cursor dashboard.
Was this report helpful? Give feedback by reacting with 👍 or 👎
| } | ||
| } | ||
| }, | ||
| }) |
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.
Bug: Menu Hook Fails to Apply Pagination, Filtering
The useMenuItems hook incorrectly implements pagination and filtering. While it accepts pageIndex, pageSize, filter, and sorting parameters, and calculates a skip value, none of these are passed to the menuItemAdminGetList() API call. This causes all requests to return the same unfiltered first page of results. Furthermore, the totalCount returned by the hook is erroneously set to the length of the current items array (data.items?.length) instead of using the correct totalCount from the API response.
Locations (1)
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.
Bug: Calendar Navigation Icons Missing
The components prop, which provided custom IconLeft and IconRight for calendar navigation, was removed. This may cause the calendar's previous/next month arrows to be missing or display incorrectly (e.g., unstyled or incompatible default icons).
src/src/components/ui/calendar.tsx#L51-L62
abp-react/src/src/components/ui/calendar.tsx
Lines 51 to 62 in 8eeccf8
| day_selected: | |
| "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground", | |
| day_today: "bg-accent text-accent-foreground", | |
| day_outside: | |
| "day-outside text-muted-foreground aria-selected:text-muted-foreground", | |
| day_disabled: "text-muted-foreground opacity-50", | |
| day_range_middle: | |
| "aria-selected:bg-accent aria-selected:text-accent-foreground", | |
| day_hidden: "invisible", | |
| ...classNames, | |
| }} | |
| {...props} |
| const itemId = item.id || `${item.type || 'component'}-${index}-${Date.now()}` | ||
| // Always generate a new UUID for the key | ||
| const uniqueKey = uuidv4() | ||
|
|
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.
Bug: React Hydration Errors with Non-Deterministic IDs
Using non-deterministic functions like Date.now() and Math.random() for component ID generation leads to React hydration mismatches and errors. This occurs because the IDs generated during server-side rendering will differ from those on the client, particularly affecting SSR/SSG scenarios.
Locations (2)
|
Deployment failed with the following error: |
puck working wip: puck Refactor CMS page builder and add Puck error suppression Replaces the HTML/Puck tabbed editor with a full-screen Puck visual editor, introduces quick-add component actions, and ensures all content blocks have unique IDs. Adds a WelcomeBlock component and integrates global and local error suppression for React key warnings from Puck. Updates Puck config, styles for a full-screen editor experience, and refactors editor components for improved reliability and UX. Refactor Puck editor components and enhance content handling This update replaces the existing Puck editor with a more robust version that includes a fallback mechanism for rendering. It improves the handling of Puck data by ensuring all components have unique keys and supports nested components through a new Slots API. The configuration has been updated to include new components like Flexbox, Grid, and TemplateBlock, enhancing layout flexibility. Additionally, error suppression for Puck-related warnings has been refined, improving the overall user experience in the CMS page builder. Enhance PuckEditorFallback with improved error handling and data processing This update introduces robust error handling in the PuckEditorFallback component, allowing for better management of various data formats, including JSON and HTML. It adds state management for error messages and integrates error feedback during component operations such as adding, removing, and updating components. The overall user experience is improved by providing clear error messages and ensuring that the editor remains functional even when data processing encounters issues. Enhance EditPage component with improved data handling and user experience This update refines the EditPage component by implementing better data fetching and error handling mechanisms. It introduces forced refetching of page data on mount and invalidates cache to ensure fresh data is loaded. Additionally, it enhances the user interface with loading indicators and retry options for failed data loads. The content handling has been improved to support both JSON and HTML formats, ensuring compatibility with the Puck editor. Debug logging has been added for better traceability during development. Refactor Puck editor components and remove deprecated files This update refines the Puck editor by replacing the PuckEditorFallback with a more robust PuckEditor that features a modular layout using resizable panels. It enhances the user experience with improved error handling, loading states, and a clear structure for component management. Additionally, deprecated files related to previous editor versions have been removed to streamline the codebase. The README has been updated to reflect the new architecture and features, ensuring clarity for future development. Refactor Puck editor and enhance data validation This update refines the Puck editor by introducing a new data validation mechanism to ensure the integrity of Puck data structures. It replaces deprecated components and improves error handling during data processing. The editor now features a more modular layout with custom header actions, enhancing user experience. Additionally, the default content structure for new pages has been streamlined, and loading states have been improved for better feedback during operations. Enhance EditPage and CreatePage components with improved content handling and loading states This update introduces a new state management for form loading in the EditPage component, ensuring a smoother user experience during data fetching. It enhances content processing by refining how JSON and HTML formats are handled, including better default content structures. Additionally, the CreatePage component has been updated to improve logging and error handling during form submissions. The PuckEditor has also been optimized for immediate data updates without debouncing, enhancing responsiveness during content editing. Refactor EditPage and CreatePage components for improved content handling and UI consistency This update enhances the EditPage and CreatePage components by refining content processing and ensuring a consistent user interface. It introduces better handling of Puck data structures, including default content setups and improved error logging. The layout has been streamlined for better readability, and loading states have been optimized for a smoother user experience during data operations. Additionally, the PuckEditor has been updated to ensure proper data structure validation and immediate updates during content changes. clean up Refactor EditPage component to streamline data fetching and cache management. Removed unnecessary refetching logic and improved cache invalidation on successful updates. Updated usePage hook to enhance data freshness and logging. Remove PageViewPage component and update navigation in PageList to reflect new URL structure. Enhance PageViewPage with improved error handling and user experience - Refactored PageViewPage to include better loading states and error handling for various scenarios, including connection errors and page not found. - Introduced a retry mechanism for failed data fetching attempts, enhancing user experience during network issues. - Added an ErrorBoundary component to gracefully handle rendering errors and provide user feedback. - Updated the AddComment component to improve submission handling and error messaging, ensuring a smoother commenting experience. - Enhanced PageComments component with better error display and retry options for loading comments. - Improved hooks for data fetching to ensure valid responses and added retry logic for better resilience.
…ng and remove debug logging This update enhances the EditPage and CreatePage components by streamlining content processing and ensuring a consistent user interface. It removes unnecessary debug logging to clean up the codebase and improve performance. Additionally, it refines how Puck data structures are handled, ensuring better default content setups and improved error handling during form submissions.
No description provided.