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: (
<div className="flex items-center gap-2">
<Avatar user={member.member} />
{member.member.first_name && member.member.first_name !== ""
? member.member.first_name
: member.member.email}
{`${
member.member.first_name && member.member.first_name !== ""
? member.member.first_name
: member.member.email
} ${member.member.last_name ?? ""}`}
</div>
),
})) ?? [];

View File

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

View File

@ -84,7 +84,7 @@ export const SidebarCycleSelect: React.FC<Props> = ({
? removeIssueFromCycle(issueCycle?.id ?? "", issueCycle?.cycle ?? "")
: handleCycleChange(incompleteCycles?.find((c) => c.id === value) as ICycle);
}}
width="w-full"
width="auto"
position="right"
maxHeight="rg"
disabled={isNotAllowed}
@ -95,7 +95,7 @@ export const SidebarCycleSelect: React.FC<Props> = ({
{incompleteCycles.map((option) => (
<CustomSelect.Option key={option.id} value={option.id}>
<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>
</CustomSelect.Option>
))}

View File

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

View File

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