From fa239b1631965f909a2d5db2f8ba9da1d26f1e90 Mon Sep 17 00:00:00 2001 From: Mihir <82092317+Jimmycutie@users.noreply.github.com> Date: Thu, 5 Sep 2024 20:03:43 +0530 Subject: [PATCH 1/4] Updated control block to cover the whole element --- .../issues/issue-layouts/list/block.tsx | 280 +++++++++--------- 1 file changed, 139 insertions(+), 141 deletions(-) diff --git a/web/core/components/issues/issue-layouts/list/block.tsx b/web/core/components/issues/issue-layouts/list/block.tsx index 9dfdb736556..9ad44913813 100644 --- a/web/core/components/issues/issue-layouts/list/block.tsx +++ b/web/core/components/issues/issue-layouts/list/block.tsx @@ -133,152 +133,125 @@ export const IssueBlock = observer((props: IssueBlockProps) => { const keyMinWidth = (projectIdentifier?.length ?? 0) * 7; return ( - { - if (!canDrag) { - setToast({ - type: TOAST_TYPE.WARNING, - title: "Cannot move issue", - message: "Drag and drop is disabled for the current grouping", - }); - } - }} + handleIssuePeekOverview(issue)} + className="w-full truncate cursor-pointer text-sm text-custom-text-100" + disabled={!!issue?.tempId} > -
-
-
- {/* select checkbox */} - {projectId && canSelectIssues && ( - - Only issues within the current -
- project can be selected. - - } - disabled={issue.project_id === projectId} - renderByDefault={false} - > -
- + { + if (!canDrag) { + setToast({ + type: TOAST_TYPE.WARNING, + title: "Cannot move issue", + message: "Drag and drop is disabled for the current grouping", + }); + } + }} + > +
+
+
+ {/* select checkbox */} + {projectId && canSelectIssues && ( + + Only issues within the current +
+ project can be selected. + + } + disabled={issue.project_id === projectId} + renderByDefault={false} + > +
+ +
+
+ )} + {displayProperties && displayProperties?.key && ( +
+ {issue.project_id && ( + + )}
- - )} - {displayProperties && displayProperties?.key && ( -
- {issue.project_id && ( - + )} + + {/* sub-issues chevron */} +
+ {subIssuesCount > 0 && ( + )}
- )} - {/* sub-issues chevron */} -
- {subIssuesCount > 0 && ( - + {issue?.tempId !== undefined && ( +
)}
- {issue?.tempId !== undefined && ( -
- )} -
- - {issue?.is_draft ? ( - -

{issue.name}

-
- ) : ( - handleIssuePeekOverview(issue)} - className="w-full truncate cursor-pointer text-sm text-custom-text-100" - disabled={!!issue?.tempId} - > + {issue?.is_draft ? ( + +

{issue.name}

+
+ ) : (

{issue.name}

-
- )} -
- {!issue?.tempId && ( -
- {quickActions({ - issue, - parentRef: issueRef, - })} + )}
- )} -
-
- {!issue?.tempId ? ( - <> - + {!issue?.tempId && (
{quickActions({ @@ -286,13 +259,38 @@ export const IssueBlock = observer((props: IssueBlockProps) => { parentRef: issueRef, })}
- - ) : ( -
- -
- )} -
- + )} +
+
+ {!issue?.tempId ? ( + <> + +
+ {quickActions({ + issue, + parentRef: issueRef, + })} +
+ + ) : ( +
+ +
+ )} +
+ + ); }); From 2a6bf1240af55bd8cc473c4d4c8033db064150ad Mon Sep 17 00:00:00 2001 From: Mihir <82092317+Jimmycutie@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:52:31 +0530 Subject: [PATCH 2/4] Updated the control link to cover the whole issues and relation blocks --- .../issues/relations/issue-list-item.tsx | 142 ++++----- .../issues/sub-issues/issue-list-item.tsx | 271 +++++++++--------- 2 files changed, 206 insertions(+), 207 deletions(-) diff --git a/web/core/components/issues/relations/issue-list-item.tsx b/web/core/components/issues/relations/issue-list-item.tsx index f63a1dae38f..ac7a7fff600 100644 --- a/web/core/components/issues/relations/issue-list-item.tsx +++ b/web/core/components/issues/relations/issue-list-item.tsx @@ -90,86 +90,86 @@ export const RelationIssueListItem: FC = observer((props) => { return (
- {issue && ( -
- -
-
-
- {projectDetail && ( - - )} -
+ handleIssuePeekOverview(issue)} + className="w-full line-clamp-1 cursor-pointer text-sm text-custom-text-100" + > + {issue && ( +
+ +
+
+
+ {projectDetail && ( + + )} +
- handleIssuePeekOverview(issue)} - className="w-full line-clamp-1 cursor-pointer text-sm text-custom-text-100" - > {issue.name} - -
-
- -
-
- - {!disabled && ( - -
- - Edit issue -
-
- )} - - -
- - Copy issue link -
-
- - {!disabled && ( - +
+
+ +
+
+ + {!disabled && ( + +
+ + Edit issue +
+
+ )} + +
- - Remove relation + + Copy issue link
- )} - {!disabled && ( - -
- - Delete issue -
-
- )} -
+ {!disabled && ( + +
+ + Remove relation +
+
+ )} + + {!disabled && ( + +
+ + Delete issue +
+
+ )} + +
-
- )} + )} +
); }); diff --git a/web/core/components/issues/sub-issues/issue-list-item.tsx b/web/core/components/issues/sub-issues/issue-list-item.tsx index d86f0a93e8b..cd645c0068f 100644 --- a/web/core/components/issues/sub-issues/issue-list-item.tsx +++ b/web/core/components/issues/sub-issues/issue-list-item.tsx @@ -85,159 +85,158 @@ export const IssueListItem: React.FC = observer((props) => { return (
- {issue && ( -
-
- {/* disable the chevron when current issue is also the root issue*/} - {subIssueCount > 0 && !isCurrentIssueRoot && ( - <> - {subIssueHelpers.preview_loader.includes(issue.id) ? ( -
- -
- ) : ( -
{ - if (!subIssueHelpers.issue_visibility.includes(issueId)) { - setSubIssueHelpers(parentIssueId, "preview_loader", issueId); - await subIssueOperations.fetchSubIssues(workspaceSlug, projectId, issueId); - setSubIssueHelpers(parentIssueId, "preview_loader", issueId); - } - setSubIssueHelpers(parentIssueId, "issue_visibility", issueId); - }} - > - -
- )} - - )} -
- -
-
-
- {projectDetail && ( - + handleIssuePeekOverview(issue)} + className="w-full line-clamp-1 cursor-pointer text-sm text-custom-text-100" + > + {issue && ( +
+
+ {/* disable the chevron when current issue is also the root issue*/} + {subIssueCount > 0 && !isCurrentIssueRoot && ( + <> + {subIssueHelpers.preview_loader.includes(issue.id) ? ( +
+ +
+ ) : ( +
{ + if (!subIssueHelpers.issue_visibility.includes(issueId)) { + setSubIssueHelpers(parentIssueId, "preview_loader", issueId); + await subIssueOperations.fetchSubIssues(workspaceSlug, projectId, issueId); + setSubIssueHelpers(parentIssueId, "preview_loader", issueId); + } + setSubIssueHelpers(parentIssueId, "issue_visibility", issueId); + }} + > + +
+ )} + )}
- handleIssuePeekOverview(issue)} - className="w-full line-clamp-1 cursor-pointer text-sm text-custom-text-100" - > +
+
+
+ {projectDetail && ( + + )} +
{issue.name} - -
+
-
- -
+
+ +
-
- - {disabled && ( - { - handleIssueCrudState("update", parentIssueId, { ...issue }); - toggleCreateIssueModal(true); - }} - > -
- - Edit issue -
-
- )} +
+ + {disabled && ( + { + handleIssueCrudState("update", parentIssueId, { ...issue }); + toggleCreateIssueModal(true); + }} + > +
+ + Edit issue +
+
+ )} - - subIssueOperations.copyText(`${workspaceSlug}/projects/${issue.project_id}/issues/${issue.id}`) - } - > -
- - Copy issue link -
-
- - {disabled && ( { - issue.project_id && - subIssueOperations.removeSubIssue(workspaceSlug, issue.project_id, parentIssueId, issue.id); - }} + onClick={() => + subIssueOperations.copyText(`${workspaceSlug}/projects/${issue.project_id}/issues/${issue.id}`) + } >
- - Remove parent issue + + Copy issue link
- )} - {disabled && ( - { - handleIssueCrudState("delete", parentIssueId, issue); - toggleDeleteIssueModal(issue.id); - }} - > -
- - Delete issue -
-
- )} -
+ {disabled && ( + { + issue.project_id && + subIssueOperations.removeSubIssue(workspaceSlug, issue.project_id, parentIssueId, issue.id); + }} + > +
+ + Remove parent issue +
+
+ )} + + {disabled && ( + { + handleIssueCrudState("delete", parentIssueId, issue); + toggleDeleteIssueModal(issue.id); + }} + > +
+ + Delete issue +
+
+ )} + +
-
- )} - - {/* should not expand the current issue if it is also the root issue*/} - {subIssueHelpers.issue_visibility.includes(issueId) && - issue.project_id && - subIssueCount > 0 && - !isCurrentIssueRoot && ( - )} + + {/* should not expand the current issue if it is also the root issue*/} + {subIssueHelpers.issue_visibility.includes(issueId) && + issue.project_id && + subIssueCount > 0 && + !isCurrentIssueRoot && ( + + )} +
); }); From 529aab15de04be5dbe7ced704a7a44e552fc0376 Mon Sep 17 00:00:00 2001 From: Mihir <82092317+Jimmycutie@users.noreply.github.com> Date: Fri, 13 Sep 2024 18:38:04 +0530 Subject: [PATCH 3/4] updated word wrap in notifications --- .../workspace-notifications/sidebar/notification-card/item.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/core/components/workspace-notifications/sidebar/notification-card/item.tsx b/web/core/components/workspace-notifications/sidebar/notification-card/item.tsx index 023524f30cf..cf4818c821e 100644 --- a/web/core/components/workspace-notifications/sidebar/notification-card/item.tsx +++ b/web/core/components/workspace-notifications/sidebar/notification-card/item.tsx @@ -86,7 +86,7 @@ export const NotificationItem: FC = observer((props) => {
-
+
{!notification.message ? ( <> From 3f80dd36c7103790e3a88520c173c5ac7bd4aef0 Mon Sep 17 00:00:00 2001 From: Mihir <82092317+Jimmycutie@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:03:32 +0530 Subject: [PATCH 4/4] Reverted break words as its a different issue. --- .../workspace-notifications/sidebar/notification-card/item.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/core/components/workspace-notifications/sidebar/notification-card/item.tsx b/web/core/components/workspace-notifications/sidebar/notification-card/item.tsx index cf4818c821e..023524f30cf 100644 --- a/web/core/components/workspace-notifications/sidebar/notification-card/item.tsx +++ b/web/core/components/workspace-notifications/sidebar/notification-card/item.tsx @@ -86,7 +86,7 @@ export const NotificationItem: FC = observer((props) => {
-
+
{!notification.message ? ( <>