Skip to content
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

feat: add pages and page blocks #495

Merged
merged 6 commits into from
Mar 23, 2023
Merged

feat: add pages and page blocks #495

merged 6 commits into from
Mar 23, 2023

Conversation

iamsahebgiri
Copy link
Contributor

  • Created the page UI as per design.
  • Implemented add page to favorite and remove page from favorite.
  • Can able to update and delete page
  • Can able to create, update and delete page blocks.

@vercel
Copy link

vercel bot commented Mar 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
plane ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 23, 2023 at 4:49AM (UTC)
plane-dev ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 23, 2023 at 4:49AM (UTC)
plane-staging ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 23, 2023 at 4:49AM (UTC)

};

const createPage = async (payload: IPageForm) => {
payload = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this line?

.createPage(workspaceSlug as string, projectId as string, payload)
.then(() => {
mutate(PAGE_LIST(projectId as string));
handleClose();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to onClose()

const handleDeletion = async () => {
setIsDeleteLoading(true);
if (!data || !workspaceSlug) return;
console.log(data);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this console.log

});
})
.catch((error) => {
console.log(error);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a toast alert to handle this error

query: { workspaceSlug, projectId, pageId },
} = useRouter();

const handleMouseEnter = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use tailwind group to handle the hover events.

workspaceSlug: string,
projectId: string,
pageId: string,
data: IPageForm
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data needs to be Partial for the patch request

projectId: string,
pageId: string,
pageBlockId: string,
data: IPageBlockForm
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data needs to be Partial for the patch request

- used tailwind for hover events
- add error toast alert
- used partial for patch request
className="border-none bg-transparent outline-none"
/>

<div className="absolute top-[50%] right-0 z-20 mr-2 hidden translate-y-[-50%] group-hover:block">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to use absolute positioning, just flex justify between would be fine

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I have fixed it

@aaryan610 aaryan610 merged commit 10e5ba7 into develop Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants