Skip to content

Conversation

@codeEvolveZenith345
Copy link
Contributor

Fixes #6328

Proposed Changes

This PR removes the custom double nav bar implementation and properly utilizes Material for MkDocs' native navigation.tabs feature, as recommended by @evankanderson.

Changes Made

  • overrides/partials/header.html: Removed hardcoded navigation tabs (lines 97-119) that created the double nav bar
  • docs/stylesheets/extra.css: Added mobile-specific CSS fixes to ensure site title remains visible during scroll on mobile devices

Key Improvements

  • Site name "Knative" now stays visible in header on mobile devices (< 1220px)
  • Removed confusing title switching behavior during scroll on mobile
  • Leverages Material's built-in responsive navigation instead of custom implementation
  • Desktop behavior unchanged (title still transitions on scroll as expected)
  • Tablet viewports properly handled (960px-1220px)

Before/After

Before (Mobile):

  • Page title hidden when scrolling
  • Navigation confusing with duplicate tab structures
  • Header appeared empty on scroll
Screen.Recording.2025-11-15.164828.mp4

After (Mobile):

  • Site name "Knative" always visible in header
  • Clean navigation using native Material tabs
  • Consistent header appearance during scroll
Screen.Recording.2025-11-15.165038.mp4

@netlify
Copy link

netlify bot commented Nov 15, 2025

Deploy Preview for knative ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit bb5a3e8
🔍 Latest deploy log https://app.netlify.com/projects/knative/deploys/691b221d1f644a00082b60c6
😎 Deploy Preview https://deploy-preview-6503--knative.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@knative-prow
Copy link

knative-prow bot commented Nov 15, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: codeEvolveZenith345
Once this PR has been reviewed and has the lgtm label, please assign aliok for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 15, 2025
@knative-prow knative-prow bot requested review from Cali0707 and Leo6Leo November 15, 2025 11:23
@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 15, 2025
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 15, 2025
@knative-prow-robot knative-prow-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 15, 2025
@knative-prow-robot knative-prow-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 15, 2025
@codeEvolveZenith345
Copy link
Contributor Author

/retest

@knative-prow
Copy link

knative-prow bot commented Nov 15, 2025

@codeEvolveZenith345: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@codeEvolveZenith345 codeEvolveZenith345 force-pushed the fix/mobile-navigation branch 2 times, most recently from cf778ee to 6015867 Compare November 15, 2025 15:10
@codeEvolveZenith345
Copy link
Contributor Author

Hi @evankanderson
The PR is optimally tested and has built successfully...Please review it.

@dprotaso
Copy link
Member

FYI - on desktop the nav is no longer visible

Uploading Screenshot 2025-11-16 at 11.29.30 AM.png…

@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 17, 2025
@codeEvolveZenith345
Copy link
Contributor Author

Hi @dprotaso
Thanks a lot for pointing this out, I mistakenly dropped the nav for the desktop, it was not intentional...

Please review it and suggest modifications...
I have fixed that but I need feedback on the current mobile behavior, is it ok to have just the title in the nav and not the other nav related as in desktop...?

Signed-off-by: codeEvolveZenith345 <[email protected]>
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 17, 2025
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 17, 2025
@dprotaso
Copy link
Member

I have fixed that but I need feedback on the current mobile behavior, is it ok to have just the title in the nav and not the other nav related as in desktop...?

Can you clarify your question?

FYI - I see the nav now on the home page properly. But this change doesn't seem to fix the original linked issue.

eg.

navigating to https://deploy-preview-6503--knative.netlify.app/docs/

and then scrolling to the bottom replace Knative with the nav bar with Overview. On mobile I only see Knative and the version picker (which i can't click)

@dprotaso
Copy link
Member

I'm not to familiar with how to fix this - unsure if @evankanderson knows

@codeEvolveZenith345
Copy link
Contributor Author

I have fixed that but I need feedback on the current mobile behavior, is it ok to have just the title in the nav and not the other nav related as in desktop...?

Can you clarify your question?

FYI - I see the nav now on the home page properly. But this change doesn't seem to fix the original linked issue.

eg.

navigating to https://deploy-preview-6503--knative.netlify.app/docs/

and then scrolling to the bottom replace Knative with the nav bar with Overview. On mobile I only see Knative and the version picker (which i can't click)

Yeah, I actually misunderstoof the context of "double nav" for now I will draft this PR and open it once I have made the actual fix.

@codeEvolveZenith345 codeEvolveZenith345 marked this pull request as draft November 17, 2025 19:10
@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Page title is hidden when scrolled on mobile

3 participants