Skip to content

Fix/video category navigation#1063

Merged
saurabhraghuvanshii merged 13 commits into
layer5io:masterfrom
Sbragul26:fix/video-category-navigation
Jun 2, 2026
Merged

Fix/video category navigation#1063
saurabhraghuvanshii merged 13 commits into
layer5io:masterfrom
Sbragul26:fix/video-category-navigation

Conversation

@Sbragul26
Copy link
Copy Markdown
Member

Notes for Reviewers

This PR fixes #1051 where opening a video category page directly always showed the "Getting Started" tab instead of the correct one. It also fixes the URL update and removes footer flicker when switching tabs. No breaking changes.

Signed commits

  • Yes, I signed my commits.

Sbragul26 added 2 commits May 21, 2026 08:43
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

PR Preview Action v1.6.3
Preview removed because the pull request was closed.
2026-06-02 20:07 UTC

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements a hash-based navigation system for video categories, featuring CSS transitions and dynamic height adjustments for the video grid. The feedback identifies several areas for improvement: optimizing the Hugo template performance by using .Scratch instead of merge within loops, correcting the usage of safeHTMLAttr to ensure proper attribute escaping, and refining the JavaScript logic to preserve existing URL parameters and hashes when updating links.

Comment thread layouts/partials/video-category-navigation.html Outdated
Comment thread layouts/partials/video-category-navigation.html Outdated
Comment thread layouts/partials/video-category-navigation.html Outdated
Sbragul26 and others added 4 commits May 21, 2026 13:32
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
@Bhumikagarggg
Copy link
Copy Markdown
Contributor

@Sbragul26 Thank you for your contribution! Let's discuss this during the website call tomorrow at 5:30 PM IST | 7 AM CST Add it as an agenda item to the meeting minutes, if you would 🙂

@Bhumikagarggg Bhumikagarggg requested a review from CodexRaunak May 31, 2026 16:48
@leecalcote
Copy link
Copy Markdown
Member

@Sbragul26 what feedback have you received from @Rajesh-Nagarajan-11 and @saurabh100ni?

@Sbragul26
Copy link
Copy Markdown
Member Author

Before:

before.mp4

After:

Screencast.From.2026-06-02.12-00-51.mp4

Comment thread content/en/videos/template-category/sub-category/video-1.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses incorrect initial tab selection on the videos landing/category pages when navigating directly to a category URL (Issue #1051), and refines tab switching behavior to reduce layout/footer flicker while keeping the URL in sync.

Changes:

  • Adds a new video-category-navigation partial to map /videos/.../ paths to the correct #category-… hash and to rewrite /videos/ links to include the correct hash.
  • Updates video landing page tab/subtab links to navigate via permalinks + hashes, and switches video-group visibility handling to opacity/pointer-events with container height syncing.
  • Updates the template video markdown to use the established yt-embed-container class for the YouTube shortcode.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
layouts/video/baseof.html Includes the new navigation/hash-mapping partial on video pages.
layouts/partials/video-landing-page.html Adjusts tab/subtab link targets and refines client-side switching to reduce flicker.
layouts/partials/video-category-navigation.html Introduces pathname→hash mapping and link rewriting for /videos/ navigation.
content/en/videos/template-category/sub-category/video-1.md Updates the example YouTube shortcode class to yt-embed-container.
assets/scss/_video-landing_project.scss Adds container/group positioning and opacity transitions to prevent footer flicker.

Comment thread layouts/partials/video-landing-page.html Outdated
Comment thread layouts/partials/video-category-navigation.html Outdated
Comment thread layouts/partials/video-category-navigation.html Outdated
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
@saurabhraghuvanshii
Copy link
Copy Markdown
Member

@Sbragul26 Your fix is awesome! Could you please take a look at this hot-reloading issue on the preview deployment? I'm experiencing a reload whenever I switch between video tabs, while on the production URL everything works as expected.

Screencast.From.2026-06-02.23-34-54.mp4

Signed-off-by: Sbragul26 <sbragul26@gmail.com>
@Sbragul26
Copy link
Copy Markdown
Member Author

@saurabhraghuvanshii Thanks for pointing this out. I’ve fixed it please have a look.

@saurabhraghuvanshii
Copy link
Copy Markdown
Member

Thanks @Sbragul26 lgtm!!

@saurabhraghuvanshii saurabhraghuvanshii merged commit 2bee89b into layer5io:master Jun 2, 2026
3 of 4 checks passed
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.

[Docs] Videos page loads wrong category tab

6 participants