-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[WEB-3268] feat: url pattern #6546
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
Changes from all commits
0ec1b91
659656d
629decd
a97ca4b
0a9bf13
e18962b
4f53263
396bc0e
d68c199
3939271
39fbd3d
1a523ef
1ca31e0
088741b
974ad13
7d67c0f
89e8f60
b69256b
0d538dc
ac8e8f8
332c4c6
1bbc198
5ea512f
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 |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ export type TIssueActivityProjectDetail = { | |
|
|
||
| export type TIssueActivityIssueDetail = { | ||
| id: string; | ||
| sequence_id: boolean; | ||
| sequence_id: number; | ||
|
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. 💡 Verification agent 🧩 Analysis chainVerify impact of type change across the codebase. This is a breaking change that requires updates to any code using the Let's verify the impact: 🏁 Script executed: #!/bin/bash
# Description: Find usages of TIssueActivityIssueDetail and sequence_id to identify potential breaking changes
# Find files importing or using TIssueActivityIssueDetail
echo "Files potentially affected by the type change:"
rg "TIssueActivityIssueDetail"
# Find direct uses of sequence_id property
echo -e "\nDirect uses of sequence_id:"
rg "sequence_id" --type ts --type tsxLength of output: 719 🏁 Script executed: #!/bin/bash
# Re-run the search for direct uses of the sequence_id property across TypeScript, TSX, and declaration files using glob patterns instead of file type flags
echo "Direct uses of sequence_id across *.d.ts, *.ts, and *.tsx files:"
rg sequence_id -g "*.d.ts" -g "*.ts" -g "*.tsx"Length of output: 13269 Impact of Changing Our investigation shows that the updated type in
Please review and update all consumers of |
||
| sort_order: boolean; | ||
| name: string; | ||
| description_html: string; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| "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; | ||
|
|
||
| if (!workspaceSlug || !projectId || !issueId) return null; | ||
|
|
||
| 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 place-items-center flex-shrink-0 h-4 w-4"> | ||
| <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> | ||
| ); | ||
| }); |
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.
🛠️ Refactor suggestion
Use HTTP 403 for permission-related errors.
For consistency, use HTTP 403 (Forbidden) instead of HTTP 400 (Bad Request) when denying access to guest users. This aligns with HTTP standards where 403 indicates the server understood the request but refuses to authorize it.
📝 Committable suggestion