ИСПРАВЛЕНИЕ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: устойчивость issue экранов

This commit is contained in:
DCCONSTRUCTIONS 2026-05-06 08:59:01 +03:00
parent 11951c1eef
commit 9fa05d60b6
9 changed files with 33 additions and 20 deletions

View File

@ -215,7 +215,7 @@ export const SubIssuesListItemProperties = observer(function SubIssuesListItemPr
<WithDisplayPropertiesHOC displayProperties={displayProperties} displayPropertyKey="assignee"> <WithDisplayPropertiesHOC displayProperties={displayProperties} displayPropertyKey="assignee">
<div className="h-5 flex-shrink-0"> <div className="h-5 flex-shrink-0">
<MemberDropdown <MemberDropdown
value={issue.assignee_ids} value={issue.assignee_ids ?? []}
projectId={issue.project_id ?? undefined} projectId={issue.project_id ?? undefined}
onChange={(val) => onChange={(val) =>
issue.project_id && issue.project_id &&

View File

@ -81,6 +81,7 @@ export const IssueDetailsSidebar = observer(function IssueDetailsSidebar(props:
const maxDate = issue.target_date ? getDate(issue.target_date) : null; const maxDate = issue.target_date ? getDate(issue.target_date) : null;
maxDate?.setDate(maxDate.getDate()); maxDate?.setDate(maxDate.getDate());
const assigneeIds = issue.assignee_ids ?? [];
return ( return (
<> <>
@ -105,17 +106,17 @@ export const IssueDetailsSidebar = observer(function IssueDetailsSidebar(props:
<SidebarPropertyListItem icon={MembersPropertyIcon} label={t("common.assignees")}> <SidebarPropertyListItem icon={MembersPropertyIcon} label={t("common.assignees")}>
<MemberDropdown <MemberDropdown
value={issue?.assignee_ids ?? undefined} value={assigneeIds}
onChange={(val) => issueOperations.update(workspaceSlug, projectId, issueId, { assignee_ids: val })} onChange={(val) => issueOperations.update(workspaceSlug, projectId, issueId, { assignee_ids: val })}
disabled={!isEditable} disabled={!isEditable}
projectId={projectId?.toString() ?? ""} projectId={projectId?.toString() ?? ""}
placeholder={t("issue.add.assignee")} placeholder={t("issue.add.assignee")}
multiple multiple
buttonVariant={issue?.assignee_ids?.length > 1 ? "transparent-without-text" : "transparent-with-text"} buttonVariant={assigneeIds.length > 1 ? "transparent-without-text" : "transparent-with-text"}
className="group w-full grow" className="group w-full grow"
buttonContainerClassName="w-full text-left h-7.5" buttonContainerClassName="w-full text-left h-7.5"
buttonClassName={`text-body-xs-regular justify-between ${issue?.assignee_ids?.length > 0 ? "" : "text-placeholder"}`} buttonClassName={`text-body-xs-regular justify-between ${assigneeIds.length > 0 ? "" : "text-placeholder"}`}
hideIcon={issue.assignee_ids?.length === 0} hideIcon={assigneeIds.length === 0}
dropdownArrow dropdownArrow
dropdownArrowClassName="h-3.5 w-3.5 hidden group-hover:inline" dropdownArrowClassName="h-3.5 w-3.5 hidden group-hover:inline"
/> />

View File

@ -52,6 +52,10 @@ export const IssueLayoutHOC = observer(function IssueLayoutHOC(props: Props) {
const { issues } = useIssues(storeType); const { issues } = useIssues(storeType);
useIssueRealtimeEvents(storeType, workspaceSlug?.toString(), projectId?.toString()); useIssueRealtimeEvents(storeType, workspaceSlug?.toString(), projectId?.toString());
if (!issues) {
return <ActiveLoader layout={layout} />;
}
const issueCount = issues.getGroupIssueCount(undefined, undefined, false); const issueCount = issues.getGroupIssueCount(undefined, undefined, false);
if (issues?.getIssueLoader() === "init-loader" || issueCount === undefined) { if (issues?.getIssueLoader() === "init-loader" || issueCount === undefined) {

View File

@ -268,6 +268,10 @@ export const BaseKanBanRoot = observer(function BaseKanBanRoot(props: IBaseKanBa
const collapsedGroups = issuesFilter?.issueFilters?.kanbanFilters || { group_by: [], sub_group_by: [] }; const collapsedGroups = issuesFilter?.issueFilters?.kanbanFilters || { group_by: [], sub_group_by: [] };
if (!issues) {
return null;
}
return ( return (
<> <>
<DeleteIssueModal <DeleteIssueModal

View File

@ -86,6 +86,7 @@ export const InternalContourKanbanCard = observer(function InternalContourKanban
const checkerItemsTotal = issue.checker_items_count ?? 0; const checkerItemsTotal = issue.checker_items_count ?? 0;
const checkerItemsCompleted = issue.checker_items_completed_count ?? 0; const checkerItemsCompleted = issue.checker_items_completed_count ?? 0;
const hasCheckerProgress = checkerBlocksTotal > 0; const hasCheckerProgress = checkerBlocksTotal > 0;
const assigneeIds = issue.assignee_ids ?? [];
const cornerControlClasses = cn( const cornerControlClasses = cn(
"flex h-12 w-12 -translate-x-0.5 -translate-y-0.5 items-center justify-center rounded-full border bg-transparent shadow-none ring-0 transition-colors outline-none", "flex h-12 w-12 -translate-x-0.5 -translate-y-0.5 items-center justify-center rounded-full border bg-transparent shadow-none ring-0 transition-colors outline-none",
isActive isActive
@ -246,7 +247,7 @@ export const InternalContourKanbanCard = observer(function InternalContourKanban
<> <>
<MemberDropdown <MemberDropdown
projectId={issue.project_id ?? undefined} projectId={issue.project_id ?? undefined}
value={issue.assignee_ids} value={assigneeIds}
onChange={(assigneeIds) => updateIssue?.(issue.project_id ?? null, issue.id, { assignee_ids: assigneeIds })} onChange={(assigneeIds) => updateIssue?.(issue.project_id ?? null, issue.id, { assignee_ids: assigneeIds })}
disabled={isReadOnly || !updateIssue} disabled={isReadOnly || !updateIssue}
multiple multiple
@ -261,7 +262,7 @@ export const InternalContourKanbanCard = observer(function InternalContourKanban
isActive ? "text-[rgb(var(--nodedc-on-card-active-rgb))]" : "text-white" isActive ? "text-[rgb(var(--nodedc-on-card-active-rgb))]" : "text-white"
)} )}
> >
<ButtonAvatars showTooltip={false} userIds={issue.assignee_ids} size={26} /> <ButtonAvatars showTooltip={false} userIds={assigneeIds} size={26} />
</div> </div>
} }
/> />

View File

@ -191,6 +191,7 @@ export const IssueProperties = observer(function IssueProperties(props: IIssuePr
); );
const defaultLabelOptions = issue?.label_ids?.map((id) => labelMap[id]) || []; const defaultLabelOptions = issue?.label_ids?.map((id) => labelMap[id]) || [];
const assigneeIds = issue.assignee_ids ?? [];
const minDate = getDate(issue.start_date); const minDate = getDate(issue.start_date);
const maxDate = getDate(issue.target_date); const maxDate = getDate(issue.target_date);
@ -365,13 +366,13 @@ export const IssueProperties = observer(function IssueProperties(props: IIssuePr
> >
<MemberDropdown <MemberDropdown
projectId={issue?.project_id} projectId={issue?.project_id}
value={issue?.assignee_ids} value={assigneeIds}
onChange={handleAssignee} onChange={handleAssignee}
disabled={isReadOnly} disabled={isReadOnly}
multiple multiple
buttonVariant={issue.assignee_ids?.length > 0 ? "transparent-without-text" : "border-without-text"} buttonVariant={assigneeIds.length > 0 ? "transparent-without-text" : "border-without-text"}
buttonClassName={issue.assignee_ids?.length > 0 ? "hover:bg-transparent px-0" : ""} buttonClassName={assigneeIds.length > 0 ? "hover:bg-transparent px-0" : ""}
showTooltip={issue?.assignee_ids?.length === 0} showTooltip={assigneeIds.length === 0}
placeholder={t("common.assignees")} placeholder={t("common.assignees")}
optionsClassName="z-10" optionsClassName="z-10"
tooltipContent="" tooltipContent=""

View File

@ -77,6 +77,7 @@ export const PeekOverviewProperties = observer(function PeekOverviewProperties(p
const maxDate = getDate(issue.target_date); const maxDate = getDate(issue.target_date);
maxDate?.setDate(maxDate.getDate()); maxDate?.setDate(maxDate.getDate());
const assigneeIds = issue.assignee_ids ?? [];
return ( return (
<div> <div>
@ -99,17 +100,17 @@ export const PeekOverviewProperties = observer(function PeekOverviewProperties(p
<SidebarPropertyListItem icon={MembersPropertyIcon} label={t("common.assignees")}> <SidebarPropertyListItem icon={MembersPropertyIcon} label={t("common.assignees")}>
<MemberDropdown <MemberDropdown
value={issue?.assignee_ids ?? undefined} value={assigneeIds}
onChange={(val) => issueOperations.update(workspaceSlug, projectId, issueId, { assignee_ids: val })} onChange={(val) => issueOperations.update(workspaceSlug, projectId, issueId, { assignee_ids: val })}
disabled={disabled} disabled={disabled}
projectId={projectId} projectId={projectId}
placeholder={t("issue.add.assignee")} placeholder={t("issue.add.assignee")}
multiple multiple
buttonVariant={issue?.assignee_ids?.length > 1 ? "transparent-without-text" : "transparent-with-text"} buttonVariant={assigneeIds.length > 1 ? "transparent-without-text" : "transparent-with-text"}
className="group w-full grow" className="group w-full grow"
buttonContainerClassName="w-full text-left h-7.5" buttonContainerClassName="w-full text-left h-7.5"
buttonClassName={`text-body-xs-medium justify-between ${issue?.assignee_ids?.length > 0 ? "" : "text-placeholder"}`} buttonClassName={`text-body-xs-medium justify-between ${assigneeIds.length > 0 ? "" : "text-placeholder"}`}
hideIcon={issue.assignee_ids?.length === 0} hideIcon={assigneeIds.length === 0}
dropdownArrow dropdownArrow
dropdownArrowClassName="h-3.5 w-3.5 hidden group-hover:inline" dropdownArrowClassName="h-3.5 w-3.5 hidden group-hover:inline"
/> />

View File

@ -81,7 +81,7 @@ export const RelationIssueProperty = observer(function RelationIssueProperty(pro
<div className="h-5 flex-shrink-0"> <div className="h-5 flex-shrink-0">
<MemberDropdown <MemberDropdown
value={issue.assignee_ids} value={issue.assignee_ids ?? []}
projectId={issue.project_id ?? undefined} projectId={issue.project_id ?? undefined}
onChange={handleAssigneeChange} onChange={handleAssigneeChange}
disabled={disabled} disabled={disabled}

View File

@ -125,6 +125,7 @@ export const DraftIssueProperties = observer(function DraftIssueProperties(props
if (!issue.project_id) return null; if (!issue.project_id) return null;
const defaultLabelOptions = issue?.label_ids?.map((id) => labelMap[id]) || []; const defaultLabelOptions = issue?.label_ids?.map((id) => labelMap[id]) || [];
const assigneeIds = issue.assignee_ids ?? [];
const minDate = getDate(issue.start_date); const minDate = getDate(issue.start_date);
minDate?.setDate(minDate.getDate()); minDate?.setDate(minDate.getDate());
@ -222,12 +223,12 @@ export const DraftIssueProperties = observer(function DraftIssueProperties(props
<div className="h-5" onClick={handleEventPropagation}> <div className="h-5" onClick={handleEventPropagation}>
<MemberDropdown <MemberDropdown
projectId={issue?.project_id} projectId={issue?.project_id}
value={issue?.assignee_ids} value={assigneeIds}
onChange={handleAssignee} onChange={handleAssignee}
multiple multiple
buttonVariant={issue.assignee_ids?.length > 0 ? "transparent-without-text" : "border-without-text"} buttonVariant={assigneeIds.length > 0 ? "transparent-without-text" : "border-without-text"}
buttonClassName={issue.assignee_ids?.length > 0 ? "hover:bg-transparent px-0" : ""} buttonClassName={assigneeIds.length > 0 ? "hover:bg-transparent px-0" : ""}
showTooltip={issue?.assignee_ids?.length === 0} showTooltip={assigneeIds.length === 0}
placeholder={t("assignees")} placeholder={t("assignees")}
optionsClassName="z-10" optionsClassName="z-10"
tooltipContent="" tooltipContent=""