-
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
17
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 10 commits
Commits
Show all changes
17 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 088741b
fix: invalid workitem error state
anmolsinghbhatia 974ad13
chore: peek view parent issue redirection improvement
anmolsinghbhatia 7d67c0f
fix: issue detail endpoint to not return epics and intake issue
pablohashescobar 89e8f60
Merge branch 'feat-url-pattern' of github.com:makeplane/plane into fe…
pablohashescobar 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
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.
🛠️ 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