ИСПРАВЛЕНИЕ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: устойчивость 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">
<div className="h-5 flex-shrink-0">
<MemberDropdown
value={issue.assignee_ids}
value={issue.assignee_ids ?? []}
projectId={issue.project_id ?? undefined}
onChange={(val) =>
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;
maxDate?.setDate(maxDate.getDate());
const assigneeIds = issue.assignee_ids ?? [];
return (
<>
@ -105,17 +106,17 @@ export const IssueDetailsSidebar = observer(function IssueDetailsSidebar(props:
<SidebarPropertyListItem icon={MembersPropertyIcon} label={t("common.assignees")}>
<MemberDropdown
value={issue?.assignee_ids ?? undefined}
value={assigneeIds}
onChange={(val) => issueOperations.update(workspaceSlug, projectId, issueId, { assignee_ids: val })}
disabled={!isEditable}
projectId={projectId?.toString() ?? ""}
placeholder={t("issue.add.assignee")}
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"
buttonContainerClassName="w-full text-left h-7.5"
buttonClassName={`text-body-xs-regular justify-between ${issue?.assignee_ids?.length > 0 ? "" : "text-placeholder"}`}
hideIcon={issue.assignee_ids?.length === 0}
buttonClassName={`text-body-xs-regular justify-between ${assigneeIds.length > 0 ? "" : "text-placeholder"}`}
hideIcon={assigneeIds.length === 0}
dropdownArrow
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);
useIssueRealtimeEvents(storeType, workspaceSlug?.toString(), projectId?.toString());
if (!issues) {
return <ActiveLoader layout={layout} />;
}
const issueCount = issues.getGroupIssueCount(undefined, undefined, false);
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: [] };
if (!issues) {
return null;
}
return (
<>
<DeleteIssueModal

View File

@ -86,6 +86,7 @@ export const InternalContourKanbanCard = observer(function InternalContourKanban
const checkerItemsTotal = issue.checker_items_count ?? 0;
const checkerItemsCompleted = issue.checker_items_completed_count ?? 0;
const hasCheckerProgress = checkerBlocksTotal > 0;
const assigneeIds = issue.assignee_ids ?? [];
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",
isActive
@ -246,7 +247,7 @@ export const InternalContourKanbanCard = observer(function InternalContourKanban
<>
<MemberDropdown
projectId={issue.project_id ?? undefined}
value={issue.assignee_ids}
value={assigneeIds}
onChange={(assigneeIds) => updateIssue?.(issue.project_id ?? null, issue.id, { assignee_ids: assigneeIds })}
disabled={isReadOnly || !updateIssue}
multiple
@ -261,7 +262,7 @@ export const InternalContourKanbanCard = observer(function InternalContourKanban
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>
}
/>

View File

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

View File

@ -77,6 +77,7 @@ export const PeekOverviewProperties = observer(function PeekOverviewProperties(p
const maxDate = getDate(issue.target_date);
maxDate?.setDate(maxDate.getDate());
const assigneeIds = issue.assignee_ids ?? [];
return (
<div>
@ -99,17 +100,17 @@ export const PeekOverviewProperties = observer(function PeekOverviewProperties(p
<SidebarPropertyListItem icon={MembersPropertyIcon} label={t("common.assignees")}>
<MemberDropdown
value={issue?.assignee_ids ?? undefined}
value={assigneeIds}
onChange={(val) => issueOperations.update(workspaceSlug, projectId, issueId, { assignee_ids: val })}
disabled={disabled}
projectId={projectId}
placeholder={t("issue.add.assignee")}
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"
buttonContainerClassName="w-full text-left h-7.5"
buttonClassName={`text-body-xs-medium justify-between ${issue?.assignee_ids?.length > 0 ? "" : "text-placeholder"}`}
hideIcon={issue.assignee_ids?.length === 0}
buttonClassName={`text-body-xs-medium justify-between ${assigneeIds.length > 0 ? "" : "text-placeholder"}`}
hideIcon={assigneeIds.length === 0}
dropdownArrow
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">
<MemberDropdown
value={issue.assignee_ids}
value={issue.assignee_ids ?? []}
projectId={issue.project_id ?? undefined}
onChange={handleAssigneeChange}
disabled={disabled}

View File

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