Added recent projects list to logged-in nav #557

Merged
franknoirot merged 1 commits from franknoirot/add-recent-projects into main 2021-10-15 15:24:29 +02:00
franknoirot commented 2021-10-13 23:08:47 +02:00 (Migrated from github.com)

Resolves #198.

Added list of 3 most recent projects to logged-in user menu in top nav, piggybacking off of existing Projects component. Restyled the modal to accommodate the need for heading-like elements in it.

https://user-images.githubusercontent.com/23481541/137212692-e96c8378-52d2-4de9-ad0c-190e58b02f7b.mov

@Irev-Dev let me know if the approach I took here is unwise. There is still future work to do to consolidate down to one nav component, and do the limiting of project at the query level rather than the component level.

Resolves #198. Added list of 3 most recent projects to logged-in user menu in top nav, piggybacking off of existing `Projects` component. Restyled the modal to accommodate the need for heading-like elements in it. https://user-images.githubusercontent.com/23481541/137212692-e96c8378-52d2-4de9-ad0c-190e58b02f7b.mov @Irev-Dev let me know if the approach I took here is unwise. There is still future work to do to consolidate down to one nav component, and do the limiting of project at the query level rather than the component level.
Irev-Dev commented 2021-10-14 11:01:01 +02:00 (Migrated from github.com)

Sorry haven't got to this one yet.

Sorry haven't got to this one yet.
Irev-Dev (Migrated from github.com) reviewed 2021-10-15 08:50:34 +02:00
Irev-Dev (Migrated from github.com) commented 2021-10-15 08:50:34 +02:00

This was the main smell that made me want to experiment will just making a new cell for this #558.

It might be different if isMinimal selectively took a few things out of the component, but this is returning entirely different JSX, I guess this is re-using the filteredProjects useMemo and the query, though I don;t think the former is a big deal and the later, we can reuse it simply using the same query.

This plus the fact that the same thing happens in for Empty in app/web/src/components/ProjectsCell/ProjectsCell.tsx made me thing it should be it's own cell.

This was the main smell that made me want to experiment will just making a new cell for this #558. It might be different if `isMinimal` selectively took a few things out of the component, but this is returning entirely different JSX, I guess this is re-using the `filteredProjects useMemo` and the query, though I don;t think the former is a big deal and the later, we can reuse it simply using the same query. This plus the fact that the same thing happens in for `Empty` in `app/web/src/components/ProjectsCell/ProjectsCell.tsx` made me thing it should be it's own cell.
Irev-Dev (Migrated from github.com) approved these changes 2021-10-15 08:51:42 +02:00
Irev-Dev (Migrated from github.com) left a comment

There is still future work to do to consolidate down to one nav component, and do the limiting of project at the query level rather than the component level.

100% to both but also happy with this for now.

> There is still future work to do to consolidate down to one nav component, and do the limiting of project at the query level rather than the component level. 100% to both but also happy with this for now.
franknoirot commented 2021-10-15 15:24:19 +02:00 (Migrated from github.com)

Cool @Irev-Dev I'll merge but pick up those in coming work, I think they won't be too hard.

Cool @Irev-Dev I'll merge but pick up those in coming work, I think they won't be too hard.
Irev-Dev commented 2021-10-15 19:13:35 +02:00 (Migrated from github.com)

Live now.

Live now.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#557