Skip to content

Commit

Permalink
fix: resolved overflow issue with longer state names (#1444)
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolsinghbhatia committed Jul 7, 2023
1 parent 7868bfa commit d564ea8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
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 @@ -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 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 @@ -275,6 +275,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 @@ -43,6 +44,7 @@ export const CustomSearchSelect = ({
verticalPosition = "bottom",
noChevron = false,
customButton,
className = "",
optionsClassName = "",
input = false,
disabled = false,
Expand Down Expand Up @@ -70,7 +72,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

1 comment on commit d564ea8

@vercel
Copy link

@vercel vercel bot commented on d564ea8 Jul 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

plane-dev – ./apps/app

plane-dev-plane.vercel.app
plane-dev-git-develop-plane.vercel.app
plane-dev.vercel.app

Please sign in to comment.