Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolved overflow issue with longer state names #1444

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/app/components/core/board-view/board-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ export const BoardHeader: React.FC<Props> = ({
>
<div className={`flex items-center ${!isCollapsed ? "flex-col gap-2" : "gap-1"}`}>
<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" : ""
}`}
>
<span className="flex items-center">{getGroupIcon()}</span>
<h2
className="text-lg font-semibold capitalize"
className="text-lg font-semibold capitalize truncate"
style={{
writingMode: !isCollapsed ? "vertical-rl" : "horizontal-tb",
}}
Expand Down
3 changes: 2 additions & 1 deletion apps/app/components/core/calendar-view/single-issue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export const SingleCalendarIssue: React.FC<Props> = ({
</a>
</Link>
{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 && (
<ViewPrioritySelect
issue={issue}
Expand All @@ -225,6 +225,7 @@ export const SingleCalendarIssue: React.FC<Props> = ({
issue={issue}
partialUpdateIssue={partialUpdateIssue}
position="left"
className="max-w-full"
isNotAllowed={isNotAllowed}
user={user}
/>
Expand Down
1 change: 1 addition & 0 deletions apps/app/components/core/spreadsheet-view/single-issue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ export const SingleSpreadsheetIssue: React.FC<Props> = ({
issue={issue}
partialUpdateIssue={partialUpdateIssue}
position="left"
className="max-w-full"
tooltipPosition={tooltipPosition}
customButton
user={user}
Expand Down
13 changes: 9 additions & 4 deletions apps/app/components/issues/view-select/state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type Props = {
partialUpdateIssue: (formData: Partial<IIssue>, issue: IIssue) => void;
position?: "left" | "right";
tooltipPosition?: "top" | "bottom";
className?: string;
selfPositioned?: boolean;
customButton?: boolean;
user: ICurrentUserResponse | undefined;
Expand All @@ -33,6 +34,7 @@ export const ViewStateSelect: React.FC<Props> = ({
partialUpdateIssue,
position = "left",
tooltipPosition = "top",
className = "",
selfPositioned = false,
customButton = false,
user,
Expand Down Expand Up @@ -68,16 +70,19 @@ export const ViewStateSelect: React.FC<Props> = ({
tooltipContent={addSpaceIfCamelCase(selectedOption?.name ?? "")}
position={tooltipPosition}
>
<div className="flex items-center cursor-pointer gap-2 text-brand-secondary">
{selectedOption &&
getStateGroupIcon(selectedOption.group, "16", "16", selectedOption.color)}
{selectedOption?.name ?? "State"}
<div className="flex items-center cursor-pointer w-full gap-2 text-brand-secondary">
<span className="h-4 w-4">
{selectedOption &&
getStateGroupIcon(selectedOption.group, "16", "16", selectedOption.color)}
</span>
<span className="truncate">{selectedOption?.name ?? "State"}</span>
</div>
</Tooltip>
);

return (
<CustomSearchSelect
className={className}
value={issue.state}
onChange={(data: string) => {
partialUpdateIssue(
Expand Down
4 changes: 3 additions & 1 deletion apps/app/components/ui/custom-search-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type CustomSearchSelectProps = {
verticalPosition?: "top" | "bottom";
noChevron?: boolean;
customButton?: JSX.Element;
className?: string;
optionsClassName?: string;
input?: boolean;
disabled?: boolean;
Expand All @@ -42,6 +43,7 @@ export const CustomSearchSelect = ({
verticalPosition = "bottom",
noChevron = false,
customButton,
className = "",
optionsClassName = "",
input = false,
disabled = false,
Expand All @@ -68,7 +70,7 @@ export const CustomSearchSelect = ({
return (
<Combobox
as="div"
className={`${!selfPositioned ? "relative" : ""} flex-shrink-0 text-left`}
className={`${!selfPositioned ? "relative" : ""} flex-shrink-0 text-left ${className}`}
{...props}
>
{({ open }: any) => (
Expand Down