[WEB-1027] fix: overflow & alignment fixes (#4234)

* fix: list layout issue title overflow

* fix: project feature toggle modal project name overflow

* fix: app sidebar project section alignment

* fix: issue title textarea

* fix: create issue modal project select overflow

* fix: module and cycle applied filters overflow fix
This commit is contained in:
Anmol Singh Bhatia 2024-04-23 12:53:52 +05:30 committed by GitHub
parent f77d2d8c0a
commit e0e8ce633b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 17 additions and 29 deletions

View File

@ -11,17 +11,7 @@ export interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextArea
} }
const TextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>((props, ref) => { const TextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>((props, ref) => {
const { const { id, name, value = "", mode = "primary", hasError = false, className = "", ...rest } = props;
id,
name,
value = "",
rows = 1,
cols = 1,
mode = "primary",
hasError = false,
className = "",
...rest
} = props;
// refs // refs
const textAreaRef = useRef<any>(ref); const textAreaRef = useRef<any>(ref);
// auto re-size // auto re-size
@ -33,8 +23,6 @@ const TextArea = React.forwardRef<HTMLTextAreaElement, TextAreaProps>((props, re
name={name} name={name}
ref={textAreaRef} ref={textAreaRef}
value={value} value={value}
rows={rows}
cols={cols}
className={cn( className={cn(
"no-scrollbar w-full bg-transparent px-3 py-2 placeholder-custom-text-400 outline-none", "no-scrollbar w-full bg-transparent px-3 py-2 placeholder-custom-text-400 outline-none",
{ {

View File

@ -176,7 +176,7 @@ export const ProjectDropdown: React.FC<Props> = observer((props) => {
</span> </span>
)} )}
{BUTTON_VARIANTS_WITH_TEXT.includes(buttonVariant) && ( {BUTTON_VARIANTS_WITH_TEXT.includes(buttonVariant) && (
<span className="flex-grow truncate">{selectedProject?.name ?? placeholder}</span> <span className="flex-grow truncate max-w-40">{selectedProject?.name ?? placeholder}</span>
)} )}
{dropdownArrow && ( {dropdownArrow && (
<ChevronDown className={cn("h-2.5 w-2.5 flex-shrink-0", dropdownArrowClassName)} aria-hidden="true" /> <ChevronDown className={cn("h-2.5 w-2.5 flex-shrink-0", dropdownArrowClassName)} aria-hidden="true" />

View File

@ -28,9 +28,9 @@ export const AppliedCycleFilters: React.FC<Props> = observer((props) => {
const cycleStatus = (cycleDetails?.status ? cycleDetails?.status.toLocaleLowerCase() : "draft") as TCycleGroups; const cycleStatus = (cycleDetails?.status ? cycleDetails?.status.toLocaleLowerCase() : "draft") as TCycleGroups;
return ( return (
<div key={cycleId} className="flex items-center gap-1 rounded bg-custom-background-80 p-1 text-xs"> <div key={cycleId} className="flex items-center gap-1 rounded bg-custom-background-80 p-1 text-xs truncate">
<CycleGroupIcon cycleGroup={cycleStatus} className="h-3 w-3 flex-shrink-0" /> <CycleGroupIcon cycleGroup={cycleStatus} className="h-3 w-3 flex-shrink-0" />
<span className="normal-case">{cycleDetails.name}</span> <span className="normal-case truncate">{cycleDetails.name}</span>
{editable && ( {editable && (
<button <button
type="button" type="button"

View File

@ -60,9 +60,9 @@ export const AppliedFiltersList: React.FC<Props> = observer((props) => {
return ( return (
<div <div
key={filterKey} key={filterKey}
className="flex flex-wrap items-center gap-2 rounded-md border border-custom-border-200 px-2 py-1 capitalize" className="flex flex-wrap items-center gap-2 rounded-md border border-custom-border-200 px-2 py-1 capitalize w-full"
> >
<div className="flex flex-wrap items-center gap-1.5"> <div className="flex flex-wrap items-center gap-1.5 w-full">
<span className="text-xs text-custom-text-300">{replaceUnderscoreIfSnakeCase(filterKey)}</span> <span className="text-xs text-custom-text-300">{replaceUnderscoreIfSnakeCase(filterKey)}</span>
{membersFilters.includes(filterKey) && ( {membersFilters.includes(filterKey) && (
<AppliedMembersFilters <AppliedMembersFilters

View File

@ -24,9 +24,9 @@ export const AppliedModuleFilters: React.FC<Props> = observer((props) => {
if (!moduleDetails) return null; if (!moduleDetails) return null;
return ( return (
<div key={moduleId} className="flex items-center gap-1 rounded bg-custom-background-80 p-1 text-xs"> <div key={moduleId} className="flex items-center gap-1 rounded bg-custom-background-80 p-1 text-xs truncate">
<DiceIcon className="h-3 w-3 flex-shrink-0" /> <DiceIcon className="h-3 w-3 flex-shrink-0" />
<span className="normal-case">{moduleDetails.name}</span> <span className="normal-case truncate">{moduleDetails.name}</span>
{editable && ( {editable && (
<button <button
type="button" type="button"

View File

@ -54,8 +54,8 @@ export const IssueBlock: React.FC<IssueBlockProps> = observer((props: IssueBlock
} }
)} )}
> >
<div className="flex w-full"> <div className="flex w-full truncate">
<div className="flex flex-grow items-center gap-3"> <div className="flex flex-grow items-center gap-3 truncate">
{displayProperties && displayProperties?.key && ( {displayProperties && displayProperties?.key && (
<div className="flex-shrink-0 text-xs font-medium text-custom-text-300"> <div className="flex-shrink-0 text-xs font-medium text-custom-text-300">
{projectIdentifier}-{issue.sequence_id} {projectIdentifier}-{issue.sequence_id}
@ -68,7 +68,7 @@ export const IssueBlock: React.FC<IssueBlockProps> = observer((props: IssueBlock
{issue?.is_draft ? ( {issue?.is_draft ? (
<Tooltip tooltipContent={issue.name} isMobile={isMobile}> <Tooltip tooltipContent={issue.name} isMobile={isMobile}>
<span>{issue.name}</span> <p className="truncate">{issue.name}</p>
</Tooltip> </Tooltip>
) : ( ) : (
<ControlLink <ControlLink
@ -78,11 +78,11 @@ export const IssueBlock: React.FC<IssueBlockProps> = observer((props: IssueBlock
}`} }`}
target="_blank" target="_blank"
onClick={() => handleIssuePeekOverview(issue)} onClick={() => handleIssuePeekOverview(issue)}
className="w-full line-clamp-1 cursor-pointer text-sm text-custom-text-100" className="w-full truncate cursor-pointer text-sm text-custom-text-100"
disabled={!!issue?.tempId} disabled={!!issue?.tempId}
> >
<Tooltip tooltipContent={issue.name} isMobile={isMobile}> <Tooltip tooltipContent={issue.name} isMobile={isMobile}>
<span>{issue.name}</span> <p className="truncate">{issue.name}</p>
</Tooltip> </Tooltip>
</ControlLink> </ControlLink>
)} )}
@ -91,7 +91,7 @@ export const IssueBlock: React.FC<IssueBlockProps> = observer((props: IssueBlock
<div className="block md:hidden border border-custom-border-300 rounded ">{quickActions(issue)}</div> <div className="block md:hidden border border-custom-border-300 rounded ">{quickActions(issue)}</div>
)} )}
</div> </div>
<div className="ml-0 md:ml-auto flex flex-wrap md:flex-shrink-0 items-center gap-2"> <div className="flex flex-shrink-0 items-center gap-2">
{!issue?.tempId ? ( {!issue?.tempId ? (
<> <>
<IssueProperties <IssueProperties

View File

@ -35,8 +35,8 @@ export const ProjectFeatureUpdate: FC<Props> = observer((props) => {
<ProjectFeaturesList workspaceSlug={workspaceSlug} projectId={projectId} isAdmin /> <ProjectFeaturesList workspaceSlug={workspaceSlug} projectId={projectId} isAdmin />
<div className="flex items-center justify-between gap-2 mt-4 px-4 pt-4 pb-2 border-t border-custom-border-100"> <div className="flex items-center justify-between gap-2 mt-4 px-4 pt-4 pb-2 border-t border-custom-border-100">
<div className="text-sm text-custom-text-300 font-medium"> <div className="text-sm text-custom-text-300 font-medium">
Congrats! Project <ProjectLogo logo={currentProjectDetails.logo_props} /> {currentProjectDetails.name}{" "} Congrats! Project <ProjectLogo logo={currentProjectDetails.logo_props} />{" "}
created. <p className="break-all">{currentProjectDetails.name}</p> created.
</div> </div>
<div className="flex gap-2"> <div className="flex gap-2">
<Button variant="neutral-primary" size="sm" onClick={onClose} tabIndex={1}> <Button variant="neutral-primary" size="sm" onClick={onClose} tabIndex={1}>

View File

@ -225,7 +225,7 @@ export const ProjectSidebarListItem: React.FC<Props> = observer((props) => {
"justify-center": isCollapsed, "justify-center": isCollapsed,
})} })}
> >
<div className="h-7 w-7 grid place-items-center"> <div className="h-7 w-7 grid place-items-center flex-shrink-0">
<ProjectLogo logo={project.logo_props} /> <ProjectLogo logo={project.logo_props} />
</div> </div>
{!isCollapsed && <p className="truncate text-custom-sidebar-text-200">{project.name}</p>} {!isCollapsed && <p className="truncate text-custom-sidebar-text-200">{project.name}</p>}