Skip to content

sidebar: hide frontmatter not respected on mobile orientation change (portrait to landscape) #3220

@steveayon

Description

@steveayon

Bug Description

When using sidebar: hide in page frontmatter, the sidebar appears unexpectedly on mobile devices when rotating from portrait to landscape orientation.

Steps to Reproduce

  1. Create a page with sidebar: hide in the frontmatter
  2. Open the deployed site on a mobile device in portrait orientation
  3. Verify the sidebar is hidden (expected behavior)
  4. Rotate the device to landscape orientation
  5. Observe that the sidebar appears despite sidebar: hide setting

Expected Behavior

The sidebar should remain hidden when sidebar: hide is set in frontmatter, regardless of device orientation or screen size changes.

Actual Behavior

The sidebar appears when rotating from portrait to landscape on mobile devices, overriding the sidebar: hide setting.

Environment

  • Device: Mobile
  • Deployment: Azure Static Web Apps (production build)

Example Configuration

Page frontmatter:

---
title: Status & Change Summary
sidebar: hide
---

Workaround

Using the global hideSidebar={true} prop on EvidenceDefaultLayout appears to work more reliably, but this affects all pages rather than individual pages.

Additional Context

This appears to be a responsive breakpoint issue where the page-level sidebar: hide setting is overridden when the viewport width increases during orientation change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions