[FEAT] implement modules page projects modules#34
[FEAT] implement modules page projects modules#34nazarli-shabnam wants to merge 17 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the project Modules experience by moving modules toolbar controls into ProjectSectionHeader, adding list/gallery/timeline layouts with URL-driven search/layout params, and introducing a new “Create module” modal backed by a new moduleService.create() API call.
Changes:
- Added
moduleService.create()plus aCreateModulePayloadtype for module creation. - Reworked
ModulesPageto render modules in list/gallery/timeline layouts and filter by?search=.../?layout=.... - Enhanced
ProjectSectionHeaderwith a project switcher dropdown, modules search/layout controls, and aCreateModuleModalintegration.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| ui/src/services/moduleService.ts | Adds a typed create() method for the modules API. |
| ui/src/pages/ModulesPage.tsx | Adds search/layout-driven module rendering + new layouts. |
| ui/src/components/layout/PageHeader.tsx | Adds project dropdown, modules toolbar controls, and wires up module creation modal + URL params. |
| ui/src/components/CreateModuleModal.tsx | New modal UI for module creation (dates/status + lead/members UI). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| description: description.trim() || undefined, | ||
| status: status || "backlog", | ||
| start_date: startDate || undefined, | ||
| target_date: endDate || undefined, |
| new Date(s).toLocaleDateString("en-US", { | ||
| month: "short", | ||
| day: "numeric", | ||
| year: "numeric", | ||
| }); |
| start_date?: string | null; | ||
| target_date?: string | null; |
| const parse = (iso: string) => { | ||
| const d = new Date(iso); | ||
| return { m: d.getMonth(), d: d.getDate(), y: d.getFullYear() }; | ||
| }; |
…ters, Add work item)
There was a problem hiding this comment.
Pull request overview
This PR extends the UI’s “Modules” feature set by adding module detail routing and module-related client APIs, while also improving the module creation/work-item flows and standardizing Tailwind CSS variable usage across many components.
Changes:
- Added module detail navigation (
/projects/:projectId/modules/:moduleId) plus new module filtering/favorites state and UI panels. - Expanded
moduleServicewithget,create, andlistIssueIdshelpers and extendedModuleApiResponsewith optionallead_id. - Refactored many UI components to use Tailwind v4 CSS variable shorthand classes (e.g.,
text-(--txt-secondary)) and introduced a few new modals/utilities.
Reviewed changes
Copilot reviewed 80 out of 81 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| ui/src/services/moduleService.ts | Adds module get/create + module-issue listing helper and create payload typing. |
| ui/src/routes/index.tsx | Adds lazy-loaded ModuleDetailPage and a new nested modules/:moduleId route. |
| ui/src/routes/ProtectedRoute.tsx | Updates loading state styling; file now includes a BOM character at start. |
| ui/src/routes/InstanceAdminProtectedRoute.tsx | Updates loading state styling; file now includes a BOM character at start. |
| ui/src/pages/setup/InstanceSetupWelcomePage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/setup/InstanceSetupConfigurePage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/setup/InstanceSetupCompletePage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/instance-admin/InstanceAdminWorkspacePage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/instance-admin/InstanceAdminLoginPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/instance-admin/InstanceAdminImagePage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/instance-admin/InstanceAdminGeneralPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/instance-admin/InstanceAdminEmailPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/instance-admin/InstanceAdminCreateWorkspacePage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/instance-admin/InstanceAdminAuthenticationPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/instance-admin/InstanceAdminAIPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/WorkspaceHomePage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/ViewsPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/ProjectsListPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/ProjectHomePage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/PagesPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/NotificationsPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/LoginPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/IssueListPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/InviteSignUpPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/InviteAcceptPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/DraftsPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/CyclesPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/BoardPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/ArchivesPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/AnalyticsWorkItemsPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/pages/AnalyticsOverviewPage.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/lib/slug.ts | Adds slugify helper used for module URL slugs. |
| ui/src/hooks/useModuleFavorites.ts | Adds localStorage-backed module favorites hook. |
| ui/src/contexts/ModulesFilterContext.tsx | Introduces modules filter context + provider and hooks. |
| ui/src/components/workspace-views/index.ts | Exports the new ModuleFiltersPanel. |
| ui/src/components/workspace-views/WorkspaceViewsLayoutSelector.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/workspace-views/WorkspaceViewsFiltersShared.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/workspace-views/WorkspaceViewsFiltersPanel.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/workspace-views/WorkspaceViewsFiltersDropdown.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/workspace-views/WorkspaceViewsFiltersData.tsx | Tailwind CSS variable class refactor (icons/borders). |
| ui/src/components/workspace-views/WorkspaceViewsEllipsisMenu.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/workspace-views/WorkspaceViewsDisplayPanel.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/workspace-views/WorkspaceViewsDisplayDropdown.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/workspace-views/ModuleFiltersPanel.tsx | Adds modules-specific filter UI (status/lead/members/date presets). |
| ui/src/components/workspace-views/DateRangeModal.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/workspace-views/CreateViewModal.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/work-item/SelectParentModal.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/work-item/Dropdown.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/work-item/DatePickerTrigger.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/work-item/CommentEditor.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/ui/Skeleton.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/ui/Modal.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/ui/Input.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/ui/Card.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/ui/Button.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/ui/Badge.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/ui/Avatar.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/layout/InstanceAdminLayout.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/layout/Header.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/layout/AppShell.tsx | Wraps shell with ModulesFilterProvider and refactors Tailwind classes. |
| ui/src/components/instance-admin/CreateWorkspaceSetupHint.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/UploadImageModal.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/SetupGate.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/RootRedirect.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/ProjectNetworkSelect.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/ProjectLeadSelect.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/ProjectIconModal.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/CreateProjectModal.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/CoverImageModal.tsx | Tailwind CSS variable class refactor; file now includes a BOM character at start. |
| ui/src/components/AddExistingWorkItemModal.tsx | Adds modal to bulk-add existing work items to a module. |
| ui/src/api/types.ts | Extends ModuleApiResponse with optional lead_id. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| @@ -1,4 +1,4 @@ | |||
| import { Navigate, useLocation } from "react-router-dom"; | |||
| import { Navigate, useLocation } from "react-router-dom"; | |||
| <WorkspaceViewsStateProvider> | ||
| <div className="flex h-screen flex-col overflow-hidden bg-[var(--bg-screen)] p-3"> | ||
| <div className="flex min-h-0 flex-1 overflow-hidden rounded-[var(--radius-lg)] bg-[var(--bg-surface-1)] shadow-[var(--shadow-container)]"> | ||
| <Sidebar /> | ||
| <main className="flex min-h-0 flex-1 flex-col overflow-hidden bg-[var(--bg-canvas)]"> | ||
| <PageHeader /> | ||
| <div | ||
| className={`main-content-scroll min-h-0 flex-1 overflow-auto p-[var(--padding-page)] ${isViewsRoute ? "pl-0" : ""}`} | ||
| > | ||
| <Outlet /> | ||
| </div> | ||
| </main> | ||
| <ModulesFilterProvider> | ||
| <div className="flex h-screen flex-col overflow-hidden bg-(--bg-screen) p-3"> | ||
| <div className="flex min-h-0 flex-1 overflow-hidden rounded-(--radius-lg) bg-(--bg-surface-1) shadow-(--shadow-container)"> | ||
| <Sidebar /> | ||
| <main className="flex min-h-0 flex-1 flex-col overflow-hidden bg-(--bg-canvas)"> | ||
| <PageHeader /> | ||
| <div |
| {filteredMembers.length > 8 && ( | ||
| <button | ||
| type="button" | ||
| className="px-3 py-1.5 text-left text-sm text-(--brand-default) hover:underline" | ||
| > | ||
| View all | ||
| </button> | ||
| )} |
| { | ||
| path: "modules/:moduleId", | ||
| element: ( | ||
| <Suspense fallback={<PageFallback />}> | ||
| <ModuleDetailPage /> | ||
| </Suspense> | ||
| ), | ||
| }, |
| await Promise.all( | ||
| Array.from(selectedIds).map((issueId) => | ||
| moduleService.addIssue(workspaceSlug, projectId, moduleId, issueId), | ||
| ), | ||
| ); |
| export interface CreateModulePayload { | ||
| name: string; | ||
| description?: string; | ||
| status?: string; | ||
| start_date?: string | null; | ||
| target_date?: string | null; | ||
| } |
This pull request primarily focuses on two areas: improving support for default module selection in the work item creation modal, and refactoring how CSS custom properties are used in class names throughout several UI components. Additionally, there are minor enhancements to API types.
Default module selection and modal improvements:
defaultModuleIdprop toCreateWorkItemModaland updated its state handling so that the module selection is properly initialized and reset when the modal opens or closes. This makes it easier to preselect a module when creating a new work item. [1] [2] [3] [4]Refactoring CSS custom property usage:
CoverImageModal.tsx,CreateProjectModal.tsx,CreateWorkItemModal.tsx) to use the--varCSS custom property syntax consistently in Tailwind class names, improving maintainability and consistency in styling. For example, changedbg-[var(--bg-surface-1)]tobg-(--bg-surface-1). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]API type enhancements:
lead_idproperty to theModuleApiResponsetype, allowing modules to optionally specify a lead.Minor improvements: