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

docs: add component list grid view to /guide #399

Merged
merged 3 commits into from
May 5, 2024

Conversation

andretchen0
Copy link
Contributor

@andretchen0 andretchen0 commented May 2, 2024

closes #380

This adds a grid view of the component list to /guide.

Screenshot 2024-05-03 at 00 13 35

Copy link

stackblitz bot commented May 2, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@andretchen0 andretchen0 marked this pull request as ready for review May 2, 2024 22:15
@andretchen0
Copy link
Contributor Author

andretchen0 commented May 2, 2024

@JaimeTorrealba

Since the data's not just used for the sidebar anymore, I thought it made sense to move the component list out of /docs/.vitepress/config.ts.

I put it into docs/guide/componentList.ts. The info about which component categories was factored out and left in /docs/.vitepress/config.ts. I think that makes sense, but let me know what you think.

We'll have to change that docs/guide/componentList.ts when we add a new component – like we changed docs/.vitepress/config.ts before.

@JaimeTorrealba
Copy link
Member

Hi @andretchen0, I like the idea. But when I pull the changes, nothing happen. I need to do some action to be able to see the grid?

I checked, I have your changes in local but the view is the same
image

@andretchen0
Copy link
Contributor Author

andretchen0 commented May 3, 2024

@JaimeTorrealba Can you see it if you scroll down?

Screenshot 2024-05-03 at 15-17-24 Cientos

@JaimeTorrealba
Copy link
Member

Ok, ok now I see, it just in the guide page.

Unmm what can we do to improve the UX here? Using the same structure already create.

It could be a link below the guide for all component (grid view) or in the navbar next to the search wdyt?

Could be a modal with a float button?.

@andretchen0
Copy link
Contributor Author

or in the navbar next to the search wdyt?

Sure. What if we create a separate page and put a link here, in order to group visually similar elements?

Screenshot 2024-05-03 at 15-17-24 Cientos copy

@JaimeTorrealba
Copy link
Member

Yes, sound good

@andretchen0
Copy link
Contributor Author

@JaimeTorrealba

Copy link
Member

@JaimeTorrealba JaimeTorrealba left a comment

Choose a reason for hiding this comment

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

Is ok for now, later we can see how to create the links automatically

@andretchen0
Copy link
Contributor Author

andretchen0 commented May 4, 2024

Is ok for now, later we can see how to create the links automatically

Just FYI, there's no repetition of data. Or at least no more than existed prior to this PR.

  • Previously: when we added a new component, to make it accessible in the docs, we had to add it to docs/.vitepress/config.ts in the config.sidebar
  • Now: when we add a new component, we add it to docs/component-list/components.ts. That information is read by both <CientosComponentListGridView /> and config.sidebar.

Is that ok?

@alvarosabu
Copy link
Member

This is incredible useful guys, I really like it

@JaimeTorrealba JaimeTorrealba merged commit 3b8d739 into main May 5, 2024
2 checks passed
@andretchen0 andretchen0 deleted the docs/component-list-grid-view branch May 5, 2024 14:58
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.

Docs: component list view
3 participants