Skip to content

feat: implement multi-org template gallery #13784

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

Merged
merged 25 commits into from
Jul 19, 2024
Merged

Conversation

jaaydenh
Copy link
Contributor

@jaaydenh jaaydenh commented Jul 3, 2024

Resolves #13775

  • Setup new /templates route to retrieve templates for all organizations for a user
  • Create new template gallery page called MultiOrgTemplatesPageView using a grid layout
  • Create Storybook component for MultiOrgTemplatesPageView
  • Filter templates by organization-id
  • Render multi-org template gallery page if multi-organization experiment is enabled
  • Create component for TemplateCard in template gallery grid
  • Create storybook component for TemplateCard
  • Display organization count to the right of each organization in the organization labels list
  • Highlight template card on mouseover, onClick should link to template page
  • Hide organization filter if the user has templates for only 1 organization
Screenshot 2024-07-16 at 8 11 56 PM

@jaaydenh jaaydenh self-assigned this Jul 3, 2024
@jaaydenh jaaydenh changed the title Multi org template gallery feat: multi-org template gallery Jul 3, 2024
@jaaydenh jaaydenh changed the title feat: multi-org template gallery feat: implement multi-org template gallery Jul 3, 2024
@jaaydenh jaaydenh force-pushed the multi-org-template-gallery branch 3 times, most recently from fa872e0 to 63827ef Compare July 11, 2024 02:29
@jaaydenh jaaydenh requested a review from aslilac July 11, 2024 15:20
@jaaydenh jaaydenh marked this pull request as ready for review July 11, 2024 15:20
@jaaydenh jaaydenh requested a review from BrunoQuaresma July 12, 2024 14:35
@BrunoQuaresma
Copy link
Collaborator

I have a few design considerations. I believe we can avoid adding more components and create another view solely for filtering based on organizations. We could achieve this using pills as filters or by replicating what we have for workspaces.

Pills:

Pill Tabs

Replicating Workspaces:

Search

@jaaydenh jaaydenh force-pushed the multi-org-template-gallery branch 2 times, most recently from 89e54a4 to bd2bb03 Compare July 15, 2024 16:35
Copy link
Member

@aslilac aslilac left a comment

Choose a reason for hiding this comment

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

sorry for taking so long to review! 💀


export const TemplateCard: FC<TemplateCardProps> = ({
template,
...divProps
Copy link
Member

Choose a reason for hiding this comment

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

super minor nit, I tend to call these sorts of captures attrs, but there's definitely precedent for calling it whateverProps too. maybe this is something we should consolidate on...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was following the pattern in the files I was working on. In other code bases/the React docs, this is often called ...props as well. I think it depends if we want to call them based on what they are, "props" or how they are used, props on divs "divProps" or attributes on divs "attrs"

@jaaydenh
Copy link
Contributor Author

I have a few design considerations. I believe we can avoid adding more components and create another view solely for filtering based on organizations. We could achieve this using pills as filters or by replicating what we have for workspaces.

@aslilac Can you comment on the feedback from @BrunoQuaresma as you have more context around the design decisions?

@jaaydenh jaaydenh requested a review from aslilac July 17, 2024 02:04
@jaaydenh jaaydenh force-pushed the multi-org-template-gallery branch from fc2e6f9 to 801138a Compare July 17, 2024 14:51
@aslilac
Copy link
Member

aslilac commented Jul 18, 2024

@BrunoQuaresma the design is based off of the starter template gallery, and aims to bring some distinction between the appearance of workspace related pages and the appearance of the template related pages. investigating the pills idea sounds interesting, but we can mess with the design more after the experiment has shipped.

@jaaydenh jaaydenh merged commit 554c4ab into main Jul 19, 2024
31 checks passed
@jaaydenh jaaydenh deleted the multi-org-template-gallery branch July 19, 2024 14:33
@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multi-org templates page
3 participants