freeCodeCamp / devdocs

API Documentation Browser
https://devdocs.io
Mozilla Public License 2.0
34.9k stars 2.32k forks source link

Desktop PWA lacks forward/back navigation controls #1443

Open trysten opened 3 years ago

trysten commented 3 years ago

On mobile, devdocs shows in-HTML navigation controls by unhiding them on load. When installed as a PWA, these become more important because the browser navigation controls are no longer available. (Mobile users can issue a system "back" which is likely far more popular than the in-HTML back) When installed as a PWA on desktop, the viewport is typically too big to trigger the unhiding of in-HTML controls and thus the app lacks any graphical navigation controls.

This seems like an edge case to me because many devdocs users will have hardware navigation buttons on their mouse or be familiar with their browsers keyboard shortcuts that still work in the PWA (alt+left/right arrow keys). Yet, is likely someone out there that could be displeased or confused by the lack of navigation GUI.

I think the fix for this is to detect if devdocs is running as a PWA on launch and unhide the navigation controls.

simon04 commented 3 years ago

Please see https://github.com/freeCodeCamp/devdocs/pull/1362 and its revert via https://github.com/freeCodeCamp/devdocs/pull/1434.