Skip to content

Conversation

@Avdhesh-Varshney
Copy link
Collaborator

Pull Requests Review Criteria

Caution

PRs that fail to meet these review standards will be automatically flagged and may be rejected by maintainers.

  • Filled out this PR template properly
  • Did not commit directly to main
  • Limited commits (max 3–4 unless permitted by Admin/Mentors)
  • Added comments in complex parts of code

Describe the add-ons or changes you've made 📃

  • Re setup editor module with proper state-management
  • Re setup manage articles module

@Avdhesh-Varshney Avdhesh-Varshney self-assigned this Jan 19, 2026
@Avdhesh-Varshney Avdhesh-Varshney added the enhancement New feature or request label Jan 19, 2026
@vercel
Copy link

vercel bot commented Jan 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
code-a2z Ready Ready Preview, Comment Jan 19, 2026 4:46pm
code-a2z-server Ready Ready Preview, Comment Jan 19, 2026 4:46pm

@github-actions
Copy link

Thank you for submitting your pull request! We'll review it as soon as possible. For further communication, join our discord server https://discord.gg/tSqtvHUJzE.

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 PR reorganizes the editor module from a standalone location (modules/editor) to a nested location under the home module (modules/home/modules/editor/v1) and re-establishes the manage articles functionality (previously manage-projects) within the settings module with improved state management. The changes include moving shared constants to a central location, adding new routing configurations, and updating import paths throughout the affected modules.

Changes:

  • Relocated editor module from modules/editor to modules/home/modules/editor/v1 with route integration under home routes
  • Moved default thumbnail constants from editor-specific constants to shared constants directory
  • Added manage-articles module under settings with search functionality and state management via Jotai
  • Updated Header component to support sticky positioning and flexible action rendering (desktopNode, mobileIcon props)

Reviewed changes

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

Show a summary per file
File Description
client/src/shared/constants/index.ts Added shared default thumbnail constants (light and dark)
client/src/shared/components/organisms/header/typings/index.ts Extended HeaderAction interface with optional desktopNode and mobileIcon props
client/src/shared/components/organisms/header/index.tsx Made header sticky and added support for custom desktop nodes
client/src/shared/components/organisms/header/components/render-mobile-menu.tsx Added mobile icon fallback support
client/src/modules/settings/routes/index.tsx Added manage-articles route and navigation item
client/src/modules/settings/modules/manage-articles/v1/states/index.ts Fixed import path for project types
client/src/modules/settings/modules/manage-articles/v1/index.tsx New manage articles page with search and pagination
client/src/modules/settings/modules/manage-articles/v1/hooks/index.ts Refactored hook with search handling and load more functionality
client/src/modules/settings/modules/manage-articles/v1/components/publish-articles.tsx Published articles card component with improved styling
client/src/modules/settings/modules/manage-articles/v1/components/draft-articles.tsx Draft articles card component with improved styling
client/src/modules/settings/modules/index.tsx Exported ManageArticlesLazyComponentV1
client/src/modules/manage-projects/index.tsx Deleted old manage-projects component
client/src/modules/home/v1/index.tsx Updated editor link to use route constants
client/src/modules/home/v1/components/banner-project-card.tsx Updated thumbnail constants import path
client/src/modules/home/routes/index.tsx Added editor routes under home module
client/src/modules/home/modules/project/v1/index.tsx Updated thumbnail constants import path
client/src/modules/home/modules/project/v1/components/project-interaction.tsx Fixed edit link to use route constants
client/src/modules/home/modules/index.tsx Exported EditorLazyComponentV1
client/src/modules/home/modules/editor/v1/states/index.ts Added DEFAULT_EDITOR_CONTENT constant and changed EditorContentAtom type
client/src/modules/home/modules/editor/v1/index.tsx New simplified editor entry component
client/src/modules/home/modules/editor/v1/hooks/use-project-editor.ts Refactored editor hooks with improved state updates
client/src/modules/home/modules/editor/v1/hooks/index.ts Removed unused loading state
client/src/modules/home/modules/editor/v1/constants/index.ts Moved and renamed constants (CHARACTER_LIMIT, TAG_LIMIT)
client/src/modules/home/modules/editor/v1/components/tools.tsx Updated upload image import path
client/src/modules/home/modules/editor/v1/components/text-editor.tsx New text editor component with EditorJS integration
client/src/modules/home/modules/editor/v1/components/publish-form.tsx Updated imports and constant names
client/src/modules/home/modules/editor/v1/components/project-editor.tsx Replaced EditorNavbar with Header component integration
client/src/modules/editor/index.tsx Deleted old editor entry component
client/src/modules/editor/constants/index.ts Deleted old constants file
client/src/modules/editor/components/tags.tsx Deleted unused tags component
client/src/modules/editor/components/editor-navbar.tsx Deleted old navbar, replaced by Header
client/src/app/routes/constants/routes.ts Added EDITOR routes and MANAGE_ARTICLES route constant
Comments suppressed due to low confidence (8)

client/src/modules/settings/modules/manage-articles/v1/components/draft-articles.tsx:140

  • The edit link uses a hardcoded path '/editor/:id' instead of using the route constants. This should use the proper route constants: ${ROUTES_V1.HOME}${ROUTES_HOME_V1.EDITOR_WITH_ID.replace(':project_id', _id)} to ensure consistency with the route definitions and prevent broken links if routes are changed in the future.
    client/src/modules/home/modules/editor/v1/hooks/use-project-editor.ts:127
  • The navigation path '/dashboard/projects?tab=draft' appears to be incorrect. Based on the route constants defined in this PR, the correct path should use ROUTES_V1.SETTINGS and ROUTES_SETTINGS_V1.MANAGE_ARTICLES with the query parameter '?tab=draft'. This should be updated to match the new routing structure, similar to line 234 where the published articles navigation correctly uses the new route constants.
    client/src/modules/settings/modules/manage-articles/v1/states/index.ts:2
  • The import path has been corrected, but the imported type names 'PublishedProjectsAtom' and 'DraftProjectsAtom' still reference 'Projects' instead of 'Articles'. These should be renamed throughout the module to match the 'manage-articles' naming convention for consistency.
    client/src/modules/settings/modules/manage-articles/v1/hooks/index.ts:21
  • The hook variables 'publishedProjects', 'draftProjects', and function 'fetchProjects' use 'projects' terminology instead of 'articles', which is inconsistent with the hook name 'useManageArticles' and the module's purpose. Consider renaming to 'publishedArticles', 'draftArticles', and 'fetchArticles' for naming consistency.
    client/src/modules/settings/modules/manage-articles/v1/components/draft-articles.tsx:85
  • The Card styling with hover effects, transitions, and responsive design is duplicated between the draft-articles and publish-articles components. Consider extracting this common styling into a shared component or a reusable sx prop object to reduce code duplication and maintain consistency. This improves maintainability when styling needs to change.
    client/src/modules/home/modules/editor/v1/states/index.ts:23
  • The DEFAULT_EDITOR_CONTENT initializes content as '{ blocks: [] }' which is consistent OutputData format. However, the EditorContent interface type (defined earlier in the file) allows 'OutputData[] | OutputData'. This union type creates ambiguity and requires array checks throughout the codebase. The default value correctly uses OutputData format, but the type definition should be simplified to just OutputData to eliminate confusion and unnecessary type checking.
    client/src/modules/settings/modules/manage-articles/v1/states/index.ts:9
  • The interface name 'ManageProjectsPaginationState' and variable names 'publishedProjects', 'draftProjects' still refer to 'projects' rather than 'articles', which is inconsistent with the module's purpose of managing articles. Consider renaming these to 'ManageArticlesPaginationState', 'publishedArticles', and 'draftArticles' to maintain consistency with the module name 'manage-articles' and improve code clarity.
    client/src/modules/settings/modules/manage-articles/v1/components/publish-articles.tsx:190
  • The edit link uses a hardcoded path '/editor/:id' instead of using the route constants. This should use the proper route constants: ${ROUTES_V1.HOME}${ROUTES_HOME_V1.EDITOR_WITH_ID.replace(':project_id', _id)} to ensure consistency with the route definitions and prevent broken links if routes are changed in the future.

Comment on lines +50 to +57
<Box
sx={{
position: 'sticky',
top: 0,
zIndex: theme => theme.zIndex.appBar,
bgcolor: 'background.paper',
}}
>
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Header component is now always sticky at the top with position sticky and zIndex appBar. However, this change affects all instances of the Header component across the application, not just the editor. This could lead to unexpected behavior in other pages where a sticky header might not be desired. Consider making the sticky positioning optional through a prop like 'sticky' or 'position' to allow per-page customization.

Copilot uses AI. Check for mistakes.
@Avdhesh-Varshney Avdhesh-Varshney merged commit db8b7a3 into main Jan 19, 2026
4 checks passed
@Avdhesh-Varshney Avdhesh-Varshney deleted the avdhesh/projects-manage-and-editor branch January 19, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants