-
Notifications
You must be signed in to change notification settings - Fork 649
Added ASF-required links using drop-down menu and unified navigation #1198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ASF-required links using drop-down menu and unified navigation #1198
Conversation
- Added Foundation, Events, License, Thanks/(Sponsors), Security, Sponsorship, Privacy (Policy) links - Inserted into _appFooter in doxfx.json - Left 2024 copyright year unchanged
There was a problem hiding this 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:
- https://github.com/apache/lucenenet/blob/master/websites/apidocs/docfx.json#L585
- https://github.com/apache/lucenenet/blob/master/websites/apidocs/docs.ps1#L107
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:
- https://opennlp.apache.org/ - drop down from the top menu
- https://activemq.apache.org/ - drop down from the top menu
- https://accumulo.apache.org/ - events on the side bar, other links integrated elsewhere
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.
|
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. |
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 |
|
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. |
|
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.
- 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)
|
@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. |
|
@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) |
…te (not apidocs)" This reverts commit 3d8b026.
- 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.
|
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. Edit: Please take all the time you need on the review. Hacktoberfest isn’t a deadline for me. |
…Checker for the .js files.
There was a problem hiding this 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
Now
Can you fix that so it will wrap again?
- 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
|
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. |
There was a problem hiding this 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.
…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
|
@zka26 Thanks for the contribution! |
|
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.
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. |
|
@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:
|
|
You probably need to do a CTRL + F5 to refresh your browser cache. |
|
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 |
|
It says it already crawled it today: 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. 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. |

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:
769 < Compact < 1199Desktop: 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:
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.
Previews
Site:
Site - Desktop
Site - Wrap
Site - Mobile
Apidocs:
Apidocs - Desktop:
Apidocs - Wrap:
Apidocs - Mobile: