From 9b1ae6bcd49ba188b7a552782b0f89a785d82fda Mon Sep 17 00:00:00 2001 From: Kunal Vishwakarma <116634168+kunalv17@users.noreply.github.com> Date: Sat, 8 Apr 2023 13:55:30 +0530 Subject: [PATCH] fix: inconsistency in styles (#734) --- .../estimates/estimate-points-modal.tsx | 3 +-- .../components/estimates/single-estimate.tsx | 4 +-- apps/app/components/issues/form.tsx | 2 +- .../app/components/issues/select/estimate.tsx | 26 +++++++++++++++---- .../issues/sidebar-select/estimate.tsx | 2 +- .../[projectId]/settings/estimates.tsx | 2 +- 6 files changed, 27 insertions(+), 12 deletions(-) diff --git a/apps/app/components/estimates/estimate-points-modal.tsx b/apps/app/components/estimates/estimate-points-modal.tsx index 149eec583..67bcafe9d 100644 --- a/apps/app/components/estimates/estimate-points-modal.tsx +++ b/apps/app/components/estimates/estimate-points-modal.tsx @@ -184,8 +184,7 @@ export const EstimatePointsModal: React.FC = ({ isOpen, data, estimate, o }; useEffect(() => { - if (!data) return; - + if(!data) return reset({ ...defaultValues, ...data, diff --git a/apps/app/components/estimates/single-estimate.tsx b/apps/app/components/estimates/single-estimate.tsx index 4e52146f2..d20ef1db8 100644 --- a/apps/app/components/estimates/single-estimate.tsx +++ b/apps/app/components/estimates/single-estimate.tsx @@ -83,7 +83,7 @@ export const SingleEstimate: React.FC = ({ estimate={estimate} onClose={() => setIsEstimatePointsModalOpen(false)} /> -
+
{estimate.name}
@@ -129,7 +129,7 @@ export const SingleEstimate: React.FC = ({
{estimatePoints && estimatePoints.length > 0 ? ( -
+
{estimatePoints.length > 0 && "Estimate points ("} {estimatePoints.map((point, i) => (
diff --git a/apps/app/components/issues/form.tsx b/apps/app/components/issues/form.tsx index 9051ed2a5..8e42754d4 100644 --- a/apps/app/components/issues/form.tsx +++ b/apps/app/components/issues/form.tsx @@ -405,7 +405,7 @@ export const IssueForm: FC = ({ control={control} name="estimate_point" render={({ field: { value, onChange } }) => ( - + )} />
diff --git a/apps/app/components/issues/select/estimate.tsx b/apps/app/components/issues/select/estimate.tsx index 2fe043303..6f63b2330 100644 --- a/apps/app/components/issues/select/estimate.tsx +++ b/apps/app/components/issues/select/estimate.tsx @@ -10,15 +10,17 @@ import estimatesService from "services/estimates.service"; // ui import { CustomSelect } from "components/ui"; // icons +import { PlayIcon, ChevronDownIcon } from "@heroicons/react/24/outline"; // fetch-keys import { ESTIMATE_POINTS_LIST, PROJECT_DETAILS } from "constants/fetch-keys"; type Props = { value: number; onChange: (value: number) => void; + chevron: boolean; }; -export const IssueEstimateSelect: React.FC = ({ value, onChange }) => { +export const IssueEstimateSelect: React.FC = ({ value, onChange, chevron }) => { const router = useRouter(); const { workspaceSlug, projectId } = router.query; @@ -47,20 +49,34 @@ export const IssueEstimateSelect: React.FC = ({ value, onChange }) => { +
+ + + {estimatePoints?.find((e) => e.key === value)?.value ?? "Estimate points"} + {chevron && ( + + + + )}
} onChange={onChange} position="right" - width="w-full" + width="w-full min-w-[111px]" + noChevron={!chevron} > {estimatePoints && estimatePoints.map((point) => ( - - {point.value} + + <> + + + + {point.value} + ))}
diff --git a/apps/app/components/issues/sidebar-select/estimate.tsx b/apps/app/components/issues/sidebar-select/estimate.tsx index 1f0646fb6..9b24a529d 100644 --- a/apps/app/components/issues/sidebar-select/estimate.tsx +++ b/apps/app/components/issues/sidebar-select/estimate.tsx @@ -28,7 +28,7 @@ export const SidebarEstimateSelect: React.FC = ({ value, onChange, userAu

Estimate

- +
); diff --git a/apps/app/pages/[workspaceSlug]/projects/[projectId]/settings/estimates.tsx b/apps/app/pages/[workspaceSlug]/projects/[projectId]/settings/estimates.tsx index 7d1bd500d..5ee1b5268 100644 --- a/apps/app/pages/[workspaceSlug]/projects/[projectId]/settings/estimates.tsx +++ b/apps/app/pages/[workspaceSlug]/projects/[projectId]/settings/estimates.tsx @@ -124,7 +124,7 @@ const EstimatesSettings: NextPage = () => {
{estimatesList && estimatesList.length > 0 && ( -
+
<> {estimatesList ? ( estimatesList.map((estimate) => (