From 59c52023fbeb90f9c7615d645707f4decefdbf27 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:14:06 +0530 Subject: [PATCH] style: list layout (#2566) --- packages/ui/src/dropdowns/helper.tsx | 1 + web/components/headers/cycle-issues.tsx | 4 +-- web/components/headers/global-issues.tsx | 4 +-- web/components/headers/module-issues.tsx | 4 +-- web/components/headers/project-issues.tsx | 4 +-- .../headers/project-view-issues.tsx | 4 +-- .../filters/header/helpers/dropdown.tsx | 7 +++-- .../issues/issue-layouts/list/block.tsx | 2 +- .../issues/issue-layouts/list/blocks-list.tsx | 12 ++++---- .../issues/issue-layouts/list/default.tsx | 30 +++++++++---------- .../list/inline-create-issue-form.tsx | 6 ++-- .../quick-action-dropdowns/cycle-issue.tsx | 2 +- .../quick-action-dropdowns/module-issue.tsx | 2 +- .../quick-action-dropdowns/project-issue.tsx | 2 +- .../profile/profile-issues-filter.tsx | 4 +-- 15 files changed, 45 insertions(+), 43 deletions(-) diff --git a/packages/ui/src/dropdowns/helper.tsx b/packages/ui/src/dropdowns/helper.tsx index 4c9a92d4d..eac53b6e6 100644 --- a/packages/ui/src/dropdowns/helper.tsx +++ b/packages/ui/src/dropdowns/helper.tsx @@ -1,3 +1,4 @@ +// FIXME: fix this!!! import { Placement } from "@blueprintjs/popover2"; export interface IDropdownProps { diff --git a/web/components/headers/cycle-issues.tsx b/web/components/headers/cycle-issues.tsx index ac6ed2e6b..cfadc80aa 100644 --- a/web/components/headers/cycle-issues.tsx +++ b/web/components/headers/cycle-issues.tsx @@ -147,7 +147,7 @@ export const CycleIssuesHeader: React.FC = observer(() => { onChange={(layout) => handleLayoutChange(layout)} selectedLayout={activeLayout} /> - + { states={projectStore.states?.[projectId?.toString() ?? ""] ?? undefined} /> - + = observer((props) => { {activeLayout === "spreadsheet" && ( <> {!STATIC_VIEW_TYPES.some((word) => router.pathname.includes(word)) && ( - + = observer((props) => { )} - + { onChange={(layout) => handleLayoutChange(layout)} selectedLayout={activeLayout} /> - + { states={projectStore.states?.[projectId?.toString() ?? ""] ?? undefined} /> - + { onChange={(layout) => handleLayoutChange(layout)} selectedLayout={activeLayout} /> - + { states={projectStore.states?.[projectId?.toString() ?? ""] ?? undefined} /> - + { onChange={(layout) => handleLayoutChange(layout)} selectedLayout={activeLayout} /> - + { states={projectStore.states?.[projectId?.toString() ?? ""] ?? undefined} /> - + = (props) => { - const { children, title = "Dropdown" } = props; + const { children, title = "Dropdown", placement } = props; const [referenceElement, setReferenceElement] = useState(null); const [popperElement, setPopperElement] = useState(null); const { styles, attributes } = usePopper(referenceElement, popperElement, { - placement: "auto", + placement: placement ?? "auto", }); return ( diff --git a/web/components/issues/issue-layouts/list/block.tsx b/web/components/issues/issue-layouts/list/block.tsx index 5a84c5f9e..c697da78c 100644 --- a/web/components/issues/issue-layouts/list/block.tsx +++ b/web/components/issues/issue-layouts/list/block.tsx @@ -27,7 +27,7 @@ export const IssueBlock: React.FC = (props) => { return ( <> -
+
{display_properties && display_properties?.key && (
{issue?.project_detail?.identifier}-{issue.sequence_id} diff --git a/web/components/issues/issue-layouts/list/blocks-list.tsx b/web/components/issues/issue-layouts/list/blocks-list.tsx index 3267e221c..2350fe12c 100644 --- a/web/components/issues/issue-layouts/list/blocks-list.tsx +++ b/web/components/issues/issue-layouts/list/blocks-list.tsx @@ -21,9 +21,8 @@ export const IssueBlocksList: FC = (props) => { props; return ( - <> - {issues && - issues?.length > 0 && +
+ {issues && issues.length > 0 ? ( issues.map((issue) => ( = (props) => { members={members} estimates={estimates} /> - ))} - + )) + ) : ( +
No issues
+ )} +
); }; diff --git a/web/components/issues/issue-layouts/list/default.tsx b/web/components/issues/issue-layouts/list/default.tsx index 114b308eb..e6fce190a 100644 --- a/web/components/issues/issue-layouts/list/default.tsx +++ b/web/components/issues/issue-layouts/list/default.tsx @@ -53,7 +53,7 @@ const GroupByList: React.FC = observer((props) => { list.length > 0 && list.map((_list: any) => (
-
+
= observer((props) => { } />
-
- {issues && ( - - )} -
+ {issues && ( + + )} {enableQuickIssueCreate && ( = observer((props) => { }; return ( -
+
= observer((props) => { {!isOpen && ( )} diff --git a/web/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx b/web/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx index 8dc826300..9736c575e 100644 --- a/web/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx +++ b/web/components/issues/issue-layouts/quick-action-dropdowns/cycle-issue.tsx @@ -62,7 +62,7 @@ export const CycleIssueQuickActions: React.FC = (props) => { if (issueToEdit) handleUpdate({ ...issueToEdit, ...data }); }} /> - + { e.preventDefault(); diff --git a/web/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx b/web/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx index 066a16d35..93594de9e 100644 --- a/web/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx +++ b/web/components/issues/issue-layouts/quick-action-dropdowns/module-issue.tsx @@ -62,7 +62,7 @@ export const ModuleIssueQuickActions: React.FC = (props) => { if (issueToEdit) handleUpdate({ ...issueToEdit, ...data }); }} /> - + { e.preventDefault(); diff --git a/web/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx b/web/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx index 0cad8c46f..7999be31d 100644 --- a/web/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx +++ b/web/components/issues/issue-layouts/quick-action-dropdowns/project-issue.tsx @@ -61,7 +61,7 @@ export const ProjectIssueQuickActions: React.FC = (props) => { if (issueToEdit) handleUpdate({ ...issueToEdit, ...data }); }} /> - + { e.preventDefault(); diff --git a/web/components/profile/profile-issues-filter.tsx b/web/components/profile/profile-issues-filter.tsx index 5dd6b1b3a..7acc73c99 100644 --- a/web/components/profile/profile-issues-filter.tsx +++ b/web/components/profile/profile-issues-filter.tsx @@ -41,7 +41,7 @@ export const ProfileIssuesFilter = observer(() => { selectedLayout={activeLayout} /> - + { /> - +