Feature #416
closedAdd a way to close tabs without expanding the left drawer
Added by Anonymous over 5 years ago. Updated over 5 years ago.
0%
Description
As the title says, it would be nice if there was an option to close tabs without opening the left drawer, e.g. through an X on the tab, like tablet Firefox does, or through swiping down/up on a tab.
Rayleigh1
Updated by Soren Stoutner over 5 years ago
- Assignee set to Soren Stoutner
As I explain in the blog post at https://www.stoutner.com/privacy-browser-3-0/, I intentionally did not place a close icon on each tab because I was concerned that it would be too easy to accidentally close a tab while trying to switch between them.
For example, on a small phone screen, with three or more tabs, you have to grab the tab layout and scroll it left and right to see all the tabs. I was concerned that gesture, or when tapping on the relatively small tab with a big finger to select it would cause too many false positives, where the close button would be tapped unexpectedly.
Swiping the tabs up or down could potentially be even more problematic, because that is a gesture that is used to scroll the WebViews.
That being said, I agree with the assessment that having a more immediate way to close a tab is desirable. Currently it takes two taps. It would be nice if it would only take one tap. I didn't actually take the time to place a close button on the tab and test out how often the system misinterpreted my actions. If there are enough people who want it, I might take the time to do that investigation.
Updated by Anonymous over 5 years ago
It could just be an optional feature like swipe to refresh is
Updated by Soren Stoutner over 5 years ago
If this were easy to do I would probably agree with you in regards to making it an optional feature. But I suspect it would not be easy.
I haven't tried to code it up and test it out, but my guess is that tabs do not want to pass any touches down to elements inside of them. Meaning that a button inside of a tab couldn't tell when it was pressed.
There are ways around this, most of which would involve creating a custom tab implementation instead of reusing Android's standard TabLayout. But the amount of effort involved would be significant.
Perhaps it does work natively or there may be some easy way to adapt TabLayout to this behavior. At some point I will likely take some experimental time to find out. This has been the most requested feature in the communication I have received since 3.0 was released.
Updated by Soren Stoutner over 5 years ago
Note that in the next release the back button will be modified to close a tab if it is the first page in the history. This will be useful when opening an tab via an intent from another app, and then closing the tab by hitting back, which is a common workflow.
Updated by Soren Stoutner over 5 years ago
On a UX design note, in all other browsers of which I am aware, when using the phone interface, closing a single tab requires two taps. On a tablet interface, closing a tab in Chrome or Firefox only takes one tap (they have an X on each tab).
On most phone interfaces, closing multiple tabs requires one tap to open the tab interface, and then one tab to close each tab.
Privacy Browser currently has the same workflow on both phone and tablet interfaces: two taps for each tab. There is no variation for multiple tabs.
Updated by Soren Stoutner over 5 years ago
With the release of version 3.0.1, the back button can now close tabs if the WebView is at the beginning of the history list according to https://redmine.stoutner.com/issues/421 and described in detail at https://www.stoutner.com/privacy-browser-3-0-1/. In my personal workflow, this allows for one tap closing of tabs about 90% of the time (when a tab is opened from an intent from another app).
Updated by Soren Stoutner over 5 years ago
- Priority changed from 3.x to Next Release
While writing the blog post at https://www.stoutner.com/privacy-browser-design-guidelines/, I thought of a solution that will probably work well for this issue. I can create a close icon that sits to the left of the TabLayout just like the add icon sits to the right of it. This gets around the problem of not being able to put an button inside a tab. It is also placed far enough away from everything else that it isn't likely to be tapped accidentally. (At one point I considered putting the close icon next to the add icon, but I knew that would have a lot of false positives.)
Tapping the close icon will also run Clear and Exit if there is only one tab, which has the great added benefit of making Close and Exit a one-tap experience (something I have always wanted to do, but never thought I would have the screen real estate to accomplish).
Now that I write this, this solution seems obvious. Most good answers do once you see them.
Updated by Soren Stoutner over 5 years ago
- Status changed from New to Closed