[WEB-4522]fix: removed redundant state indicator (#7434)
* fix: removed redundant state indicator * fix: removed redundant state indicator for relation list item
This commit is contained in:
parent
a75ae71ff0
commit
3ab1f0de84
2 changed files with 3 additions and 22 deletions
|
|
@ -11,7 +11,7 @@ import { cn, generateWorkItemLink } from "@plane/utils";
|
||||||
import { useSubIssueOperations } from "@/components/issues/issue-detail-widgets/sub-issues/helper";
|
import { useSubIssueOperations } from "@/components/issues/issue-detail-widgets/sub-issues/helper";
|
||||||
import { WithDisplayPropertiesHOC } from "@/components/issues/issue-layouts/properties/with-display-properties-HOC";
|
import { WithDisplayPropertiesHOC } from "@/components/issues/issue-layouts/properties/with-display-properties-HOC";
|
||||||
// hooks
|
// hooks
|
||||||
import { useIssueDetail, useProject, useProjectState } from "@/hooks/store";
|
import { useIssueDetail, useProject } from "@/hooks/store";
|
||||||
import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection";
|
import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection";
|
||||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||||
// plane web components
|
// plane web components
|
||||||
|
|
@ -65,16 +65,12 @@ export const SubIssuesListItem: React.FC<Props> = observer((props) => {
|
||||||
const { fetchSubIssues } = useSubIssueOperations(EIssueServiceType.ISSUES);
|
const { fetchSubIssues } = useSubIssueOperations(EIssueServiceType.ISSUES);
|
||||||
const { toggleCreateIssueModal, toggleDeleteIssueModal } = useIssueDetail(issueServiceType);
|
const { toggleCreateIssueModal, toggleDeleteIssueModal } = useIssueDetail(issueServiceType);
|
||||||
const project = useProject();
|
const project = useProject();
|
||||||
const { getProjectStates } = useProjectState();
|
|
||||||
const { handleRedirection } = useIssuePeekOverviewRedirection();
|
const { handleRedirection } = useIssuePeekOverviewRedirection();
|
||||||
const { isMobile } = usePlatformOS();
|
const { isMobile } = usePlatformOS();
|
||||||
const issue = getIssueById(issueId);
|
const issue = getIssueById(issueId);
|
||||||
|
|
||||||
// derived values
|
// derived values
|
||||||
const projectDetail = (issue && issue.project_id && project.getProjectById(issue.project_id)) || undefined;
|
const projectDetail = (issue && issue.project_id && project.getProjectById(issue.project_id)) || undefined;
|
||||||
const currentIssueStateDetail =
|
|
||||||
(issue?.project_id && getProjectStates(issue?.project_id)?.find((state) => issue?.state_id == state.id)) ||
|
|
||||||
undefined;
|
|
||||||
|
|
||||||
const subIssueHelpers = subIssueHelpersByIssueId(parentIssueId);
|
const subIssueHelpers = subIssueHelpersByIssueId(parentIssueId);
|
||||||
const subIssueCount = issue?.sub_issues_count ?? 0;
|
const subIssueCount = issue?.sub_issues_count ?? 0;
|
||||||
|
|
@ -147,12 +143,6 @@ export const SubIssuesListItem: React.FC<Props> = observer((props) => {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex w-full truncate cursor-pointer items-center gap-3">
|
<div className="flex w-full truncate cursor-pointer items-center gap-3">
|
||||||
<div
|
|
||||||
className="h-2 w-2 flex-shrink-0 rounded-full"
|
|
||||||
style={{
|
|
||||||
backgroundColor: currentIssueStateDetail?.color ?? "#737373",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<WithDisplayPropertiesHOC displayProperties={displayProperties || {}} displayPropertyKey="key">
|
<WithDisplayPropertiesHOC displayProperties={displayProperties || {}} displayPropertyKey="key">
|
||||||
<div className="flex-shrink-0">
|
<div className="flex-shrink-0">
|
||||||
{projectDetail && (
|
{projectDetail && (
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import { generateWorkItemLink } from "@plane/utils";
|
||||||
import { RelationIssueProperty } from "@/components/issues/relations";
|
import { RelationIssueProperty } from "@/components/issues/relations";
|
||||||
// helpers
|
// helpers
|
||||||
// hooks
|
// hooks
|
||||||
import { useIssueDetail, useProject, useProjectState } from "@/hooks/store";
|
import { useIssueDetail, useProject } from "@/hooks/store";
|
||||||
import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection";
|
import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-redirection";
|
||||||
import { usePlatformOS } from "@/hooks/use-platform-os";
|
import { usePlatformOS } from "@/hooks/use-platform-os";
|
||||||
// plane web components
|
// plane web components
|
||||||
|
|
@ -58,7 +58,6 @@ export const RelationIssueListItem: FC<Props> = observer((props) => {
|
||||||
toggleDeleteIssueModal,
|
toggleDeleteIssueModal,
|
||||||
} = useIssueDetail(issueServiceType);
|
} = useIssueDetail(issueServiceType);
|
||||||
const project = useProject();
|
const project = useProject();
|
||||||
const { getProjectStates } = useProjectState();
|
|
||||||
const { isMobile } = usePlatformOS();
|
const { isMobile } = usePlatformOS();
|
||||||
// derived values
|
// derived values
|
||||||
const issue = getIssueById(relationIssueId);
|
const issue = getIssueById(relationIssueId);
|
||||||
|
|
@ -66,9 +65,7 @@ export const RelationIssueListItem: FC<Props> = observer((props) => {
|
||||||
const issueOperations = useRelationOperations(!!issue?.is_epic ? EIssueServiceType.EPICS : EIssueServiceType.ISSUES);
|
const issueOperations = useRelationOperations(!!issue?.is_epic ? EIssueServiceType.EPICS : EIssueServiceType.ISSUES);
|
||||||
const projectDetail = (issue && issue.project_id && project.getProjectById(issue.project_id)) || undefined;
|
const projectDetail = (issue && issue.project_id && project.getProjectById(issue.project_id)) || undefined;
|
||||||
const projectId = issue?.project_id;
|
const projectId = issue?.project_id;
|
||||||
const currentIssueStateDetail =
|
|
||||||
(issue?.project_id && getProjectStates(issue?.project_id)?.find((state) => issue?.state_id == state.id)) ||
|
|
||||||
undefined;
|
|
||||||
if (!issue || !projectId) return <></>;
|
if (!issue || !projectId) return <></>;
|
||||||
|
|
||||||
const workItemLink = generateWorkItemLink({
|
const workItemLink = generateWorkItemLink({
|
||||||
|
|
@ -129,12 +126,6 @@ export const RelationIssueListItem: FC<Props> = observer((props) => {
|
||||||
<div className="group relative flex min-h-11 h-full w-full items-center gap-3 px-1.5 py-1 transition-all hover:bg-custom-background-90">
|
<div className="group relative flex min-h-11 h-full w-full items-center gap-3 px-1.5 py-1 transition-all hover:bg-custom-background-90">
|
||||||
<span className="size-5 flex-shrink-0" />
|
<span className="size-5 flex-shrink-0" />
|
||||||
<div className="flex w-full truncate cursor-pointer items-center gap-3">
|
<div className="flex w-full truncate cursor-pointer items-center gap-3">
|
||||||
<div
|
|
||||||
className="h-2 w-2 flex-shrink-0 rounded-full"
|
|
||||||
style={{
|
|
||||||
backgroundColor: currentIssueStateDetail?.color ?? "#737373",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<div className="flex-shrink-0">
|
<div className="flex-shrink-0">
|
||||||
{projectDetail && (
|
{projectDetail && (
|
||||||
<IssueIdentifier
|
<IssueIdentifier
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue