Skip to content
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

Rework the bottom bar #337

Closed
mossroy opened this issue Jan 17, 2018 · 15 comments
Closed

Rework the bottom bar #337

mossroy opened this issue Jan 17, 2018 · 15 comments
Assignees
Milestone

Comments

@mossroy
Copy link
Contributor

mossroy commented Jan 17, 2018

This bottom bar has a few problems :

  • It can hide some content at the end of an article. For example, we had to put a few carriage returns in the About section, just to allow clicking on the links at the bottom
  • It needed some extra work in the automated UI tests for the same reason : sometimes you can not click on a link if it's hidden behind the bottom bar
  • It should be hidden when the user is in the Configuration or About section (see Bottom bar should be not displayed in settings kiwix-js-pwa#43)
  • The user can not click on the bottom right of the screen (for example on the scroll bar) : it clicks on the "go to top" button instead
@mossroy
Copy link
Contributor Author

mossroy commented Feb 13, 2018

I'm starting to wonder if the solution would not be to completely remove this bottom bar.
There's no such thing in the Android application. They have found other solutions to provide the same features.
@kelson42 says that the dev version now has a bottom bar that disappears after a few seconds. We might try to align with the same ergonomic ideas (as long as they are compatible with a desktop version).
Is there a doc/wiki explaining the ergonomic strategy of this app?

@Jaifroid
Copy link
Member

Jaifroid commented Feb 13, 2018

The scrolling viewport (iframe) gets sized to fill the entire screen space before the bottom bar is added in as an absolutely positioned fixed overlay, which inevitably hides some content beneath the bar. I've experimented with different ways of calculating the viewport size (but I was doing this early on, before I had a proper understanding of the layout) and didn't come up with a satisfactory solution other than adding padding to the HTML. Even if we reduce the viewport size, then the transparency effect of the bottom bar becomes useless, and it might as well just be a solid block (I think I encountered this when experimenting and it was visually less satisfying, in part because without the transparency there are no visual clues that there is further content to read).

Note that ergonomically, bottom bars are much easier to reach on mobile devices than top bars, as they can be controlled by the thumb without having to stretch, especially with large screen sizes which otherwise have to be operated with two hands. IMHO therefore the bottom bar should be the last thing to go and hiding it should be optional unless another completely satisfactory way of navigating one-handed can be found...

Having said that, hiding the bottom bar in the Config and About screens is a simple document.getElementById('footer').style.display = "none";, and can be added to the Config button and About button onclick routines. A very easy PR (implemented in kiwix/kiwix-js-pwa#43).

@practik
Copy link

practik commented Feb 14, 2018

I'm starting to wonder if the solution would not be to completely remove this bottom bar.

Having just installed Kiwix for Firefox I tend to agree. Instead of using the bottom bar's home, back and forward buttons, I can just click on the Home tab at the top of the browser window and use the browser's back and forward buttons or keyboard shortcuts. So the only thing in the bottom bar whose functionality is not duplicated elsewhere is the up arrow, and on a desktop browser, at least, that one's easy to live without.

(Kiwix 2.2.0 on Firefox 58.0.2 on macOS 10.12)

@Jaifroid
Copy link
Member

@practik You're using Kiwix JS in a browser context, where functionality for forward and back navigation is indeed duplicated. However, Kiwix JS needs to work also in an app context, and there much of the duplication is stripped away. Mobile device back buttons can be programmed to navigate backwards, but more often than not they just exit the app by default, so a back button needs to be provided at least in app context, or some other way of going back in the history, and ideally without having to use two hands.

A swipe-from-the-left functionality could replace a back button, but the action tends to be less discoverable than a simple button.

@practik
Copy link

practik commented Feb 14, 2018

Ah, sorry, I thought Kiwix JS was only intended to be used as a browser extension. Thanks for the explanation.

@mossroy
Copy link
Contributor Author

mossroy commented Mar 12, 2018

On some mobile applications, some options of this kind are put in a top bar. This top bar disappears when the user scrolls down, and re-appears when the user scrolls up.
I saw that on Android, with Tiny Tiny RSS, Amaze or VLC.

I find it convenient, as it does not reserve some space for the buttons, and it seems easy to discover.

But it might be not easy to implement for us if we want to have a smooth transition between a visible and a hidden bar.

@garuffalo
Copy link

I am no coder, just a user, but is there not some way to offer, in settings, the option to show or hide the bottom toolbar, in the same way that other applications allow to show or hide a status bar? The bottom toolbar annoys me for the same reasons posted above, since I am using it on a laptop web browser. I noticed that I could not click on the "next" button/arrow to go to the next page of TED videos, for example. Had to use the one on top.

@Jaifroid
Copy link
Member

@garuffalo It's not hard to implement hiding of the bottom or top bars. The only difficulty is agreeing on a standard approach and how/when to make those bars re-appear when they're needed. One approach would be to fade out top and bottom bars (or a choice of either/both) after a two-second timeout (for example), and show them again as soon as the user starts to scroll. We do need to have back/forward buttons available on screen through some mechanism because apps don't have the respective browser buttons to do this. And IMHO they should be in the bottom bar to enable one-handed use in mobile contexts.

@Jaifroid
Copy link
Member

I've added a very simple PR to hide the navigationButtons in the footer when the user goes to Config or About.

I think adding an option "Hide navigation buttons permanently" in Config needs a bit more thought, however, which is why I think it can't be done in this PR. I'm inclining towards making the option work on a timer after scroll stop, so that the buttons would be available for, say, two seconds after scroll. We should also have an option to hide the top bar, for users who prefer to use their phones one-handed. For the top bar, it can be made to re-appear temporarily on pressing the up arrow in the bottom bar.

@mossroy
Copy link
Contributor Author

mossroy commented Mar 23, 2019

I like the idea of hiding the bars (top and/or bottom), and making them re-appear when the user scrolls.
I see many mobile apps that work like that (see my previous comment #337 (comment)), and find it's a good compromise.

@mossroy mossroy modified the milestones: v2.8, v2.7 Jul 14, 2019
@mossroy mossroy modified the milestones: v2.7, v2.8 Mar 29, 2020
@mossroy mossroy modified the milestones: v2.8, v2.9 Jul 11, 2020
@Jaifroid Jaifroid modified the milestones: v3.0, v3.1 Oct 3, 2020
@Jaifroid Jaifroid removed this from the v3.1 milestone Dec 6, 2020
@Jaifroid Jaifroid added this to the v3.2 milestone Dec 6, 2020
@mossroy mossroy modified the milestones: v3.2, v3.3 Aug 22, 2021
@Jaifroid
Copy link
Member

Jaifroid commented Dec 4, 2021

There are two approaches I've seen at work in different apps:

  1. Like in Kiwix Android, the bars can disappear when scrolling down, and can be made to re-appear when scrolling up slightly.
  2. In other apps, you sometimes see the bars appear when scrolling down or up, and disappear after a defined interval (1-2 seconds) on scroll stop.

Personally I think I prefer 1. It is what Kiwix Android uses, and also what I implemented in Kiwix JS PWA / UWP. Also, there is a slight coding disadvantage to 2: there is no actual "scrollStop" event in JS. It can be simulated, but the simulation involves a timeout testing the vertical displacement at regular intervals during a scroll event. It's not a big performance hog, but it's a bit more complex than simply showing toolbars on scroll up, and hiding them on scroll down.

@kelson42
Copy link
Collaborator

kelson42 commented Dec 17, 2021

I am no coder, just a user, but is there not some way to offer, in settings, the option to show or hide the bottom toolbar, in the same way that other applications allow to show or hide a status bar?

Complementary to other comments, this seems a pretty legitim request for user on none mobile devices. Default value could be set based on screen resolution. Maybe this could be implemented first (because easy to do) and other problems reported in this ticket later.

@Jaifroid
Copy link
Member

Agreed. I think the only question is if we rework this as part of the larger UI change in #523, or whether we add an option to hide the bottom bar in the current design. I'd favour having the bottom bar on by default, because I think for a new user opening the app for the first time it is reassuring to see controls. After the new user has used the app for a while, they may wish to hide the bottom bar, and can choose to do so in Configuration.

@mossroy
Copy link
Contributor Author

mossroy commented Dec 20, 2021

I could be implemented apart from #523 if we wish.
I agree with you, and would also prefer to see it implemented the same as on Kiwix Android.
Having an option to completely hide the bottom bar would be a plus, but could even be a separate PR if we wish

@Jaifroid Jaifroid modified the milestones: v3.3, v3.4 Jan 31, 2022
@mossroy mossroy modified the milestones: v3.4, v3.5 Apr 9, 2022
@mossroy mossroy modified the milestones: v3.5, v3.6 Aug 4, 2022
@Jaifroid Jaifroid modified the milestones: v3.6, v3.7 Nov 9, 2022
@Jaifroid Jaifroid modified the milestones: v3.7, v3.8 Jan 3, 2023
@Jaifroid Jaifroid modified the milestones: v3.8, v3.9 Apr 22, 2023
@Jaifroid Jaifroid self-assigned this Oct 30, 2023
@Jaifroid
Copy link
Member

I think all the issues with the bottom bar are now (finally) addressed by #1142. Good to be able to close this issue open since 2018...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants