-
Notifications
You must be signed in to change notification settings - Fork 5.7k
fix(web): hide work item IDs when Display → IDs is off #9803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: preview
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ import useIssuePeekOverviewRedirection from "@/hooks/use-issue-peek-overview-red | |
| import { usePlatformOS } from "@/hooks/use-platform-os"; | ||
| // components | ||
| import { IssueIdentifier } from "@/components/issues/issue-detail/issue-identifier"; | ||
| import { WithDisplayPropertiesHOC } from "@/components/issues/issue-layouts/properties/with-display-properties-HOC"; | ||
| // local components | ||
| import { WorkItemPreviewCard } from "../../preview-card"; | ||
| import type { TRenderQuickActions } from "../list/list-view-types"; | ||
|
|
@@ -132,13 +133,18 @@ export const CalendarIssueBlock = observer( | |
| }} | ||
| /> | ||
| {issue.project_id && ( | ||
| <IssueIdentifier | ||
| issueId={issue.id} | ||
| projectId={issue.project_id} | ||
| size="xs" | ||
| variant="tertiary" | ||
| displayProperties={issuesFilter?.issueFilters?.displayProperties} | ||
| /> | ||
| <WithDisplayPropertiesHOC | ||
| displayProperties={issuesFilter?.issueFilters?.displayProperties || {}} | ||
| displayPropertyKey="key" | ||
| > | ||
| <IssueIdentifier | ||
| issueId={issue.id} | ||
| projectId={issue.project_id} | ||
| size="xs" | ||
| variant="tertiary" | ||
| displayProperties={issuesFilter?.issueFilters?.displayProperties} | ||
| /> | ||
| </WithDisplayPropertiesHOC> | ||
|
Comment on lines
+136
to
+147
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift Preserve identifier visibility when display properties are absent.
📍 Affects 3 files
🤖 Prompt for AI Agents |
||
| )} | ||
| <div className="truncate text-13 font-medium md:text-11 md:font-regular">{issue.name}</div> | ||
| </div> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -312,6 +312,15 @@ export const getComputedDisplayProperties = ( | |
| issue_type: displayProperties?.issue_type ?? true, | ||
| }); | ||
|
|
||
| /** | ||
| * @description Hide work item IDs when Display → IDs is off. Callers that omit | ||
| * `displayProperties` (detail views, pickers, search) always show the identifier. | ||
| */ | ||
| export const shouldDisplayWorkItemId = (displayProperties?: IIssueDisplayProperties): boolean => { | ||
| if (!displayProperties) return true; | ||
| return !!displayProperties.key; | ||
|
Comment on lines
+319
to
+321
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This behavior-changing fix adds a shared predicate and new gates across four layouts without adding any unit tests. Add coverage for omitted properties and for AGENTS.md reference: AGENTS.md:L23-L23 Useful? React with 👍 / 👎. |
||
| }; | ||
|
|
||
| export const generateWorkItemLink = ({ | ||
| workspaceSlug, | ||
| projectId, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a populated
displayPropertiesobject haskey: false, the parent revision'sIssueIdentifieralready returnednull; whenkeywas true, it rendered. The new HOC checks that same key and the new helper preserves the original truth table, so toggling Display → IDs still cannot change behavior beyond what existed before this commit. The underlying stale or incorrect display-property flow needs to be fixed instead of duplicating the existing predicate.Useful? React with 👍 / 👎.