From 220389e74ead79bc7e7f44b3747c2cdb7c1c1237 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Wed, 29 Nov 2023 14:25:57 +0530 Subject: [PATCH] chore: issue peek overview (#2918) * chore: autorun for the issue detail store * fix: labels mutation * chore: remove old peek overview code * chore: move add to cycle and module logic to store * fix: build errors * chore: add peekProjectId query param for the peek overview * chore: update profile layout * fix: multiple workspaces * style: Issue activity and link design improvements in Peek overview. * fix issue with labels not occupying full widht. * fix links overflow issue. * add tooltip in links to display entire link. * add functionality to copy links to clipboard. * chore: peek overview for all the layouts * fix: build errors --------- Co-authored-by: Prateek Shourya Co-authored-by: sriram veeraghanta --- .../actions/issue-actions/actions-list.tsx | 2 +- .../actions/issue-actions/change-assignee.tsx | 2 +- .../actions/issue-actions/change-priority.tsx | 2 +- .../actions/issue-actions/change-state.tsx | 2 +- web/components/core/activity.tsx | 44 +-- web/components/core/sidebar/links-list.tsx | 28 +- .../sidebar/project-view-sidebar.tsx | 2 +- .../gantt-chart/sidebar/sidebar.tsx | 2 +- web/components/issues/index.ts | 2 +- .../calendar/base-calendar-root.tsx | 81 +++--- .../issue-layouts/calendar/calendar.tsx | 6 +- .../issue-layouts/calendar/day-tile.tsx | 20 +- .../issue-layouts/calendar/issue-blocks.tsx | 62 ++-- .../issue-layouts/calendar/week-days.tsx | 14 +- .../issue-layouts/gantt/base-gantt-root.tsx | 24 +- .../issues/issue-layouts/gantt/blocks.tsx | 66 ++--- .../issue-layouts/kanban/base-kanban-root.tsx | 21 +- .../issues/issue-layouts/kanban/block.tsx | 35 ++- .../issue-layouts/list/base-list-root.tsx | 16 +- .../issues/issue-layouts/list/block.tsx | 36 +-- .../roots/global-view-layout-root.tsx | 2 +- .../columns/issue/issue-column.tsx | 39 +-- .../issue/spreadsheet-issue-column.tsx | 11 - .../spreadsheet/spreadsheet-view.tsx | 33 +-- .../issues/issue-peek-overview/properties.tsx | 36 ++- .../issues/issue-peek-overview/root.tsx | 31 +- .../issues/issue-peek-overview/view.tsx | 6 +- .../peek-overview/full-screen-peek-view.tsx | 99 ------- .../issues/peek-overview/header.tsx | 110 ------- web/components/issues/peek-overview/index.ts | 7 - .../issues/peek-overview/issue-activity.tsx | 88 ------ .../issues/peek-overview/issue-details.tsx | 30 -- .../issues/peek-overview/issue-properties.tsx | 187 ------------ .../issues/peek-overview/layout.tsx | 188 ------------ .../issues/peek-overview/side-peek-view.tsx | 86 ------ .../issues/sidebar-select/cycle.tsx | 28 +- .../issues/sidebar-select/label.tsx | 126 ++++---- .../issues/sidebar-select/module.tsx | 46 +-- web/components/issues/sub-issues/issue.tsx | 272 +++++++++--------- .../issues/sub-issues/issues-list.tsx | 60 ++-- web/components/issues/sub-issues/root.tsx | 12 +- web/pages/profile/index.tsx | 1 - web/services/module.service.ts | 9 +- web/store/cycle/cycle_issue.store.ts | 2 +- .../cycle/cycle_issue_calendar_view.store.ts | 2 +- .../cycle/cycle_issue_kanban_view.store.ts | 4 +- web/store/issue/issue.store.ts | 2 +- web/store/issue/issue_calendar_view.store.ts | 2 +- web/store/issue/issue_detail.store.ts | 137 ++------- web/store/issue/issue_kanban_view.store.ts | 4 +- .../project-issues/module/issue.store.ts | 8 +- web/store/module/module_issue.store.ts | 2 +- .../module_issue_calendar_view.store.ts | 2 +- .../module/module_issue_kanban_view.store.ts | 4 +- .../project_view_issue_calendar_view.store.ts | 2 +- .../project-view/project_view_issues.store.ts | 2 +- 56 files changed, 637 insertions(+), 1510 deletions(-) delete mode 100644 web/components/issues/peek-overview/full-screen-peek-view.tsx delete mode 100644 web/components/issues/peek-overview/header.tsx delete mode 100644 web/components/issues/peek-overview/index.ts delete mode 100644 web/components/issues/peek-overview/issue-activity.tsx delete mode 100644 web/components/issues/peek-overview/issue-details.tsx delete mode 100644 web/components/issues/peek-overview/issue-properties.tsx delete mode 100644 web/components/issues/peek-overview/layout.tsx delete mode 100644 web/components/issues/peek-overview/side-peek-view.tsx diff --git a/web/components/command-palette/actions/issue-actions/actions-list.tsx b/web/components/command-palette/actions/issue-actions/actions-list.tsx index 73a021cf8..8e188df7b 100644 --- a/web/components/command-palette/actions/issue-actions/actions-list.tsx +++ b/web/components/command-palette/actions/issue-actions/actions-list.tsx @@ -30,7 +30,7 @@ export const CommandPaletteIssueActions: React.FC = observer((props) => { const { commandPalette: { toggleCommandPaletteModal, toggleDeleteIssueModal }, - issueDetail: { updateIssue }, + projectIssues: { updateIssue }, user: { currentUser }, } = useMobxStore(); diff --git a/web/components/command-palette/actions/issue-actions/change-assignee.tsx b/web/components/command-palette/actions/issue-actions/change-assignee.tsx index 4b7ee6b99..57af2b62a 100644 --- a/web/components/command-palette/actions/issue-actions/change-assignee.tsx +++ b/web/components/command-palette/actions/issue-actions/change-assignee.tsx @@ -21,7 +21,7 @@ export const ChangeIssueAssignee: React.FC = observer((props) => { const { workspaceSlug, projectId } = router.query; // store const { - issueDetail: { updateIssue }, + projectIssues: { updateIssue }, projectMember: { projectMembers }, } = useMobxStore(); diff --git a/web/components/command-palette/actions/issue-actions/change-priority.tsx b/web/components/command-palette/actions/issue-actions/change-priority.tsx index bda152c33..81b9f7ae9 100644 --- a/web/components/command-palette/actions/issue-actions/change-priority.tsx +++ b/web/components/command-palette/actions/issue-actions/change-priority.tsx @@ -23,7 +23,7 @@ export const ChangeIssuePriority: React.FC = observer((props) => { const { workspaceSlug, projectId } = router.query; const { - issueDetail: { updateIssue }, + projectIssues: { updateIssue }, } = useMobxStore(); const submitChanges = async (formData: Partial) => { diff --git a/web/components/command-palette/actions/issue-actions/change-state.tsx b/web/components/command-palette/actions/issue-actions/change-state.tsx index 5b147e499..0ce05bd7b 100644 --- a/web/components/command-palette/actions/issue-actions/change-state.tsx +++ b/web/components/command-palette/actions/issue-actions/change-state.tsx @@ -24,7 +24,7 @@ export const ChangeIssueState: React.FC = observer((props) => { const { projectState: { projectStates }, - issueDetail: { updateIssue }, + projectIssues: { updateIssue }, } = useMobxStore(); const submitChanges = async (formData: Partial) => { diff --git a/web/components/core/activity.tsx b/web/components/core/activity.tsx index fb2df6496..ae253ac64 100644 --- a/web/components/core/activity.tsx +++ b/web/components/core/activity.tsx @@ -226,31 +226,12 @@ const activityDetails: { }, icon: , }, - duplicate: { - message: (activity) => { - if (activity.old_value === "") - return ( - <> - marked this issue as duplicate of{" "} - {activity.new_value}. - - ); - else - return ( - <> - removed this issue as a duplicate of{" "} - {activity.old_value}. - - ); - }, - icon: , - }, cycles: { message: (activity, showIssue, workspaceSlug) => { if (activity.verb === "created") return ( <> - added this issue to the cycle + added this issue to the cycle