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

PageLayout.Header + PageLayout.Footer not rendered with SSG #2812

Closed
pveierland opened this issue Jan 25, 2023 · 2 comments
Closed

PageLayout.Header + PageLayout.Footer not rendered with SSG #2812

pveierland opened this issue Jan 25, 2023 · 2 comments
Labels
bug Something isn't working component: SplitPageLayout Issues related to the PageLayout and SplitPageLayout components react

Comments

@pveierland
Copy link

Description

When using PageLayout and server-side generation using next build + next export using Next.js v13.1.5 - PageLayout.Header and PageLayout.Footer are not rendered as part of SSG, and are only displayed when JavaScript is enabled on the client.

This behavior is disruptive as it can affect accessibility, layout shifts, and search engine visibility, as page titles may not be rendered without executing JavaScript.

The expected behavior would be that PageLayout.Header and PageLayout.Footer can be rendered using SSG in the same way as PageLayout.Content and PageLayout.Pane.

Steps to reproduce

Test 1

  1. Create a page:
<PageLayout>
  <PageLayout.Header>
    <Placeholder label="Header" height={64} />
  </PageLayout.Header>
  <PageLayout.Content>
    <Placeholder label="Content" height={240} />
  </PageLayout.Content>
  <PageLayout.Pane>
    <Placeholder label="Pane" height={120} />
  </PageLayout.Pane>
  <PageLayout.Footer>
    <Placeholder label="Footer" height={64} />
  </PageLayout.Footer>
</PageLayout>
  1. Render page using SSG.
  2. View page in browser with JavaScript disabled.

Result: Content and Pane are visible. Header and Footer are not visible.
Expected: Header and Footer would also be visible.

Test 2

  1. Create a page:
<PageLayout padding="none" rowGap="none" columnGap="none">
  <PageLayout.Header padding="normal" divider="line">
    <Placeholder label="Header" height={64} />
  </PageLayout.Header>
  <PageLayout.Content padding="normal">
    <Placeholder label="Content" height={240} />
  </PageLayout.Content>
  <PageLayout.Pane padding="normal" divider="line">
    <Placeholder label="Pane" height={120} />
  </PageLayout.Pane>
  <PageLayout.Footer padding="normal" divider="line">
    <Placeholder label="Footer" height={64} />
  </PageLayout.Footer>
</PageLayout>
  1. Render page using SSG.
  2. View page in browser with JavaScript disabled.

Result: Content and Pane are rendered. Header and Footer are not rendered. Dividers are not rendered.
Expected: Header + Footer + dividers would also be rendered.

Note

  • Pane renders correctly on either side depending on position attribute.
  • Render with NavList in Pane renders correctly.

Version

v35.18.0

Browser

Chrome, Firefox

@pveierland pveierland added the bug Something isn't working label Jan 25, 2023
@siddharthkp
Copy link
Member

siddharthkp commented Jan 25, 2023

Hi!

Thanks for taking the time, this is indeed a bug. There is more context in this issue:

@joshblack joshblack added the component: SplitPageLayout Issues related to the PageLayout and SplitPageLayout components label Jan 25, 2023
@joshblack
Copy link
Member

I believe this was closed in: #3036

Let me know if that's not the case and we can re-open!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: SplitPageLayout Issues related to the PageLayout and SplitPageLayout components react
Projects
None yet
Development

No branches or pull requests

4 participants