Skip to content

Conversation

@zka26
Copy link
Contributor

@zka26 zka26 commented Oct 2, 2025

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a change, please open an issue to discuss the change or find an existing issue.

Added ASF-required links via dropdown and unified navigation.

Fixes #1186

Description

This change attempts to standardize the navbar with the newly introduced ASF menus across the Site and Apidocs and, to fix any sort of layout glitches and to improve zoom and resize and to address and solve problem that could have arisen from what was changed. DevTools were used to ensure that everything works accordingly.

General Design:

  • Mobile < 768
  • 769 < Compact < 1199
  • (New) 768 =< Wrap < 1200
  • 1200 <= Desktop

Desktop: Classic horizontal navigation bar extended with the ASF drop-down menu upon hover. The header is fixed when scrolling.

Mobile: Center-aligned column menu with a tap/click-to-open ASF accordion.

Compact: Transition in-between Mobile and Desktop for legacy resolutions (or maybe some tablets). It uses the hamburger menu already and the header is no longer fixed when scrolling focusing on the visibility of the content while the ‘Table of Content’ still appears as the left sidebar, and to a certain point the ‘In this Article’ appears as the right sidebar.

(New) Wrap: Reintroduced that the navbar items ( + searchbar) wraps under the logo.

Improvements:

  • Unified navigation: Same feel and look across the Site and Apidocs.
  • Compact mode (with new breakpoints): When the single classic horizontal navigation bar is no longer possible, we turn to the hamburger menu to prevent the header covering up too much of the content.
    (New) Wrap mode instead of the compact mode. The buttons' heights were decreased slightly.
  • Ribbon safety: Keeps the hamburger menu clear of the “Fork me on GitHub” ribbon, so it is always accessible, never covered by it.
  • [Apidocs-Only] Search overlay: In-between 1400px and 1200px instead of the base search function, we temporarily introduce a search button to open an overlay, therefore delaying the need to switch to hamburger (or multi-line) too early, and Apidocs can switch to it at the same time as the Site.

Previews

Site:

Site - Desktop image
Site - Wrap image
Site - Mobile image

Apidocs:

Apidocs - Desktop: image
Apidocs - Wrap: image
Apidocs - Mobile: image

- Added Foundation, Events, License, Thanks/(Sponsors), Security, Sponsorship, Privacy (Policy) links
- Inserted into _appFooter in doxfx.json
- Left 2024 copyright year unchanged
@NightOwl888 NightOwl888 added the notes:website-or-documentation Documentation or website changes label Oct 2, 2025
Copy link
Contributor

@NightOwl888 NightOwl888 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.

This looks good. However, note that the "website" is actually 2 websites, one generated in a subfolder of the other. They share common elements such as CSS styles and the footer.

Option 1: Include links in Footer

This only changes the site folder, but the apidocs folder also has files that contribute to the same website footer.

The two main places to update on the apidocs site are:

But we also need to keep in mind that the footer does an auto-hide, so maybe that is not the best place to put these links.

Option 2: Include links on Home Page Only

I took another look at the requirements and it specifically states that the links are only required to be on the home page. So, we could technically add a section only to that one page, in which case there is only one site to update.

Examples

Here are some examples of how some other projects integrated the links:


Personally, I like the idea of a dropdown at the top like the first two examples. But this does meet the requirements and I don't object to anything except the fact that the footers should not diverge on the 2 websites to keep the same look and feel. So, if you fix the other footer, this works for me.

@paulirwin - Thoughts?

NOTE: I noticed that the docs always has a pancake menu. It should expand to show the 3 menu items across the top when the viewport is wide enough, so if we add a "The ASF" link in the top menu, that issue will also need to be addressed.

@NightOwl888 NightOwl888 added the hacktoberfest-accepted PR is approved for Hacktoberfest even if not merged label Oct 2, 2025
@paulirwin
Copy link
Contributor

I do like the dropdown in the header, but I'm also okay with the footer for now.

The header is already wrapping on smaller resolutions, like the tablet I'm using now. If we do the header change, maybe we could move Contributing under Documentation, and Download under About (or remove Download, if possible, since most people are probably using NuGet).

But, I know this is a Hacktoberfest item, so I'm also cool with taking the quickest path to victory here.

@NightOwl888
Copy link
Contributor

remove Download, if possible, since most people are probably using NuGet

An Apache release is source code, so these pages are required to download the official releases. The pre-built binaries and packages are technically only provided on NuGet for convenience (at least in Apache's eyes).

https://infra.apache.org/release-publishing.html#valid

That said, IIRC there is an official .cgi file that we could style that would dynamically show the releases on Apache's archives.

@paulirwin
Copy link
Contributor

I didn't mean to remove the page itself; just the link in the header. I don't think it needs that level of prominence.

@zka26
Copy link
Contributor Author

zka26 commented Oct 2, 2025

Thanks a lot for the detailed feedback and the examples! I would like to work on it and do it the right way, using drop-down approach in the header and try adjusting the menu layout while testing on smaller screen. I will work on that and update the PR accordingly and at the end we can see, if anything else needs to be done, more than glad to contribute! Thank you for the guidance again!

- Removed ASF links from _appFooter and preparing to move ASF links into the top navigation menu using dropdown.
@zka26 zka26 marked this pull request as draft October 2, 2025 19:11
zka26 added 2 commits October 3, 2025 19:27
- Added ASF Foundation, Events, License, Thanks, Security,
Sponsorship, and Privacy Policy links to the apidocs/site menu.
CSS and JS updates for the dropdown are still required.
…apidocs)

- styles/custom.js included in head.tmpl.partial + head-content.tmpl.partial
- main.css,custom.js:
   - ASF dropdown style (hover on dekstop, tap on mobile) with caret.
   - Attempts to make navbar stable across resize, zoom.
(apidocs navbar will be addressed by the next commit)
@NightOwl888
Copy link
Contributor

@zka26 - I noticed this is still marked as a draft PR. Do you have more work to do or is this ready for review?

Note that the EditorConfig checker also caught some issues with extra trailing whitespace.

@zka26
Copy link
Contributor Author

zka26 commented Oct 8, 2025

@NightOwl888 - Sorry for the late reply and thanks for checking in! The work is nearly complete. I've extended the navbars with the ASF dropdown menu, adding links for both the main site and the apidocs, and have worked to make them look and behave uniformly in both the pancake and desktop modes.

I'm just putting on the final touches now, fixing a small issue in the apidocs part and reverting some changes in the site part to ensure they look and feel more alike.

Thanks for the heads-up about the trailing whitespaces—I've eliminated them.

I plan to commit the finalized version, edit the PR description, and set it for review in about 10 hours.

Edit: Sorry! The 10 hours became much more hours. I reworked the site and almost the apidocs is ready too. I will do my best to submit it today (10.10 Friday)

zka26 added 3 commits October 13, 2025 02:06
- Desktop: hover dropdown; Mobile: accordion in hamburger
- Carets and unified drop-down menu
- Sticky header on desktop; scroll-away on mobile/compact
- GitHub Fork Me ribbon safety margin
- Added main.js and registered in head-content.tmpl.partial and head.tmpl.partial
- Desktop: hover dropdown; Mobile: accordion in hamburger
- Carets and submenu unification
- Sticky header on desktop; scorll-away on mobile, compact
- GitHub Fork Me safety spacing
- Replaced inline search with "Search..." trigger at 1200-1399px
- It does not include the auto-updated docfx.global.json and docfx.global.subsite.json and any other auto-updated files.
@zka26
Copy link
Contributor Author

zka26 commented Oct 21, 2025

Sorry, this took longer than expected. The learning curve was trickier than I thought and I decided to restart a few times. I added the ASF-required links via dropdown and unified the navs. I significantly reworked the main.css and main.js files (added main.js for the Site). I tested across viewports/zoom in DevTools to address issues. On the Apidocs, there is a compact search overlay between 1200-1399px to keep a single-line navbar and match the Site. I hope the result feels clean and consistent.
If anything should be reverted, adjusted, included or excluded, please let me know!
I am happy to improve it and take your recommendation.

Edit: Please take all the time you need on the review. Hacktoberfest isn’t a deadline for me.

@zka26 zka26 marked this pull request as ready for review October 21, 2025 22:56
@zka26 zka26 requested a review from NightOwl888 October 21, 2025 22:57
@zka26 zka26 changed the title Added ASF-required footer links in doxfx.json Added ASF-required links using drop-down menu and unified navigation Oct 23, 2025
Copy link
Contributor

@NightOwl888 NightOwl888 left a comment

Choose a reason for hiding this comment

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

Thanks. This looks really good. I checked both the website and docs site and they now look more uniform than they did before.

My only minor quibble is that the top menu used to wrap under the logo when the viewport got too small so it didn't collapse to a pancake until it got to the smallest width. Now it switches to a pancake menu when it goes below the maximum viewport size.

Before

image

Now

image

Can you fix that so it will wrap again?

zka26 added 2 commits October 31, 2025 03:08
- Reintroduced wrap, when the the navbar no longer fits into one line
- CSS: Tried to clean it up by consolidating rules and made some changes due to how it reacted the wrapped navbar
- JS: Now using matchMedia to detect and get the correct CSS mode and made some changes due to how it reacted the wrapped navbar
- Reintroduced wrap, when the the navbar no longer fits into one line
- CSS: Tried to clean it up by consolidating rules and made some changes due to how it reacted the wrapped navbar
- JS: Now using matchMedia to detect and get the correct CSS mode and made some changes due to how it reacted the wrapped navbar
@zka26
Copy link
Contributor Author

zka26 commented Oct 31, 2025

The wrapping was restored and tried to fine tune the behaviors so they always respond good and clean at every width before transitioning either to the Desktop or the Mobile mode.

Edit: Updated the PR description accordingly and included new screenshots with the wrapping as well.

@zka26 zka26 requested a review from NightOwl888 October 31, 2025 02:20
Copy link
Contributor

@NightOwl888 NightOwl888 left a comment

Choose a reason for hiding this comment

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

Thanks. This looks really good.

@NightOwl888 NightOwl888 merged commit 2991483 into apache:master Oct 31, 2025
1 check passed
asf-gitbox-commits pushed a commit that referenced this pull request Oct 31, 2025
…1198)

* Added ASF-required footer links in doxfx.json

- Added Foundation, Events, License, Thanks/(Sponsors), Security, Sponsorship, Privacy (Policy) links
- Inserted into _appFooter in doxfx.json
- Left 2024 copyright year unchanged

* Revert footer changes in doxfx.json

- Removed ASF links from _appFooter and preparing to move ASF links into the top navigation menu using dropdown.

* Updated toc.yml with ASF menu entries

- Added ASF Foundation, Events, License, Thanks, Security,
Sponsorship, and Privacy Policy links to the apidocs/site menu.
CSS and JS updates for the dropdown are still required.

* Added ASF links to navigation and dropdown behavior to the site (not apidocs)

- styles/custom.js included in head.tmpl.partial + head-content.tmpl.partial
- main.css,custom.js:
   - ASF dropdown style (hover on dekstop, tap on mobile) with caret.
   - Attempts to make navbar stable across resize, zoom.
(apidocs navbar will be addressed by the next commit)

* Revert "Added ASF links to navigation and dropdown behavior to the site (not apidocs)"

This reverts commit 3d8b026.

* Added ASF dropdown & unify nav; introduce main.js (Site)

- Desktop: hover dropdown; Mobile: accordion in hamburger
- Carets and unified drop-down menu
- Sticky header on desktop; scroll-away on mobile/compact
- GitHub Fork Me ribbon safety margin
- Added main.js and registered in head-content.tmpl.partial and head.tmpl.partial

* Added ASF dropdown & unified nav; compact search overlay (Apidocs)

- Desktop: hover dropdown; Mobile: accordion in hamburger
- Carets and submenu unification
- Sticky header on desktop; scorll-away on mobile, compact
- GitHub Fork Me safety spacing
- Replaced inline search with "Search..." trigger at 1200-1399px
- It does not include the auto-updated docfx.global.json and docfx.global.subsite.json and any other auto-updated files.

* Fixed the wrong indent style (tabs) error marked by the EditorConfig Checker for the .js files.

* Restore wrap and rework CSS and JS for Apidocs

- Reintroduced wrap, when the the navbar no longer fits into one line
- CSS: Tried to clean it up by consolidating rules and made some changes due to how it reacted the wrapped navbar
- JS: Now using matchMedia to detect and get the correct CSS mode and made some changes due to how it reacted the wrapped navbar

* Restore wrap and rework CSS and JS for Site

- Reintroduced wrap, when the the navbar no longer fits into one line
- CSS: Tried to clean it up by consolidating rules and made some changes due to how it reacted the wrapped navbar
- JS: Now using matchMedia to detect and get the correct CSS mode and made some changes due to how it reacted the wrapped navbar
@paulirwin
Copy link
Contributor

@zka26 Thanks for the contribution!

@NightOwl888
Copy link
Contributor

FYI - these changes are now live. Thanks again for the contribution.

After I deployed the site, I realized there were 2 barely noticeable style issues on the API docs site.

  1. The ASF dropdown menu only appears on the home page of the docs site, not any of the other pages, like Lucene.Net.Analysis.Common.
  2. The breadcrumb menu used to begin with "API /" and then every breadcrumb would follow. But now the "API" part is on its own line and the rest of the breadcrumb appears below it. To see what I mean, compare ArabicNormalizationFilterFactory on 4.8.0-beta00017 with ArabicNormalizationFilterFactory on 4.8.0-beta00016.

Feel free to submit another PR to fix these, but as far as Apache is concerned we have fixed the ASF menu issue because it was only required on the home page of the main site.

The right menu is also missing from the 4.8.0-beta00017 docs (the part that indexes the current page), but I think that may be a docfx config issue instead of a style issue.

@paulirwin
Copy link
Contributor

paulirwin commented Nov 1, 2025

@NightOwl888 Am I missing something? I don't see the ASF menu on the homepage (https://lucenenet.apache.org/index.html), only on the beta 17 docs pages.

Also note that there is an issue on Firefox on the beta 17 docs layout where the top bar is covering up the right-hand side links:

screenshot-2025-11-01-at-13-57-06

@NightOwl888
Copy link
Contributor

@paulirwin

You probably need to do a CTRL + F5 to refresh your browser cache.

@paulirwin
Copy link
Contributor

Wow, that was aggressively cached. I had done that but it didn't work the first time. Great to see this is live!

However, the Whimsy checks are still failing as of this morning. We'll need to dig in to figure out why, but as long as we actually have the links there, at least we're meeting the requirement. Or, perhaps they are having a caching issue too that will eventually clear. https://whimsy.apache.org/site/project/lucenenet

@NightOwl888
Copy link
Contributor

It says it already crawled it today:

Last crawl time: Sun, 02 Nov 2025 16:12:29 GMT over 219 websites.

So apparently the crawler is also unable to bust the cache. So, we either need to wait for the cache to expire or contact INFRA to have them force it. Let's see if the next crawl updates it first, though.

I also noticed that our "events" link doesn't match the regex that they supplied.

^https?://((www\.)?apache\.org/events/current-event|events\.apache\.org|www\.apachecon\.com/event-images/snippet\.js)

Oddly, the events page we linked to looks nicer than any of the pages in the regex. Maybe the docs are wrong on this, though.

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

Labels

hacktoberfest-accepted PR is approved for Hacktoberfest even if not merged notes:website-or-documentation Documentation or website changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add missing website links

3 participants