Skip to content

[Programs] Fix LFX 2026 layout and sidebar alignment - #7923

Open
hiyach28 wants to merge 2 commits into
layer5io:masterfrom
hiyach28:fix-lfx-hero-logo-alignment
Open

[Programs] Fix LFX 2026 layout and sidebar alignment#7923
hiyach28 wants to merge 2 commits into
layer5io:masterfrom
hiyach28:fix-lfx-hero-logo-alignment

Conversation

@hiyach28

@hiyach28 hiyach28 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes #7921

This PR resolves layout and visual discrepancies on the LFX 2026 Programs page, aligning its aesthetics with the established LFX 2025 page while correctly preserving the functionality of the sticky navigation sidebar.


Problem

Users observed several visual and functional issues on the LFX 2026 Programs page:

  • The Linux Foundation logo was pushed below the timeline heading instead of aligning flush with the top edge.
  • The logo size shrunk unintentionally on specific viewports compared to LFX 2025.
  • A massive block of empty whitespace appeared at the bottom of the sticky sidebar.

This was more than a simple spacing issue. The page's underlying HTML structure introduced conflicting CSS constraints where Flexbox rules collided with Block Formatting Context (BFC) rules and float behaviors, making superficial margin adjustments ineffective.


Cause of issue:

  • Logo Misalignment: The logo was unnecessarily wrapped in an overflow: hidden container. This established a new Block Formatting Context (BFC) that broke native inline float behavior, forcing the logo to drop below the adjacent timeline text.
  • Logo Shrinkage: Previous implementations placed the logo and sidebar into a shared flex column that collapsed to the sidebar's rigid 250px width. The logo shrunk to fit this artificial constraint instead of rendering at its intended 19vw.
  • Extra Sidebar Whitespace: The LfxPageNav component was placed directly as a child of a flex column. Its CSS property flex: 0 0 250px mistakenly targeted the vertical main-axis, forcing the component's height to a fixed 250px and leaving empty space underneath it.
  • Sticky Behavior Constraints: position: sticky requires its containing block to be taller than the sticky element itself. If the right-hand column didn't explicitly stretch to match the height of the left-hand text column, the sidebar would immediately stop sticking on scroll.

Solution

The implementation fundamentally restructures the page using standard CSS Flexbox properties

  • Un-wrapped the Logo: Removed the overflow: hidden container to restore native inline alignment with the timeline heading.
  • Unified Right Column: The logo and the sticky sidebar were moved into a shared .lfx-sidebar-col right-hand flex column.
  • Protected Logo Size: The right column utilizes flex-shrink: 0, preventing the column from collapsing and allowing the logo to strictly maintain its intended 19vw width.
  • Preserved Sticky Behavior: The right column uses align-self: stretch to match the height of the timeline content. Inside it, a new div with flex-grow: 1 wraps the sidebar, ensuring the containing block spans to the bottom of the page to maximize sticky scroll distance.
  • Neutralized Height Bug: By isolating LfxPageNav inside a standard block div wrapper, the flex: 0 0 250px rule is evaluated in a block context, preventing it from incorrectly stretching the vertical height.
  • Preserved Design Language: achieves the same visual sizing as LFX 2025 but adapts the underlying DOM to robustly support the sidebar.

Screenshots

Before

Screenshot 2026-08-04 142119

After

Screenshot 2026-08-04 193924

Validation

  • Desktop layout: Logo top-aligns with timeline heading.
  • Mobile layout: Logo stacks above the text cleanly at < 900px.
  • Responsive behavior: Layout fluidly adjusts without overlapping.
  • Sticky navigation: Sidebar scrolls flawlessly to the bottom of the timeline.
  • Logo sizing: Renders consistently at 19vw without shrinking.
  • Sidebar alignment: Sits horizontally flush with the right page margin directly beneath the logo.
  • Sidebar sizing: Hugs content vertically; no empty whitespace.
  • No regressions: Checked thoroughly against LFX 2025.

Signed commits

  • Yes, I signed my commits.

Summary by CodeRabbit

  • Style
    • Improved the LFX 2026 mentorship program page layout.
    • Added responsive behavior for the sidebar and navigation, including better spacing and alignment on smaller screens.
    • Updated the page structure for a more consistent, flexible presentation across device sizes.

Signed-off-by: hiyach28 <hiyach28@gmail.com>
@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The LFX 2026 mentorship page replaces inline layout styles with responsive CSS classes. The sidebar now groups the logo and navigation in a dedicated column with responsive spacing and sizing.

Changes

LFX responsive layout

Layer / File(s) Summary
Responsive page and sidebar layout
src/collections/programs/Programs.style.js, src/collections/programs/lfx-2026/lfx-2026.mdx
The page uses .lfx-layout for flex positioning and responsive column reversal below 900px. The sidebar uses .lfx-sidebar-col to contain the logo and navigation components.
Estimated code review effort: 1 (Trivial) ~5 minutes

Possibly related issues

Possibly related PRs

  • layer5io/layer5#7922 — This PR contains the same CSS classes and LFX 2026 page layout restructuring.

Suggested reviewers: kanishksingh23, bharath314, codexraunak

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main layout and sidebar alignment fixes implemented for the LFX 2026 Programs page.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/collections/programs/Programs.style.js (1)

37-47: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use theme spacing values for the new gaps.

Lines 37 and 47 hard-code 2rem inside a styled-component. Replace both values with the repository’s spacing token. Add a theme token first if no suitable token exists.

As per coding guidelines, use theme values for styled-components.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/collections/programs/Programs.style.js` around lines 37 - 47, Update the
gap declarations in the styled component containing .lfx-sidebar-col to use the
repository’s theme spacing token instead of hard-coded 2rem values. If no
suitable spacing token exists, add one to the theme and reference it
consistently for both gaps.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/collections/programs/Programs.style.js`:
- Around line 39-40: Align the mobile visual and DOM order for accessibility: in
src/collections/programs/Programs.style.js lines 39-40, replace the reverse flex
direction with normal column order, and in
src/collections/programs/lfx-2026/lfx-2026.mdx lines 402-412, move the
.lfx-sidebar-col block before the timeline so keyboard and assistive-technology
traversal matches the intended visual order.

---

Nitpick comments:
In `@src/collections/programs/Programs.style.js`:
- Around line 37-47: Update the gap declarations in the styled component
containing .lfx-sidebar-col to use the repository’s theme spacing token instead
of hard-coded 2rem values. If no suitable spacing token exists, add one to the
theme and reference it consistently for both gaps.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f95d8eeb-e953-44a9-a67c-b8dc5081afcd

📥 Commits

Reviewing files that changed from the base of the PR and between a730e5f and b5cd836.

📒 Files selected for processing (2)
  • src/collections/programs/Programs.style.js
  • src/collections/programs/lfx-2026/lfx-2026.mdx

Comment thread src/collections/programs/Programs.style.js
@coderabbitai coderabbitai Bot mentioned this pull request Aug 4, 2026
7 tasks

@Maanvi212006 Maanvi212006 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please address the bot’s comment. You can either accept the suggestion and push the changes, or reject it. In either case, please justify your decision in a comment.

@Maanvi212006 Maanvi212006 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add the issue being resolved here as when this PR gets merged, the issue too gets closed

@hiyach28

hiyach28 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Rightt! missed it, thanks for pointing it out.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Programs] Align Linux Foundation logo with program content

3 participants