From d83a76a3aa2b00aeff5d622f2c1dfda4fd402915 Mon Sep 17 00:00:00 2001
From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
Date: Tue, 1 Aug 2023 19:04:53 +0530
Subject: [PATCH] style: my issue and profile page view dropdown (#1754)
---
.../my-issues/my-issues-view-options.tsx | 155 ++++++++---------
.../profile/profile-issues-view-options.tsx | 157 +++++++++---------
2 files changed, 159 insertions(+), 153 deletions(-)
diff --git a/apps/app/components/issues/my-issues/my-issues-view-options.tsx b/apps/app/components/issues/my-issues/my-issues-view-options.tsx
index 24d59fa03..35ed2295c 100644
--- a/apps/app/components/issues/my-issues/my-issues-view-options.tsx
+++ b/apps/app/components/issues/my-issues/my-issues-view-options.tsx
@@ -146,105 +146,108 @@ export const MyIssuesViewOptions: React.FC = () => {
<>
Group by
-
option.key === groupBy)?.name ??
- "Select"
- }
- >
- {GROUP_BY_OPTIONS.map((option) => {
- if (issueView === "kanban" && option.key === null) return null;
- if (option.key === "state" || option.key === "created_by")
- return null;
+
+ option.key === groupBy)
+ ?.name ?? "Select"
+ }
+ className="!w-full"
+ buttonClassName="w-full"
+ >
+ {GROUP_BY_OPTIONS.map((option) => {
+ if (issueView === "kanban" && option.key === null) return null;
+ if (option.key === "state" || option.key === "created_by")
+ return null;
- return (
- setGroupBy(option.key)}
- >
- {option.name}
-
- );
- })}
-
+ return (
+ setGroupBy(option.key)}
+ >
+ {option.name}
+
+ );
+ })}
+
+
Order by
-
option.key === orderBy)?.name ??
- "Select"
- }
- >
- {ORDER_BY_OPTIONS.map((option) => {
- if (groupBy === "priority" && option.key === "priority") return null;
- if (option.key === "sort_order") return null;
+
+ option.key === orderBy)?.name ??
+ "Select"
+ }
+ className="!w-full"
+ buttonClassName="w-full"
+ >
+ {ORDER_BY_OPTIONS.map((option) => {
+ if (groupBy === "priority" && option.key === "priority")
+ return null;
+ if (option.key === "sort_order") return null;
- return (
- {
- setOrderBy(option.key);
- }}
- >
- {option.name}
-
- );
- })}
-
+ return (
+ {
+ setOrderBy(option.key);
+ }}
+ >
+ {option.name}
+
+ );
+ })}
+
+
>
)}
Issue type
-
option.key === filters?.type)
- ?.name ?? "Select"
- }
- >
- {FILTER_ISSUE_OPTIONS.map((option) => (
-
- setFilters({
- type: option.key,
- })
- }
- >
- {option.name}
-
- ))}
-
+
+ option.key === filters?.type)
+ ?.name ?? "Select"
+ }
+ className="!w-full"
+ buttonClassName="w-full"
+ >
+ {FILTER_ISSUE_OPTIONS.map((option) => (
+
+ setFilters({
+ type: option.key,
+ })
+ }
+ >
+ {option.name}
+
+ ))}
+
+
{issueView !== "calendar" && issueView !== "spreadsheet" && (
<>
Show empty states
-
+
+
+
- {/*
-
-
-
*/}
>
)}
Display Properties
-
+
{Object.keys(properties).map((key) => {
if (key === "estimate" && !isEstimateActive) return null;
diff --git a/apps/app/components/profile/profile-issues-view-options.tsx b/apps/app/components/profile/profile-issues-view-options.tsx
index 0441987eb..94ba6ef17 100644
--- a/apps/app/components/profile/profile-issues-view-options.tsx
+++ b/apps/app/components/profile/profile-issues-view-options.tsx
@@ -172,106 +172,109 @@ export const ProfileIssuesViewOptions: React.FC = () => {
<>
Group by
-
option.key === groupByProperty)
- ?.name ?? "Select"
- }
- >
- {GROUP_BY_OPTIONS.map((option) => {
- if (issueView === "kanban" && option.key === null) return null;
- if (option.key === "state" || option.key === "created_by")
- return null;
+
+ option.key === groupByProperty
+ )?.name ?? "Select"
+ }
+ className="!w-full"
+ buttonClassName="w-full"
+ >
+ {GROUP_BY_OPTIONS.map((option) => {
+ if (issueView === "kanban" && option.key === null) return null;
+ if (option.key === "state" || option.key === "created_by")
+ return null;
- return (
- setGroupByProperty(option.key)}
- >
- {option.name}
-
- );
- })}
-
+ return (
+ setGroupByProperty(option.key)}
+ >
+ {option.name}
+
+ );
+ })}
+
+
Order by
-
option.key === orderBy)?.name ??
- "Select"
- }
- >
- {ORDER_BY_OPTIONS.map((option) => {
- if (groupByProperty === "priority" && option.key === "priority")
- return null;
- if (option.key === "sort_order") return null;
+
+ option.key === orderBy)?.name ??
+ "Select"
+ }
+ className="!w-full"
+ buttonClassName="w-full"
+ >
+ {ORDER_BY_OPTIONS.map((option) => {
+ if (groupByProperty === "priority" && option.key === "priority")
+ return null;
+ if (option.key === "sort_order") return null;
- return (
- {
- setOrderBy(option.key);
- }}
- >
- {option.name}
-
- );
- })}
-
+ return (
+ {
+ setOrderBy(option.key);
+ }}
+ >
+ {option.name}
+
+ );
+ })}
+
+
>
)}
Issue type
-
option.key === filters?.type)
- ?.name ?? "Select"
- }
- >
- {FILTER_ISSUE_OPTIONS.map((option) => (
-
- setFilters({
- type: option.key,
- })
- }
- >
- {option.name}
-
- ))}
-
+
+ option.key === filters?.type)
+ ?.name ?? "Select"
+ }
+ className="!w-full"
+ buttonClassName="w-full"
+ >
+ {FILTER_ISSUE_OPTIONS.map((option) => (
+
+ setFilters({
+ type: option.key,
+ })
+ }
+ >
+ {option.name}
+
+ ))}
+
+
{issueView !== "calendar" && issueView !== "spreadsheet" && (
<>
Show empty states
-
+
+
+
- {/*
-
-
-
*/}
>
)}
Display Properties
-
+
{Object.keys(properties).map((key) => {
if (key === "estimate" && !isEstimateActive) return null;