Skip to content

Commit 5a2e2e7

Browse files
[WEB-5662][WEB-5770] fix: alignment of cycles in sidebar and layout selection dropdown button (#8414)
1 parent e2fcb50 commit 5a2e2e7

File tree

10 files changed

+22
-17
lines changed

10 files changed

+22
-17
lines changed

apps/space/core/components/issues/issue-layouts/properties/cycle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const IssueBlockCycle = observer(function IssueBlockCycle({ cycleId, shou
2727
>
2828
<div className="flex w-full items-center text-11 gap-1.5">
2929
<CycleIcon className="h-3 w-3 flex-shrink-0" />
30-
<div className="max-w-40 flex-grow truncate ">{cycle?.name ?? "No Cycle"}</div>
30+
<div className="max-w-40 truncate ">{cycle?.name ?? "No Cycle"}</div>
3131
</div>
3232
</div>
3333
</Tooltip>

apps/web/app/(all)/[workspaceSlug]/(projects)/star-us-link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function StarUsOnGitHubLink() {
2929
},
3030
})
3131
}
32-
className="flex flex-shrink-0 items-center gap-1.5 rounded-sm bg-layer-1 px-3 py-1.5"
32+
className="flex flex-shrink-0 items-center gap-1.5 rounded-sm bg-layer-2 px-3 py-1.5"
3333
href="https://github.com/makeplane/plane"
3434
target="_blank"
3535
rel="noopener noreferrer"

apps/web/core/components/dropdowns/buttons.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function BackgroundButton(props: ButtonProps) {
104104
variant="ghost"
105105
size="sm"
106106
className={cn(
107-
"h-full w-full flex items-center justify-start gap-1.5 bg-layer-3 hover:bg-layer-1-hover",
107+
"h-full w-full flex items-center justify-between gap-1.5 bg-layer-3 hover:bg-layer-1-hover",
108108
className
109109
)}
110110
>
@@ -129,7 +129,7 @@ function TransparentButton(props: ButtonProps) {
129129
variant="ghost"
130130
size="sm"
131131
className={cn(
132-
"h-full w-full flex items-center justify-start gap-1.5",
132+
"h-full w-full flex items-center justify-between gap-1.5",
133133
{
134134
"bg-layer-transparent-active": isActive,
135135
},

apps/web/core/components/dropdowns/cycle/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const CycleDropdown = observer(function CycleDropdown(props: Props) {
117117
>
118118
{!hideIcon && <CycleIcon className="h-3 w-3 flex-shrink-0" />}
119119
{BUTTON_VARIANTS_WITH_TEXT.includes(buttonVariant) && (!!selectedName || !!placeholder) && (
120-
<span className="max-w-40 flex-grow truncate">{selectedName ?? placeholder}</span>
120+
<span className="max-w-40 truncate">{selectedName ?? placeholder}</span>
121121
)}
122122
{dropdownArrow && (
123123
<ChevronDownIcon className={cn("h-2.5 w-2.5 flex-shrink-0", dropdownArrowClassName)} aria-hidden="true" />

apps/web/core/components/dropdowns/estimate.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,16 @@ export const EstimateDropdown = observer(function EstimateDropdown(props: Props)
192192
>
193193
{!hideIcon && <EstimatePropertyIcon className="h-3 w-3 flex-shrink-0" />}
194194
{(selectedEstimate || placeholder) && BUTTON_VARIANTS_WITH_TEXT.includes(buttonVariant) && (
195-
<span className="flex-grow truncate">
196-
{selectedEstimate
197-
? currentActiveEstimate?.type === EEstimateSystem.TIME
198-
? convertMinutesToHoursMinutesString(Number(selectedEstimate.value))
199-
: selectedEstimate.value
200-
: placeholder}
195+
<span className="truncate">
196+
{selectedEstimate ? (
197+
currentActiveEstimate?.type === EEstimateSystem.TIME ? (
198+
convertMinutesToHoursMinutesString(Number(selectedEstimate.value))
199+
) : (
200+
selectedEstimate.value
201+
)
202+
) : (
203+
<span className="text-placeholder">{placeholder}</span>
204+
)}
201205
</span>
202206
)}
203207
{dropdownArrow && (

apps/web/core/components/dropdowns/layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Dropdown } from "@plane/ui";
99
import { cn } from "@plane/utils";
1010
// components
1111
import { IssueLayoutIcon } from "@/components/issues/issue-layouts/layout-icon";
12+
import { getIconButtonStyling } from "@plane/propel/icon-button";
1213

1314
type TLayoutDropDown = {
1415
onChange: (value: EIssueLayoutTypes) => void;
@@ -67,7 +68,7 @@ export const LayoutDropDown = observer(function LayoutDropDown(props: TLayoutDro
6768
value={value?.toString()}
6869
keyExtractor={keyExtractor}
6970
options={options}
70-
buttonContainerClassName="bg-surface-1 border border-subtle hover:bg-surface-2 focus:text-tertiary focus:bg-surface-2 px-2 py-1.5 rounded-sm flex items-center gap-1.5 whitespace-nowrap transition-all justify-center relative"
71+
buttonContainerClassName={cn(getIconButtonStyling("secondary", "lg"), "w-auto px-2")}
7172
buttonContent={buttonContent}
7273
renderItem={itemContent}
7374
disableSearch

apps/web/core/components/dropdowns/module/button-content.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function ModuleButtonContent(props: ModuleButtonContentProps) {
4545
<div className="relative flex items-center max-w-full gap-1">
4646
{!hideIcon && <ModuleIcon className="h-3 w-3 flex-shrink-0" />}
4747
{(value.length > 0 || !!placeholder) && (
48-
<div className="max-w-40 flex-grow truncate">
48+
<div className="max-w-40 truncate">
4949
{value.length > 0
5050
? value.length === 1
5151
? `${getModuleById(value[0])?.name || "module"}`
@@ -75,7 +75,7 @@ export function ModuleButtonContent(props: ModuleButtonContentProps) {
7575
isMobile={isMobile}
7676
renderByDefault={false}
7777
>
78-
<span className="max-w-40 flex-grow truncate text-11 font-medium">{moduleDetails?.name}</span>
78+
<span className="max-w-40 truncate text-11 font-medium">{moduleDetails?.name}</span>
7979
</Tooltip>
8080
)}
8181
{!disabled && (

apps/web/core/components/issues/issue-detail/module-select.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export const IssueModuleSelect = observer(function IssueModuleSelect(props: TIss
6464
placeholder={t("module.no_module")}
6565
disabled={disableSelect}
6666
className="group h-full w-full"
67-
buttonContainerClassName="w-full text-left h-7.5 rounded-sm"
67+
buttonContainerClassName="w-full text-left rounded-sm"
6868
buttonClassName={`text-body-xs-medium justify-between ${issue?.module_ids?.length ? "" : "text-placeholder"}`}
6969
buttonVariant="transparent-with-text"
7070
hideIcon

packages/ui/src/breadcrumbs/navigation-dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function BreadcrumbNavigationDropdown(props: TBreadcrumbNavigationDropdow
4646
)}
4747
>
4848
<div className="flex @4xl:hidden text-tertiary">...</div>
49-
<div className="hidden @4xl:flex gap-2">
49+
<div className="hidden @4xl:flex gap-2 items-center">
5050
{selectedItemIcon && <Breadcrumbs.Icon>{selectedItemIcon}</Breadcrumbs.Icon>}
5151
<Breadcrumbs.Label>{selectedItem?.title}</Breadcrumbs.Label>
5252
</div>

packages/ui/src/breadcrumbs/navigation-search-dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function BreadcrumbNavigationSearchDropdown(props: TBreadcrumbNavigationS
7070
{shouldTruncate && <div className="flex @4xl:hidden text-tertiary">...</div>}
7171
<div
7272
className={cn("flex gap-2", {
73-
"hidden @4xl:flex gap-2": shouldTruncate,
73+
"hidden @4xl:flex gap-2 items-center": shouldTruncate,
7474
})}
7575
>
7676
{icon && <Breadcrumbs.Icon>{icon}</Breadcrumbs.Icon>}

0 commit comments

Comments
 (0)