Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions apps/web/core/components/cycles/quick-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,7 @@ export const CycleQuickActions: React.FC<Props> = observer((props) => {
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({
elementName: CYCLE_TRACKER_ELEMENTS.QUICK_ACTIONS,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ export const IssueAttachmentsListItem: FC<TIssueAttachmentsListItem> = observer(

<CustomMenu ellipsis closeOnSelect placement="bottom-end" disabled={disabled}>
<CustomMenu.MenuItem
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
toggleDeleteAttachmentModal(attachmentId);
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ export const RelationActionButton: FC<Props> = observer((props) => {
return (
<CustomMenu.MenuItem
key={index}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
handleOnClick(item.key as TIssueRelationTypes);
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ export const SubIssuesListItem: React.FC<Props> = observer((props) => {
<CustomMenu placement="bottom-end" ellipsis>
{canEdit && (
<CustomMenu.MenuItem
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
handleIssueCrudState("update", parentIssueId, { ...issue });
toggleCreateIssueModal(true);
}}
Expand All @@ -200,9 +198,7 @@ export const SubIssuesListItem: React.FC<Props> = observer((props) => {
)}

<CustomMenu.MenuItem
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
onClick={() => {
subIssueOperations.copyLink(workItemLink);
}}
>
Expand All @@ -214,9 +210,7 @@ export const SubIssuesListItem: React.FC<Props> = observer((props) => {

{canEdit && (
<CustomMenu.MenuItem
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
onClick={() => {
if (issue.project_id)
subIssueOperations.removeSubIssue(workspaceSlug, issue.project_id, parentIssueId, issue.id);
}}
Expand All @@ -232,9 +226,7 @@ export const SubIssuesListItem: React.FC<Props> = observer((props) => {

{canEdit && (
<CustomMenu.MenuItem
onClick={(e) => {
e.stopPropagation();
e.preventDefault();
onClick={() => {
handleIssueCrudState("delete", parentIssueId, issue);
toggleDeleteIssueModal(issue.id);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ export const SubIssuesActionButton: FC<Props> = observer((props) => {
{optionItems.map((item, index) => (
<CustomMenu.MenuItem
key={index}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
item.onClick();
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ export const IssueLinkItem: FC<TIssueLinkItem> = observer((props) => {
>
<CustomMenu.MenuItem
className="flex items-center gap-2"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
toggleIssueLinkModal(true);
}}
>
Expand All @@ -106,9 +104,7 @@ export const IssueLinkItem: FC<TIssueLinkItem> = observer((props) => {
</CustomMenu.MenuItem>
<CustomMenu.MenuItem
className="flex items-center gap-2"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
linkOperations.remove(linkDetail.id);
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,7 @@ export const AllIssueQuickActions: React.FC<IQuickActionProps> = observer((props
{item.nestedMenuItems.map((nestedItem) => (
<CustomMenu.MenuItem
key={nestedItem.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.QUICK_ACTIONS.GLOBAL_VIEW });
nestedItem.action();
}}
Expand Down Expand Up @@ -213,9 +211,7 @@ export const AllIssueQuickActions: React.FC<IQuickActionProps> = observer((props
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.QUICK_ACTIONS.GLOBAL_VIEW });
item.action();
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ export const ArchivedIssueQuickActions: React.FC<IQuickActionProps> = observer((
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
item.action();
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.QUICK_ACTIONS.ARCHIVED });
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,7 @@ export const CycleIssueQuickActions: React.FC<IQuickActionProps> = observer((pro
{item.nestedMenuItems.map((nestedItem) => (
<CustomMenu.MenuItem
key={nestedItem.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.QUICK_ACTIONS.CYCLE });
nestedItem.action();
}}
Expand Down Expand Up @@ -230,9 +228,7 @@ export const CycleIssueQuickActions: React.FC<IQuickActionProps> = observer((pro
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.QUICK_ACTIONS.CYCLE });
item.action();
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,7 @@ export const WorkItemDetailQuickActions: React.FC<TWorkItemDetailQuickActionProp
{item.nestedMenuItems.map((nestedItem) => (
<CustomMenu.MenuItem
key={nestedItem.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.QUICK_ACTIONS.PROJECT_VIEW });
nestedItem.action();
}}
Expand Down Expand Up @@ -314,9 +312,7 @@ export const WorkItemDetailQuickActions: React.FC<TWorkItemDetailQuickActionProp
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.QUICK_ACTIONS.PROJECT_VIEW });
item.action();
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ export const ModuleIssueQuickActions: React.FC<IQuickActionProps> = observer((pr
{item.nestedMenuItems.map((nestedItem) => (
<CustomMenu.MenuItem
key={nestedItem.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.QUICK_ACTIONS.MODULE });
nestedItem.action();
}}
Expand Down Expand Up @@ -229,9 +227,7 @@ export const ModuleIssueQuickActions: React.FC<IQuickActionProps> = observer((pr
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.QUICK_ACTIONS.MODULE });
item.action();
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,7 @@ export const ProjectIssueQuickActions: React.FC<IQuickActionProps> = observer((p
{item.nestedMenuItems.map((nestedItem) => (
<CustomMenu.MenuItem
key={nestedItem.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.QUICK_ACTIONS.PROJECT_VIEW });
nestedItem.action();
}}
Expand Down Expand Up @@ -230,9 +228,7 @@ export const ProjectIssueQuickActions: React.FC<IQuickActionProps> = observer((p
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({ elementName: WORK_ITEM_TRACKER_ELEMENTS.QUICK_ACTIONS.PROJECT_VIEW });
item.action();
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export const WorkspaceDraftIssueQuickActions: React.FC<Props> = observer((props)
{MENU_ITEMS.map((item) => (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
item.action();
}}
className={cn(
Expand Down
4 changes: 1 addition & 3 deletions apps/web/core/components/modules/quick-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ export const ModuleQuickActions: React.FC<Props> = observer((props) => {
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({
elementName: MODULE_TRACKER_ELEMENTS.QUICK_ACTIONS,
});
Expand Down
4 changes: 1 addition & 3 deletions apps/web/core/components/pages/dropdowns/actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,7 @@ export const PageActions: React.FC<Props> = observer((props) => {
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
item.action?.();
}}
className={cn("flex items-center gap-2", item.className)}
Expand Down
4 changes: 1 addition & 3 deletions apps/web/core/components/views/quick-actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ export const ViewQuickActions: React.FC<Props> = observer((props) => {
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({ elementName: PROJECT_VIEW_TRACKER_ELEMENTS.QUICK_ACTIONS });
item.action();
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ export const WorkspaceInvitationsListItem: FC<Props> = observer((props) => {
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
item.action();
}}
className={cn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ export const DefaultWorkspaceViewQuickActions: React.FC<Props> = observer((props
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
item.action();
}}
className={cn(
Expand Down
4 changes: 1 addition & 3 deletions apps/web/core/components/workspace/views/quick-action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ export const WorkspaceViewQuickActions: React.FC<Props> = observer((props) => {
return (
<CustomMenu.MenuItem
key={item.key}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({
elementName: GLOBAL_VIEW_TRACKER_ELEMENTS.QUICK_ACTIONS,
});
Expand Down
8 changes: 2 additions & 6 deletions apps/web/core/components/workspace/views/view-list-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ export const GlobalViewListItem: React.FC<Props> = observer((props) => {
<div className="flex items-center gap-4">
<CustomMenu ellipsis>
<CustomMenu.MenuItem
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({
elementName: GLOBAL_VIEW_TRACKER_ELEMENTS.LIST_ITEM,
});
Expand All @@ -66,9 +64,7 @@ export const GlobalViewListItem: React.FC<Props> = observer((props) => {
</span>
</CustomMenu.MenuItem>
<CustomMenu.MenuItem
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
onClick={() => {
captureClick({
elementName: GLOBAL_VIEW_TRACKER_ELEMENTS.LIST_ITEM,
});
Expand Down
Loading