forked from github/plane
fix: resolved overflow issue with longer state names (#1444)
This commit is contained in:
parent
7868bfa2b1
commit
d564ea8898
@ -118,13 +118,13 @@ export const BoardHeader: React.FC<Props> = ({
|
|||||||
>
|
>
|
||||||
<div className={`flex items-center ${!isCollapsed ? "flex-col gap-2" : "gap-1"}`}>
|
<div className={`flex items-center ${!isCollapsed ? "flex-col gap-2" : "gap-1"}`}>
|
||||||
<div
|
<div
|
||||||
className={`flex cursor-pointer items-center gap-x-3 ${
|
className={`flex cursor-pointer items-center gap-x-3 max-w-[316px] ${
|
||||||
!isCollapsed ? "mb-2 flex-col gap-y-2 py-2" : ""
|
!isCollapsed ? "mb-2 flex-col gap-y-2 py-2" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<span className="flex items-center">{getGroupIcon()}</span>
|
<span className="flex items-center">{getGroupIcon()}</span>
|
||||||
<h2
|
<h2
|
||||||
className="text-lg font-semibold capitalize"
|
className="text-lg font-semibold capitalize truncate"
|
||||||
style={{
|
style={{
|
||||||
writingMode: !isCollapsed ? "vertical-rl" : "horizontal-tb",
|
writingMode: !isCollapsed ? "vertical-rl" : "horizontal-tb",
|
||||||
}}
|
}}
|
||||||
|
@ -210,7 +210,7 @@ export const SingleCalendarIssue: React.FC<Props> = ({
|
|||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
{displayProperties && (
|
{displayProperties && (
|
||||||
<div className="relative mt-1.5 flex flex-wrap items-center gap-2 text-xs">
|
<div className="relative mt-1.5 w-full flex flex-wrap items-center gap-2 text-xs">
|
||||||
{properties.priority && (
|
{properties.priority && (
|
||||||
<ViewPrioritySelect
|
<ViewPrioritySelect
|
||||||
issue={issue}
|
issue={issue}
|
||||||
@ -225,6 +225,7 @@ export const SingleCalendarIssue: React.FC<Props> = ({
|
|||||||
issue={issue}
|
issue={issue}
|
||||||
partialUpdateIssue={partialUpdateIssue}
|
partialUpdateIssue={partialUpdateIssue}
|
||||||
position="left"
|
position="left"
|
||||||
|
className="max-w-full"
|
||||||
isNotAllowed={isNotAllowed}
|
isNotAllowed={isNotAllowed}
|
||||||
user={user}
|
user={user}
|
||||||
/>
|
/>
|
||||||
|
@ -275,6 +275,7 @@ export const SingleSpreadsheetIssue: React.FC<Props> = ({
|
|||||||
issue={issue}
|
issue={issue}
|
||||||
partialUpdateIssue={partialUpdateIssue}
|
partialUpdateIssue={partialUpdateIssue}
|
||||||
position="left"
|
position="left"
|
||||||
|
className="max-w-full"
|
||||||
tooltipPosition={tooltipPosition}
|
tooltipPosition={tooltipPosition}
|
||||||
customButton
|
customButton
|
||||||
user={user}
|
user={user}
|
||||||
|
@ -22,6 +22,7 @@ type Props = {
|
|||||||
partialUpdateIssue: (formData: Partial<IIssue>, issue: IIssue) => void;
|
partialUpdateIssue: (formData: Partial<IIssue>, issue: IIssue) => void;
|
||||||
position?: "left" | "right";
|
position?: "left" | "right";
|
||||||
tooltipPosition?: "top" | "bottom";
|
tooltipPosition?: "top" | "bottom";
|
||||||
|
className?: string;
|
||||||
selfPositioned?: boolean;
|
selfPositioned?: boolean;
|
||||||
customButton?: boolean;
|
customButton?: boolean;
|
||||||
user: ICurrentUserResponse | undefined;
|
user: ICurrentUserResponse | undefined;
|
||||||
@ -33,6 +34,7 @@ export const ViewStateSelect: React.FC<Props> = ({
|
|||||||
partialUpdateIssue,
|
partialUpdateIssue,
|
||||||
position = "left",
|
position = "left",
|
||||||
tooltipPosition = "top",
|
tooltipPosition = "top",
|
||||||
|
className = "",
|
||||||
selfPositioned = false,
|
selfPositioned = false,
|
||||||
customButton = false,
|
customButton = false,
|
||||||
user,
|
user,
|
||||||
@ -68,16 +70,19 @@ export const ViewStateSelect: React.FC<Props> = ({
|
|||||||
tooltipContent={addSpaceIfCamelCase(selectedOption?.name ?? "")}
|
tooltipContent={addSpaceIfCamelCase(selectedOption?.name ?? "")}
|
||||||
position={tooltipPosition}
|
position={tooltipPosition}
|
||||||
>
|
>
|
||||||
<div className="flex items-center cursor-pointer gap-2 text-brand-secondary">
|
<div className="flex items-center cursor-pointer w-full gap-2 text-brand-secondary">
|
||||||
{selectedOption &&
|
<span className="h-4 w-4">
|
||||||
getStateGroupIcon(selectedOption.group, "16", "16", selectedOption.color)}
|
{selectedOption &&
|
||||||
{selectedOption?.name ?? "State"}
|
getStateGroupIcon(selectedOption.group, "16", "16", selectedOption.color)}
|
||||||
|
</span>
|
||||||
|
<span className="truncate">{selectedOption?.name ?? "State"}</span>
|
||||||
</div>
|
</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomSearchSelect
|
<CustomSearchSelect
|
||||||
|
className={className}
|
||||||
value={issue.state}
|
value={issue.state}
|
||||||
onChange={(data: string) => {
|
onChange={(data: string) => {
|
||||||
partialUpdateIssue(
|
partialUpdateIssue(
|
||||||
|
@ -23,6 +23,7 @@ type CustomSearchSelectProps = {
|
|||||||
verticalPosition?: "top" | "bottom";
|
verticalPosition?: "top" | "bottom";
|
||||||
noChevron?: boolean;
|
noChevron?: boolean;
|
||||||
customButton?: JSX.Element;
|
customButton?: JSX.Element;
|
||||||
|
className?: string;
|
||||||
optionsClassName?: string;
|
optionsClassName?: string;
|
||||||
input?: boolean;
|
input?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
@ -43,6 +44,7 @@ export const CustomSearchSelect = ({
|
|||||||
verticalPosition = "bottom",
|
verticalPosition = "bottom",
|
||||||
noChevron = false,
|
noChevron = false,
|
||||||
customButton,
|
customButton,
|
||||||
|
className = "",
|
||||||
optionsClassName = "",
|
optionsClassName = "",
|
||||||
input = false,
|
input = false,
|
||||||
disabled = false,
|
disabled = false,
|
||||||
@ -70,7 +72,7 @@ export const CustomSearchSelect = ({
|
|||||||
return (
|
return (
|
||||||
<Combobox
|
<Combobox
|
||||||
as="div"
|
as="div"
|
||||||
className={`${!selfPositioned ? "relative" : ""} flex-shrink-0 text-left`}
|
className={`${!selfPositioned ? "relative" : ""} flex-shrink-0 text-left ${className}`}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{({ open }: any) => (
|
{({ open }: any) => (
|
||||||
|
Loading…
Reference in New Issue
Block a user