-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[WEB-3268] feat: url pattern #6546
Open
anmolsinghbhatia
wants to merge
13
commits into
preview
Choose a base branch
from
feat-url-pattern
base: preview
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0ec1b91
feat: meta endpoint for issue
pablohashescobar 659656d
chore: add detail endpoint
pablohashescobar 629decd
chore: getIssueMetaFromURL and retrieveWithIdentifier endpoint added
anmolsinghbhatia a97ca4b
chore: issue store updated
anmolsinghbhatia 0a9bf13
chore: move issue detail to new route and add redirection for old route
anmolsinghbhatia e18962b
fix: issue details permission
anmolsinghbhatia 4f53263
fix: work item detail header
anmolsinghbhatia 396bc0e
chore: generateWorkItemLink helper function added
anmolsinghbhatia d68c199
chore: copyTextToClipboard helper function updated
anmolsinghbhatia 3939271
chore: workItemLink updated
anmolsinghbhatia 39fbd3d
chore: workItemLink updated
anmolsinghbhatia 1a523ef
chore: workItemLink updated
anmolsinghbhatia 1ca31e0
fix: issues navigation tab active status
anmolsinghbhatia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
web/app/[workspaceSlug]/(projects)/browse/[workItem]/header.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
"use client"; | ||
|
||
import { observer } from "mobx-react"; | ||
import { useParams } from "next/navigation"; | ||
import { Briefcase } from "lucide-react"; | ||
// ui | ||
import { Breadcrumbs, LayersIcon, Header, Logo } from "@plane/ui"; | ||
// components | ||
import { BreadcrumbLink } from "@/components/common"; | ||
import { IssueDetailQuickActions } from "@/components/issues"; | ||
// hooks | ||
import { useIssueDetail, useProject } from "@/hooks/store"; | ||
import { useAppRouter } from "@/hooks/use-app-router"; | ||
|
||
export const ProjectIssueDetailsHeader = observer(() => { | ||
// router | ||
const router = useAppRouter(); | ||
const { workspaceSlug, workItem } = useParams(); | ||
// store hooks | ||
const { getProjectById, loader } = useProject(); | ||
const { | ||
issue: { getIssueById, getIssueIdByIdentifier }, | ||
} = useIssueDetail(); | ||
// derived values | ||
const issueId = getIssueIdByIdentifier(workItem?.toString()); | ||
const issueDetails = issueId ? getIssueById(issueId.toString()) : undefined; | ||
const projectId = issueDetails ? issueDetails?.project_id : undefined; | ||
const projectDetails = projectId ? getProjectById(projectId?.toString()) : undefined; | ||
|
||
return ( | ||
<Header> | ||
<Header.LeftItem> | ||
<div> | ||
<Breadcrumbs onBack={router.back} isLoading={loader === "init-loader"}> | ||
<Breadcrumbs.BreadcrumbItem | ||
type="text" | ||
link={ | ||
<BreadcrumbLink | ||
label={projectDetails?.name ?? "Project"} | ||
icon={ | ||
projectDetails ? ( | ||
projectDetails && ( | ||
<span className="grid place-items-center flex-shrink-0 h-4 w-4"> | ||
<Logo logo={projectDetails?.logo_props} size={16} /> | ||
</span> | ||
) | ||
) : ( | ||
<span className="grid h-7 w-7 flex-shrink-0 place-items-center rounded uppercase"> | ||
<Briefcase className="h-4 w-4" /> | ||
</span> | ||
) | ||
} | ||
/> | ||
} | ||
/> | ||
|
||
<Breadcrumbs.BreadcrumbItem | ||
type="text" | ||
link={ | ||
<BreadcrumbLink | ||
href={`/${workspaceSlug}/projects/${projectId}/issues`} | ||
label="Issues" | ||
icon={<LayersIcon className="h-4 w-4 text-custom-text-300" />} | ||
/> | ||
} | ||
/> | ||
|
||
<Breadcrumbs.BreadcrumbItem | ||
type="text" | ||
link={ | ||
<BreadcrumbLink | ||
label={ | ||
projectDetails && issueDetails ? `${projectDetails.identifier}-${issueDetails.sequence_id}` : "" | ||
} | ||
/> | ||
} | ||
/> | ||
</Breadcrumbs> | ||
</div> | ||
</Header.LeftItem> | ||
<Header.RightItem> | ||
{projectId && issueId && ( | ||
<IssueDetailQuickActions | ||
workspaceSlug={workspaceSlug?.toString()} | ||
projectId={projectId?.toString()} | ||
issueId={issueId?.toString()} | ||
/> | ||
)} | ||
</Header.RightItem> | ||
</Header> | ||
); | ||
}); |
File renamed without changes.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
💡 Verification agent
🧩 Analysis chain
Verify impact of type change across the codebase.
This is a breaking change that requires updates to any code using the
TIssueActivityIssueDetail
type.Let's verify the impact:
🏁 Script executed:
Length of output: 719
🏁 Script executed:
Length of output: 13269
Impact of Changing
sequence_id
Type inTIssueActivityIssueDetail
Our investigation shows that the updated type in
packages/types/src/issues/activity/base.d.ts
declares
sequence_id
as a number. However, multiple parts of the codebase referencesequence_id
—and in several declarations (e.g., inpackages/types/src/inbox.d.ts
and inweb/core/services/issue/issue.service.ts
) it is defined or used as a string. This discrepancy indicates that changing the type here is indeed a breaking change that will affect any consumers ofTIssueActivityIssueDetail
relying on a string type.TIssueActivityIssueDetail
is imported (e.g., issue activity and issue comment types).sequence_id
as a string.Please review and update all consumers of
TIssueActivityIssueDetail
to accommodate the new type (or adjust the type change if unintended).