spring-io / spring-asciidoctor-backends

A backend for Asciidoctor used to produce Spring styled HTML
Apache License 2.0
79 stars 16 forks source link

Code expansion and copy to clipboard aren't discoverable on mobile #8

Open wilkinsona opened 3 years ago

wilkinsona commented 3 years ago

On mobile, the code expansion and copy to clipboard buttons are invisible. If you know that they're there, you can tap on them and they then appear, but there's no way to discover them other than accidentally.

I think it would be better if the buttons were always visible on all devices. Even with a mouse, having to hover over the block isn't very discoverable. If you want to copy a block, you may not notice the button appear in the bottom-right corner of the block as you start selecting its content in the top-left corner.

philwebb commented 3 years ago

There's some example copy/paste sites in this issue https://gitlab.com/antora/antora-ui-default/-/issues/70 that might be worth looking at. There's also https://antora.gitlab.io/antora-ui-default/#.

It's a bit tricky to work out where to put the buttons that won't clash with the data-langage text that's displayed.

wilkinsona commented 3 years ago

Thanks, Phil. I just had a look at those linked from https://gitlab.com/antora/antora-ui-default/-/issues/70 . https://fontawesome.com/how-to-use/javascript-api/setup/getting-started and https://docs.fauna.com/fauna/current/cookbook/?lang=javascript are my favourites. I particularly like Fauna with the ability to change the language. That could tie in nicely with the tabbed blocks (and then maybe switch wouldn't be such a bad name after all…!).