fix: sidebar dropdown fix, feat: assignee name updated (#1089)

* fix: issue sidebar cycle and module dropdown width fix

* feat: issue sidebar, issue card and issue modal assignee full name added
This commit is contained in:
Anmol Singh Bhatia 2023-05-19 20:00:09 +05:30 committed by GitHub
parent b1f26f322f
commit ab273f6be3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 15 deletions

View File

@ -41,9 +41,11 @@ export const IssueAssigneeSelect: React.FC<Props> = ({ projectId, value = [], on
content: ( content: (
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Avatar user={member.member} /> <Avatar user={member.member} />
{member.member.first_name && member.member.first_name !== "" {`${
? member.member.first_name member.member.first_name && member.member.first_name !== ""
: member.member.email} ? member.member.first_name
: member.member.email
} ${member.member.last_name ?? ""}`}
</div> </div>
), ),
})) ?? []; })) ?? [];

View File

@ -45,9 +45,11 @@ export const SidebarAssigneeSelect: React.FC<Props> = ({ value, onChange, userAu
content: ( content: (
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Avatar user={member.member} /> <Avatar user={member.member} />
{member.member.first_name && member.member.first_name !== "" {`${
? member.member.first_name member.member.first_name && member.member.first_name !== ""
: member.member.email} ? member.member.first_name
: member.member.email
} ${member.member.last_name ?? ""}`}
</div> </div>
), ),
})) ?? []; })) ?? [];

View File

@ -84,7 +84,7 @@ export const SidebarCycleSelect: React.FC<Props> = ({
? removeIssueFromCycle(issueCycle?.id ?? "", issueCycle?.cycle ?? "") ? removeIssueFromCycle(issueCycle?.id ?? "", issueCycle?.cycle ?? "")
: handleCycleChange(incompleteCycles?.find((c) => c.id === value) as ICycle); : handleCycleChange(incompleteCycles?.find((c) => c.id === value) as ICycle);
}} }}
width="w-full" width="auto"
position="right" position="right"
maxHeight="rg" maxHeight="rg"
disabled={isNotAllowed} disabled={isNotAllowed}
@ -95,7 +95,7 @@ export const SidebarCycleSelect: React.FC<Props> = ({
{incompleteCycles.map((option) => ( {incompleteCycles.map((option) => (
<CustomSelect.Option key={option.id} value={option.id}> <CustomSelect.Option key={option.id} value={option.id}>
<Tooltip position="left-bottom" tooltipContent={option.name}> <Tooltip position="left-bottom" tooltipContent={option.name}>
<span className="w-full truncate ">{truncateText(option.name, 15)}</span> <span className="w-full truncate">{truncateText(option.name, 25)}</span>
</Tooltip> </Tooltip>
</CustomSelect.Option> </CustomSelect.Option>
))} ))}

View File

@ -88,7 +88,7 @@ export const SidebarModuleSelect: React.FC<Props> = ({
? removeIssueFromModule(issueModule?.id ?? "", issueModule?.module ?? "") ? removeIssueFromModule(issueModule?.id ?? "", issueModule?.module ?? "")
: handleModuleChange(modules?.find((m) => m.id === value) as IModule); : handleModuleChange(modules?.find((m) => m.id === value) as IModule);
}} }}
width="w-full" width="auto"
position="right" position="right"
maxHeight="rg" maxHeight="rg"
disabled={isNotAllowed} disabled={isNotAllowed}
@ -99,9 +99,7 @@ export const SidebarModuleSelect: React.FC<Props> = ({
{modules.map((option) => ( {modules.map((option) => (
<CustomSelect.Option key={option.id} value={option.id}> <CustomSelect.Option key={option.id} value={option.id}>
<Tooltip position="left-bottom" tooltipContent={option.name}> <Tooltip position="left-bottom" tooltipContent={option.name}>
<span className="w-full max-w-[125px] truncate"> <span className="w-full truncate">{truncateText(option.name, 25)}</span>
{truncateText(option.name, 15)}
</span>
</Tooltip> </Tooltip>
</CustomSelect.Option> </CustomSelect.Option>
))} ))}

View File

@ -55,9 +55,11 @@ export const ViewAssigneeSelect: React.FC<Props> = ({
content: ( content: (
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Avatar user={member.member} /> <Avatar user={member.member} />
{member.member.first_name && member.member.first_name !== "" {`${
? member.member.first_name member.member.first_name && member.member.first_name !== ""
: member.member.email} ? member.member.first_name
: member.member.email
} ${member.member.last_name ?? ""}`}
</div> </div>
), ),
})) ?? []; })) ?? [];