From 686d0984e6848e980dc9858611e94c75ecbaffcc Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia Date: Fri, 10 May 2024 17:39:59 +0530 Subject: [PATCH] fix: calendar and spreadsheet layout quick action toggle event propogation --- .../issue-layouts/calendar/issue-block.tsx | 103 +++++++++-------- .../issue-layouts/spreadsheet/issue-row.tsx | 106 +++++++++--------- 2 files changed, 106 insertions(+), 103 deletions(-) diff --git a/web/components/issues/issue-layouts/calendar/issue-block.tsx b/web/components/issues/issue-layouts/calendar/issue-block.tsx index b9cf59d0a..c23204273 100644 --- a/web/components/issues/issue-layouts/calendar/issue-block.tsx +++ b/web/components/issues/issue-layouts/calendar/issue-block.tsx @@ -65,64 +65,61 @@ export const CalendarIssueBlock = observer( const placement = isMenuActionRefAboveScreenBottom ? "bottom-end" : "top-end"; return ( - handleIssuePeekOverview(issue)} - className="block w-full text-sm text-custom-text-100 rounded border-b md:border-[1px] border-custom-border-200 hover:border-custom-border-400" - disabled={!!issue?.tempId} - ref={ref} - > - <> - {issue?.tempId !== undefined && ( -
- )} - -
+ handleIssuePeekOverview(issue)} + className="block w-full text-sm text-custom-text-100 rounded border-b md:border-[1px] border-custom-border-200 hover:border-custom-border-400" + disabled={!!issue?.tempId} + ref={ref} + > + <> + {issue?.tempId !== undefined && ( +
)} - > -
- -
- {getProjectIdentifierById(issue?.project_id)}-{issue.sequence_id} -
- -
{issue.name}
-
-
+
{ - e.preventDefault(); - e.stopPropagation(); - }} + ref={blockRef} + className={cn( + "group/calendar-block flex h-10 md:h-8 w-full items-center justify-between gap-1.5 rounded md:px-1 px-4 py-1.5 ", + { + "bg-custom-background-90 shadow-custom-shadow-rg border-custom-primary-100": isDragging, + "bg-custom-background-100 hover:bg-custom-background-90": !isDragging, + "border border-custom-primary-70 hover:border-custom-primary-70": getIsIssuePeeked(issue.id), + } + )} > - {quickActions({ - issue, - parentRef: blockRef, - customActionButton, - placement, - })} +
+ +
+ {getProjectIdentifierById(issue?.project_id)}-{issue.sequence_id} +
+ +
{issue.name}
+
+
+
+ + +
+ - - +
+
); }) ); diff --git a/web/components/issues/issue-layouts/spreadsheet/issue-row.tsx b/web/components/issues/issue-layouts/spreadsheet/issue-row.tsx index c58b82597..1956ee883 100644 --- a/web/components/issues/issue-layouts/spreadsheet/issue-row.tsx +++ b/web/components/issues/issue-layouts/spreadsheet/issue-row.tsx @@ -206,61 +206,67 @@ const IssueRowDetails = observer((props: IssueRowDetailsProps) => { return ( <> - handleIssuePeekOverview(issueDetail)} - className={cn( - "group clickable cursor-pointer h-11 w-[28rem] flex items-center bg-custom-background-100 text-sm after:absolute border-r-[0.5px] z-10 border-custom-border-200", - { - "border-b-[0.5px]": !getIsIssuePeeked(issueDetail.id), - "border border-custom-primary-70 hover:border-custom-primary-70": getIsIssuePeeked(issueDetail.id), - "shadow-[8px_22px_22px_10px_rgba(0,0,0,0.05)]": isScrolled.current, - } - )} - disabled={!!issueDetail?.tempId} - > -
+ handleIssuePeekOverview(issueDetail)} + className={cn( + "clickable cursor-pointer h-11 w-[28rem] flex items-center bg-custom-background-100 text-sm after:absolute border-r-[0.5px] z-10 border-custom-border-200", + { + "border-b-[0.5px]": !getIsIssuePeeked(issueDetail.id), + "border border-custom-primary-70 hover:border-custom-primary-70": getIsIssuePeeked(issueDetail.id), + "shadow-[8px_22px_22px_10px_rgba(0,0,0,0.05)]": isScrolled.current, + } + )} + disabled={!!issueDetail?.tempId} > -
- {/* bulk ops */} - -
- {subIssuesCount > 0 && ( - - )} +
+
+ {/* bulk ops */} + +
+ {subIssuesCount > 0 && ( + + )} +
+ + +
+

+ {getProjectIdentifierById(issueDetail.project_id)}-{issueDetail.sequence_id} +

+
+
- -
-

- {getProjectIdentifierById(issueDetail.project_id)}-{issueDetail.sequence_id} -

-
-
-
- -
-
-
- -
- {issueDetail.name} -
-
+
+
+
+ +
+ {issueDetail.name} +
+
+
+
+ + +
{quickActions({ issue: issueDetail, @@ -270,7 +276,7 @@ const IssueRowDetails = observer((props: IssueRowDetailsProps) => { })}
- +
{/* Rest of the columns */} {spreadsheetColumnsList.map((property) => (