Skip to content

Conversation

@ajolipa
Copy link
Contributor

@ajolipa ajolipa commented Dec 9, 2025

In this PR

Adds the tabbed content component as described in Issue #311 .

Notes and questions

  • After wrangling a bit with trying to make this component serve both as section (e.g. for displaying team members) and as page-level tabs (where the tabs are incorporated at the bottom of the hero and the whole page content is different for each tab) I decided it makes more sense to just separate those two functions. So this is only the former, meant to be displayed as a section in the page body inside a Container.
  • Initially I was thinking that the templates for the content inside each tab could be any other section template (or at least the ones that are designed to be inside a container), but I held off on that to avoid unnecessarily complication; certainly for the use case in the JUEL designs having the multi_column template is sufficient. But I'm open to other suggestions.

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for gbof-c19nyc-staging ready!

Name Link
🔨 Latest commit c645842
🔍 Latest deploy log https://app.netlify.com/projects/gbof-c19nyc-staging/deploys/6937a1624f41e10008f2ee41
😎 Deploy Preview https://deploy-preview-340--gbof-c19nyc-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for padp-staging ready!

Name Link
🔨 Latest commit c645842
🔍 Latest deploy log https://app.netlify.com/projects/padp-staging/deploys/6937a1625ff6fa00092231cb
😎 Deploy Preview https://deploy-preview-340--padp-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for pss-scavenger-hunt ready!

Name Link
🔨 Latest commit c645842
🔍 Latest deploy log https://app.netlify.com/projects/pss-scavenger-hunt/deploys/6937a16211c7d200089e87b3
😎 Deploy Preview https://deploy-preview-340--pss-scavenger-hunt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for juel-staging ready!

Name Link
🔨 Latest commit c645842
🔍 Latest deploy log https://app.netlify.com/projects/juel-staging/deploys/6937a162abadb50008d06184
😎 Deploy Preview https://deploy-preview-340--juel-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ajolipa ajolipa requested a review from dleadbetter December 17, 2025 15:11
@dleadbetter dleadbetter added the next release Issues in the next release label Dec 17, 2025
}

<script is:inline>
window.document.addEventListener('DOMContentLoaded', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

What are you thoughts on using a React component with client:load vs. inline Javascript? Is the performance savings worth the readability/maintainability penalty?

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 did it this way because of the annoying restrictions on including Astro components inside React components; I want to be able to use the other page builder components as tab content and those are (mostly) Astro components. If we're happy restricting the tab content to, say, a couple of columns of rich text, or even to the specific name/title format of the team member tab designs, then it would make sense to do it as a React component, but my initial thought was to make the component a more flexible container for other content.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's a fair point. After doing some brain storming about it, I don't have a great solution. But I do wonder if we'll run into any side effects of spreading the interactivity logic between React and vanilla JS.

Do we want to opt out of script processing by using the is:inline directive? What happens if multiple Tabs sections are inserted into a page?

If we're allowing other page builder components to be added as tab content, will this require us to duplicate the page builder config options in Tina multiple times?

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 good questions. It's definitely not ideal. I was envisioning perhaps eventually separating out some of the pages Tina schema into like, layout templates and content templates, and then the content templates list can more easily be included in multiple places. (This is how e.g. Storyblok, which we used for NBU, organizes its content blocks; when you create a block you can specify it as like page, layout, content, or some combination, and that affects where it can be inserted.) Definitely something to think about once we have the full complement of components.

Hmm, I think the script could be modified to handle the possibility of multiple tab components on one page; that's a good catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

next release Issues in the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants