bookdown icon indicating copy to clipboard operation
bookdown copied to clipboard

default HTML output on iPad

Open kylelundstedt opened this issue 10 years ago • 34 comments

Hi @yihui When browsing the standard HTML output from bookdown on an iPad, there doesn't seem to be a way to collapse the sidebar containing the table of contents. So, when reading the bookdown or r4ds websites, the sidebar always takes up over 1/3 of the reading space on the iPad. It would be great if the default HTML output allowed one to collapse/expand the TOC, or to see TOC in a menu.

Thanks Kyle

kylelundstedt avatar Mar 23 '16 18:03 kylelundstedt

You can tap the first button on the toolbar to toggle the sidebar:

screen shot 2016-03-23 at 5 03 30 pm

yihui avatar Mar 23 '16 22:03 yihui

Hmm. I'm probably a complete knucklehead, but the toolbar does not appear in Safari on the iPad when viewing the HTML output. I went to both of the following sites to confirm:

http://rstudio.github.io/bookdown/ http://r4ds.had.co.nz

No amount of tapping, double-tapping, etc causes the toolbar to appear. What am I missing?

kylelundstedt avatar Mar 23 '16 23:03 kylelundstedt

Okay, I just looked at it on iPad and indeed the toolbar buttons were invisible. This is similar to #44. The buttons are actually there but I don't know why they are not displayed. You can scroll down the page, and you can see a blank toolbar at the top. You can actually tap at the left of the toolbar.

yihui avatar Mar 24 '16 02:03 yihui

@jmcphers If you could spend 15 minutes looking at this we'd be eternally grateful (realize you have plenty of other things cooking this week so please just spend 15 minutes in hopes this is a really simple thing to resolve). The issue does repro on the XCode iPad simulator but I couldn't figure out how to do the equivalent of Inspect Element there.

jjallaire avatar Apr 06 '16 09:04 jjallaire

It looks like the book-header.fixed class is causing problems on the iPad. It is not clear why that is the case. So there is a way to bring back the toolbar by simply removing this class entirely from the css definitions. But doing so will make the toolbar scroll with the body content. HOWEVER, this latter behaviour is what is found in the current gitbooks. See this for example.

dataopt avatar Apr 11 '18 11:04 dataopt

Hey!!

Is this going to be fixed?

There is a workaround that is to pull with your finger in the top part of the screen so buttons of the menu will show up for a second —so you know where you need to push— but a solution would be really appreciated. :)

luispuerto avatar Aug 22 '19 18:08 luispuerto

As far as I can see, as of September 2019, this is still a bug. I've tested by viewing e.g. r4ds.had.co.nz on a reasonably up to date iPad Pro and the menu icon (and whole menu bar) does not appear. @yihui

Not a problem on safari and macbook, but haven't tried an iPhone which will probably have the same problem and an ipad. @luispuerto

If you tap on the blank space where the menu items should be, the menus work, but that's not much use unless you're familiar with bookdown.

dullhunk avatar Sep 08 '19 22:09 dullhunk

I've tried in the iPhone and the problem is the same. It a problem with Safari from iOS I guess. But it also happens on Firefox for iOS at least in the iPad, so I guess it's a iOS problem in general. I believe that all of them use webkit.

luispuerto avatar Sep 09 '19 15:09 luispuerto

If it is is webkit that's the problem, it doesn't affect webkit & safari on a laptop / desktop - they work fine.

It seems to be specific issue with webkit/safari on an iPad/iPhone @luispuerto

dullhunk avatar Sep 10 '19 16:09 dullhunk

This is a real problem if one is trying to show off work. Please fix it! Thanks.

chipbrock avatar Oct 25 '19 18:10 chipbrock

@chipbrock this is only still a problem if you haven't update to the last version of iPadOS or iOS.

luispuerto avatar Oct 26 '19 13:10 luispuerto

Thanks for a quick reply.

I’m running iPadOS 13.1.3 on a new iPad mini and it is not functioning as it should - no sandwich icon (or any icon) at the top of an otherwise respectable page of a document.

On a computer, the icons are all proudly displayed as per normal.

So I don’t think the new update fixes this. What am I missing? See attachments.

screenshot_1114 screenshot_1113

chipbrock avatar Oct 26 '19 15:10 chipbrock

Can you check this one?

https://geocompr.robinlovelace.net/

In my iPad works just fine

IMG_0103

luispuerto avatar Oct 26 '19 15:10 luispuerto

It's working also fine on my iPhone 5S with iOS12

IMG_EAF3F57EF28E-1

luispuerto avatar Oct 26 '19 16:10 luispuerto

Thanks.

I think I get it now. Your page does not render with the sandwich visible on my ipad mini, but it does on my phone and on my ipad pro. So I suspect there's an issue with the adaptive width assignments in the css that governs the framework.

BTW. My page also renders fine in my larger ipad confirming for me that this is the problem. There must be an in-between size under which the sidebar collapses - which it does on the phone that's not in sync with the instructions to the header.

What I REALLY wish could be instituted is a switch to collapse the sidebar by default. From browsing other discussions, this seems to be a feature and not a ...lack of implementation.

In any case, this sandwich showing/not showing does seem to be a bug in css.

chipbrock avatar Oct 26 '19 17:10 chipbrock

This is a bug on iPad pro too. For example here's a screenshot from an iPad Pro (12.9 inch) 2nd generation running software version 13.1.3 looking at https://r4ds.had.co.nz/ by @garrettgman and @hadley. The "hamburger" menu item does not appear @yihui @chipbrock @luispuerto File 29-10-2019, 09 56 55

dullhunk avatar Oct 29 '19 14:10 dullhunk

This is also an issue on an iPhone XS in landscape mode.

jtbayly avatar Sep 14 '20 19:09 jtbayly

I can confirm!

luispuerto avatar Sep 14 '20 19:09 luispuerto

Also confirmed on iPhone 12 with iOS 14.4.2 -- portrait is fine, but landscape the menu bar disappears. If you tap roughly where the three line collapse icon should be, it does indeed expand/collapse the contents but is not visible.

louisaslett avatar May 28 '21 12:05 louisaslett

FWIW - I am not able to reproduce by simulating with Firefox Responsive Design Mode:

https://user-images.githubusercontent.com/12160301/120014203-a211b080-bf96-11eb-96b3-6aaf20e4e7db.mov

apreshill avatar May 28 '21 16:05 apreshill