Skip to content

feat(SectionGallery): add section gallery components #47

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 7 commits into from
May 21, 2025

Conversation

kmcfaul
Copy link
Collaborator

@kmcfaul kmcfaul commented Apr 29, 2025

Adds suite of SectionGallery components, loosely based on current org counterparts.

I included two test md/jsx files to showcase the updated landing page structure. Landing pages must have an id of landing, a section, and a title for display. sortValue can be used to control where in the nav list the landing page is shown. The component data file (compared to org) is now JSX and contains JSX directly instead of needing to parse JSON into JSX.

I also updated the [...tab].astro, [...page].astro, and landing.astro to only match relevant routes instead of mapping the whole collection. Now landing.astro will only match for pages whose id is "landing", tab.astro will only match for pages with a tab, and page.astro should match everything except for landings (component tab pages should still be rerouted to tab.astro).

Once the examples/JS in mds is rendering properly I can revisit to test SectionGallery, but otherwise I did test this locally by inserting the component directly into landing.astro.

@kmcfaul
Copy link
Collaborator Author

kmcfaul commented Apr 29, 2025

One question I have is how we want to specify exports for things like SectionGallery, since the other components probably don't need to be exposed. Or if we want these type of components to live in the pf-docs instead of the framework/doc-core?

@kmcfaul kmcfaul linked an issue May 1, 2025 that may be closed by this pull request
4 tasks
@kmcfaul kmcfaul force-pushed the section-gallery branch from fcbb524 to ecd7827 Compare May 7, 2025 15:15
@kmcfaul
Copy link
Collaborator Author

kmcfaul commented May 7, 2025

This will be easier to test out after #49 merges

@kmcfaul kmcfaul force-pushed the section-gallery branch from 6737227 to e63eeef Compare May 16, 2025 20:51
@wise-king-sullyman wise-king-sullyman self-requested a review May 19, 2025 16:16
Copy link
Contributor

@wise-king-sullyman wise-king-sullyman left a comment

Choose a reason for hiding this comment

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

Unit tests for anything that we don't plan on replacing ASAP?

I'd be alright with that being done in a followup though.

@kmcfaul
Copy link
Collaborator Author

kmcfaul commented May 20, 2025

I think maybe move that to a follow up, I'm currently unsure how to go about testing things that live in the code fences? Maybe can pull the functions into a separate file

@kmcfaul kmcfaul force-pushed the section-gallery branch from b1f1c3a to d1cb796 Compare May 20, 2025 16:03
@wise-king-sullyman
Copy link
Contributor

Yeah the stuff in the astro files I'm also not sure of how to test yet, and that's a broader thing we need to figure out. I'll make an issue for that if we don't already have one.

At the moment I think we're just calling all the React/TS stuff being tested good enough, but like I said I would be fine with you doing that under a followup if you want to get this issue closed.

Copy link
Member

@rebeccaalpert rebeccaalpert left a comment

Choose a reason for hiding this comment

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

Just a couple of questions about types and image behavior - otherwise this looks good to me. :) Feel free to ignore them if they're dumb n00b comments.

Copy link
Member

@rebeccaalpert rebeccaalpert left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link
Contributor

@dlabaj dlabaj left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @kmcfaul

@dlabaj dlabaj merged commit 5d8d446 into patternfly:main May 21, 2025
1 check passed
Copy link

🎉 This PR is included in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add section gallery component
4 participants