From 47681fe9f85c9e251035e3234cedf86359e95f64 Mon Sep 17 00:00:00 2001
From: rahulramesha <71900764+rahulramesha@users.noreply.github.com>
Date: Tue, 23 Jan 2024 20:45:44 +0530
Subject: [PATCH] fix: minor bug fixes and quality of life improvements (#3444)
* add concurrency to dev command to avaoid erroring out
* add context to issue activity
* minor quality of life improvement for exporter modal
* show the option to save draft issue only when there is content in name and description
* maintain commonality while referencing the user in activity
* fix minor changes in draft save issue modal logical condition
* minor change is state component for filter selection
* change logic for create issue activity
* change use last draft issue button to state control over previous on hover as that was inconsistent
---
package.json | 4 +--
.../ui/src/dropdowns/custom-search-select.tsx | 6 +++-
packages/ui/src/dropdowns/helper.tsx | 1 +
web/components/core/activity.tsx | 28 ++++++++--------
.../dashboard/widgets/recent-activity.tsx | 12 ++-----
web/components/exporter/export-modal.tsx | 11 ++++++-
.../filters/header/filters/state.tsx | 5 +--
web/components/issues/issue-modal/form.tsx | 2 +-
web/components/profile/overview/activity.tsx | 25 +++++++--------
.../workspace/sidebar-quick-action.tsx | 32 ++++++++++++++++---
web/pages/profile/activity.tsx | 13 ++++++--
11 files changed, 88 insertions(+), 51 deletions(-)
diff --git a/package.json b/package.json
index 97b793a5b..64bd22058 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,7 @@
],
"scripts": {
"build": "turbo run build",
- "dev": "turbo run dev",
+ "dev": "turbo run dev --concurrency=13",
"start": "turbo run start",
"lint": "turbo run lint",
"clean": "turbo run clean",
@@ -34,4 +34,4 @@
"@types/react": "18.2.42"
},
"packageManager": "yarn@1.22.19"
-}
+}
\ No newline at end of file
diff --git a/packages/ui/src/dropdowns/custom-search-select.tsx b/packages/ui/src/dropdowns/custom-search-select.tsx
index 9695eb931..44b91bb29 100644
--- a/packages/ui/src/dropdowns/custom-search-select.tsx
+++ b/packages/ui/src/dropdowns/custom-search-select.tsx
@@ -27,6 +27,7 @@ export const CustomSearchSelect = (props: ICustomSearchSelectProps) => {
onChange,
options,
onOpen,
+ onClose,
optionsClassName = "",
value,
tabIndex,
@@ -58,7 +59,10 @@ export const CustomSearchSelect = (props: ICustomSearchSelectProps) => {
setIsOpen(true);
if (referenceElement) referenceElement.focus();
};
- const closeDropdown = () => setIsOpen(false);
+ const closeDropdown = () => {
+ setIsOpen(false);
+ onClose && onClose();
+ };
const handleKeyDown = useDropdownKeyDown(openDropdown, closeDropdown, isOpen);
useOutsideClickDetector(dropdownRef, closeDropdown);
diff --git a/packages/ui/src/dropdowns/helper.tsx b/packages/ui/src/dropdowns/helper.tsx
index 453a33b63..06f1c44c0 100644
--- a/packages/ui/src/dropdowns/helper.tsx
+++ b/packages/ui/src/dropdowns/helper.tsx
@@ -36,6 +36,7 @@ export interface ICustomSelectProps extends IDropdownProps {
interface CustomSearchSelectProps {
footerOption?: JSX.Element;
onChange: any;
+ onClose?: () => void;
options:
| {
value: any;
diff --git a/web/components/core/activity.tsx b/web/components/core/activity.tsx
index b281b8c36..05bc2c6a4 100644
--- a/web/components/core/activity.tsx
+++ b/web/components/core/activity.tsx
@@ -26,7 +26,7 @@ import { capitalizeFirstLetter } from "helpers/string.helper";
// types
import { IIssueActivity } from "@plane/types";
-const IssueLink = ({ activity }: { activity: IIssueActivity }) => {
+export const IssueLink = ({ activity }: { activity: IIssueActivity }) => {
const router = useRouter();
const { workspaceSlug } = router.query;
@@ -341,7 +341,9 @@ const activityDetails: {
if (activity.verb === "created")
return (
<>
- added this issue to the cycle
+
+ added {showIssue ? : "this issue"} to the cycle{" "}
+
- added this issue to the module{" "}
+ added {showIssue ? : "this issue"} to the module{" "}
,
},
relates_to: {
- message: (activity) => {
+ message: (activity, showIssue) => {
if (activity.old_value === "")
return (
<>
- marked that this issue relates to{" "}
+ marked that {showIssue ? : "this issue"} relates to{" "}
{activity.new_value}.
>
);
@@ -509,11 +511,11 @@ const activityDetails: {
icon: ,
},
blocking: {
- message: (activity) => {
+ message: (activity, showIssue) => {
if (activity.old_value === "")
return (
<>
- marked this issue is blocking issue{" "}
+ marked {showIssue ? : "this issue"} is blocking issue{" "}
{activity.new_value}.
>
);
@@ -527,18 +529,18 @@ const activityDetails: {
icon: ,
},
blocked_by: {
- message: (activity) => {
+ message: (activity, showIssue) => {
if (activity.old_value === "")
return (
<>
- marked this issue is being blocked by{" "}
+ marked {showIssue ? : "this issue"} is being blocked by{" "}
{activity.new_value}.
>
);
else
return (
<>
- removed this issue being blocked by issue{" "}
+ removed {showIssue ? : "this issue"} being blocked by issue{" "}
{activity.old_value}.
>
);
@@ -546,18 +548,18 @@ const activityDetails: {
icon: ,
},
duplicate: {
- message: (activity) => {
+ message: (activity, showIssue) => {
if (activity.old_value === "")
return (
<>
- marked this issue as duplicate of{" "}
+ marked {showIssue ? : "this issue"} as duplicate of{" "}
{activity.new_value}.
>
);
else
return (
<>
- removed this issue as a duplicate of{" "}
+ removed {showIssue ? : "this issue"} as a duplicate of{" "}
{activity.old_value}.
>
);
diff --git a/web/components/dashboard/widgets/recent-activity.tsx b/web/components/dashboard/widgets/recent-activity.tsx
index 2066689c3..6379ab291 100644
--- a/web/components/dashboard/widgets/recent-activity.tsx
+++ b/web/components/dashboard/widgets/recent-activity.tsx
@@ -5,7 +5,7 @@ import { History } from "lucide-react";
// hooks
import { useDashboard, useUser } from "hooks/store";
// components
-import { ActivityIcon, ActivityMessage } from "components/core";
+import { ActivityIcon, ActivityMessage, IssueLink } from "components/core";
import { RecentActivityEmptyState, WidgetLoader, WidgetProps } from "components/dashboard/widgets";
// ui
import { Avatar } from "@plane/ui";
@@ -75,15 +75,7 @@ export const RecentActivityWidget: React.FC = observer((props) => {
) : (
- created this{" "}
-
- Issue.
-
+ created
)}
diff --git a/web/components/exporter/export-modal.tsx b/web/components/exporter/export-modal.tsx
index 47555bf56..b1f529775 100644
--- a/web/components/exporter/export-modal.tsx
+++ b/web/components/exporter/export-modal.tsx
@@ -28,6 +28,7 @@ export const Exporter: React.FC = observer((props) => {
const { isOpen, handleClose, user, provider, mutateServices } = props;
// states
const [exportLoading, setExportLoading] = useState(false);
+ const [isSelectOpen, setIsSelectOpen] = useState(false);
// router
const router = useRouter();
const { workspaceSlug } = router.query;
@@ -91,7 +92,13 @@ export const Exporter: React.FC = observer((props) => {
return (
-