Fix/video category navigation#1063
Conversation
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
|
There was a problem hiding this comment.
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.
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
|
@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 🙂 |
|
@Sbragul26 what feedback have you received from @Rajesh-Nagarajan-11 and @saurabh100ni? |
|
Before: before.mp4After: Screencast.From.2026-06-02.12-00-51.mp4 |
There was a problem hiding this comment.
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-navigationpartial 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-containerclass 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. |
Signed-off-by: Sbragul26 <sbragul26@gmail.com>
|
@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>
|
@saurabhraghuvanshii Thanks for pointing this out. I’ve fixed it please have a look. |
|
Thanks @Sbragul26 lgtm!! |
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