Uh oh!
There was an error while loading. Please reload this page.
Improve Docs navigation on handheld devices. - #7640
Conversation
Summary: JS detects handheld device by sniffing UA string (very primitive detection). If on handheld device, event listener is registered. Event handler toggles Docs Navigation overlay after clicking on "Docs" nav button. Original Docs Navigation panel is taken out of the natural page flow using pure CSS and is styled to look "good" on device. As a result of this, Navigation overlay is ONLY visible when you are at Docs page, otherwise "Docs" nav button takes you Docs page first.
ghost
commented
May 19, 2016
By analyzing the blame information on this pull request, we identified @vjeux and @janicduplessis to be potential reviewers. |
Andreyco
commented
May 19, 2016
Andreyco
commented
May 19, 2016
cc @vjeux |
| // Primitive mobile detection | ||
| function isMobile() { | ||
| return ( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ); |
There was a problem hiding this comment.
Can you test the same media query that we use in the css to figure out if we should display the mobile version? Or are there cases like on tablet where you want two different versions?
There was a problem hiding this comment.
Actually, I answered my question, it is for tablet. Looks good
vjeux
commented
May 19, 2016
I fear that people may no know how to close that menu. Do you think we should add a X icon at the top right? |
vjeux
commented
May 19, 2016
I'm down for your suggestion #2 as well. Flexbox is now well supported (except for ie8-9 but I hope developers don't use those...). As you mentioned, it would indeed be better in a different pull request |
vjeux
commented
May 19, 2016
@facebook-github-bot shipit |
vjeux
commented
May 19, 2016
Thanks a lot! |
ghost
commented
May 19, 2016
Thanks for importing. If you are an FB employee go to Phabricator to review. |
Andreyco
commented
May 20, 2016
I certainly could use device screen width (similar to max-device-width used in CSS) and make decision (not) to attach event handler and drop UA sniffing.
You are right, I will add close button soon. Also, are you down for proposed change #1 - to make nav bar static If you are, I can deliver both in another PR
Great, will work on this... |
Summary: Fixesreact#7519 JS detects handheld device by sniffing UA string (very primitive detection). If on handheld device, event listener is registered. Event handler toggles Docs Navigation overlay after clicking on "Docs" nav button. Original Docs Navigation panel is taken out of the natural page flow using pure CSS and is styled to look "good" on device. As a result of this, Navigation overlay is ONLY visible when you are at Docs page, otherwise "Docs" nav button takes you Docs page first. iPhone/iPad previews   Closesreact#7640 Differential Revision: D3325440 Pulled By: vjeux fbshipit-source-id: a06b21d743d56bfea5db5b750836856c3af9bbe2

Fixes#7519
Summary:
JS detects handheld device by sniffing UA string (very primitive detection). If on handheld device, event listener is registered. Event handler toggles Docs Navigation overlay after clicking on "Docs" nav button.
Original Docs Navigation panel is taken out of the natural page flow using pure CSS and is styled to look "good" on device. As a result of this, Navigation overlay is ONLY visible when you are at Docs page, otherwise "Docs" nav button takes you Docs page first.
iPhone/iPad previews

