Project

General

Profile

Actions

Feature #918

open

Change the background color of a tab when it can be closed by Back

Added by Sam Jones over 1 year ago. Updated 8 months ago.

Status:
New
Priority:
3.x
Start date:
11/05/2022
Due date:
% Done:

0%

Estimated time:

Description

On the android version ... is there a way to open a new tab AND NOT have the keyboard in my face ?

Many of us open tabs and use bookmarks for them.

That use case is already handled by long-pressing on a bookmark, which opens it in a new tab.

Perhaps it would be helpful if opening a bookmark in a new tab also switched to that tab. Do you think that would be a good idea?

I see how the long click works to open bookmark in new tab. Great.

But I also have a tendency to click the back arrow on tabs that are at the top of their history. This closes the tab completely.

Can the back arrow work as normal to climb the history back to the top, and if one is already at the top on that tab, change the focus to the previous or tab to the left and not closed the current tab.

Quote #7
Updated by Soren Stoutner 2 days ago
Using the system back command to close tabs is one of my favorite parts of Privacy Browser and one of what I consider to be the best parts of its user interface. As such, I am unlikely to change that behavior.

Quote #8
Updated by Sam Jones 1 day ago
I guess my crutch is that I spend more time with Private Browser on an older small moto-e phone with and earlier version with no tabs, just single page (2.8.1). Limited memory and screen space there so I am fine with that version there. And on that I constantly go to bookmarks and 'back click' return to the original home page therein.

For me if I want to close a page you have the 'X' on the left to use.

It would be nice to have a choice as to your 'close' choice or my suggestion to go to previous tab if history is at top level.

Thanks for listening, you do great work.


Files

Ghosted Back Entry.png (119 KB) Ghosted Back Entry.png Soren Stoutner, 11/16/2022 11:07 AM
history-back-remains-indicator.png (136 KB) history-back-remains-indicator.png v ..., 08/13/2023 12:26 PM
Actions #1

Updated by Soren Stoutner over 1 year ago

  • Status changed from New to Feedback
  • Assignee set to Soren Stoutner

https://redmine.stoutner.com/issues/912 changed the opening of a bookmark in a new tab to also switch to that tab, so I won't address that here.

Regarding the issue of the system back button, I am generally reluctant to create options to modify the GUI, both because this creates a heavy maintenance burden (every code path that relates to each of these options has to be tested every time anything related to them changes) and because having too many options to modify the GUI can make the settings confusing to users.

I have made an exception for a few aspects of the GUI. For example, there are options in the settings to move the app bar to the bottom of the screen or to enable full-screen browsing mode.

In this case, I am not inclined to create an option. First, because I don't think many people would use it. Second, because it is not clear to me what the desired behavior should be. For example, using back to switch to a different tab doesn't seem like it would flow well in all circumstances, especially if a tab was opened by an intent from clicking a link in another app.

However, I will leave this feature request open for a while. If a large number of users would desire this feature and can agree on how it should behave I might be willing to reconsider.

Actions #2

Updated by Sam Jones over 1 year ago

Just updating you ...

I mistakenly killed 10 tabs in the last 6 days. Can you at least allow us to do what every browser in the world does ? When at the top of the history, the back button is greyed out and does nothing. Just make your back arrow do nothing under 'top of the history' condition. Or allow us this choice.

Actions #3

Updated by Soren Stoutner over 1 year ago

The system back button should always do something in Android. It is unacceptable to have it not do anything. In addition, if a user taps the system back button enough times the final result should always be closing the app and going back to the launcher screen.

On Google Chrome, for example, the system back button navigates backwards in the tab history. If the tab it at the top of its history, then it closes the app.

The only difference between Google Chrome and Privacy Browser in this regard is that Privacy Browser does not save browsing data when it is closed. This is according to Privacy Browser's core privacy principles as described at https://www.stoutner.com/privacy-browser-android/core-privacy-principles/. "From time to time I receive requests to add features to Privacy Browser that automatically store comprehensive histories across reboots or restore tabs on a restart. Although I can see the usefulness of such features, I am opposed to anything that automatically stores a browsing history just by engaging in normal browsing behaviors. Doing so makes it easy for malicious apps or devices made by companies like Cellebrite to extract browsing history from user devices without consent. As such, these type of features are unlikely to ever be implemented."

Actions #4

Updated by राही अखेराजोत over 1 year ago

I suggest that Privacy Browser should warn the user before closing a tab (make it optional).

Toast Press BACK button again to close this tab

Actions #5

Updated by Soren Stoutner over 1 year ago

  • Subject changed from giving user choice of just what the Back arrow does under different conditions to Consider warning users before closing tabs

I personally really dislike when apps display such messages. However, I wouldn't be completely opposed to adding such an option (disabled by default) if there was enough interest among users.

Actions #6

Updated by Sam Jones over 1 year ago

I'm not asking for any message. Simply ignore Back button if at top of history for this tab. I have the 'X' if I want to close tab.

Actions #7

Updated by Soren Stoutner over 1 year ago

As mentioned previously, the back button should never do nothing in Android. You can read more about how the system back button should behave at the following URLs:

https://developer.android.com/guide/navigation/navigation-principles

https://developer.android.com/guide/navigation/navigation-custom-back

https://developer.android.com/guide/components/activities/tasks-and-back-stack

Actions #8

Updated by Sam Jones over 1 year ago

Just looking now in a tab. Can't even tell on-screen that I am at the top of the history (so I can avoid an unintended closure of the tab). How about an Undo dialog .. that's in Chromium isn't it ?

Actions #9

Updated by Soren Stoutner over 1 year ago

You can tell if you are at the top of a WebView history when the back entry in the navigation menu is ghosted (see attached screenshot).

Android's WebView is based on the Chromium codebase, but Privacy Browser itself does not share any code with Chromium.

Having an undo snackbar instead of a warning would probably be a better idea. However, I still can't imagine that many users would end up enabling it, because it would be fairly annoying to have something pop up on the screen every time a tab was closed. Also, from a programming perspective, creating an undo option is very complicated. Not that I turn away from doing complicated things if they are important, but I don't often go down that route unless it is something that would actually be used.

Actions #10

Updated by Soren Stoutner over 1 year ago

I think the core of the issue is that the system back button is supposed to get whatever you are currently looking at on the screen off the screen. You are tapping the system back button but then being surprised when it does exactly what it is supposed to do. Irrespective of whatever value there is in implementing an undo option, after reading all of what has been posted here I come away convinced that the system back button is doing exactly what is should do in Privacy Browser.

Actions #11

Updated by v ... 8 months ago

Number of times I was frustrated by accidentally closing a tab I shouldn't...
I respect your vision and understand that the back button should always go back.
I also understand that I can slide and see if it's the first entry (FIFO) of the history stack (deactivated "Back" button).
On the other hand, I wish there was a "magic" button that could bring back my tab.
I don't like the way that some browsers, like Firefox, propose to resurrect a vanished tab via the undo snackbar, because it demands a bit too much of my attention.
I also don't want to slide every time to check if I'm risking to close the current tab.
I really don't know how to tackle this problem in a clean way.

Idea/proposition :

Do you think it would be possible to display in the current tab name's rectangle, or elsewhere, the history index? It would show us if the tab is going to be closed. The option should, of course, be disabled by default. I also read that you are reluctant to add options to modify the GUI, but I wish you reconsider about this particularly annoying case for some of us.

See the image for a visual example of my proposition. The "2" means that the current tab is on its third history index (0-based). So we can go back 2 times before the tab is closed. So when the user will see "0", they will know the next click will close the tab. This is just an example, there could be many variants of it.

Actions #12

Updated by Soren Stoutner 8 months ago

I don't think it would be a good idea to add a number to the tab because I think it clutters the interface. However, your comment got me thinking about the possibility of a visual indicator that back will close a tab. Perhaps it would work to change the tab background to a different color. I would have to think through a color change that wouldn't be too distracting, but I generally like the idea.

Actions #13

Updated by Soren Stoutner 8 months ago

  • Subject changed from Consider displaying an undo snackbar when a tab is closed to Change the background color of a tab when it can be closed by Back

My first thought is to use the same background color that the app bar uses when a proxy is enabled. My only concern is that using the same background color for two elements right next to each other to indicate different things might be confusing to users.

Actions #14

Updated by Soren Stoutner 8 months ago

  • Status changed from Feedback to New
Actions #15

Updated by v ... 8 months ago

The problem of using the same color is that if a user enables a proxy, the whole app bar (including all the tabs) switches to the "proxy" color, then the user wants to go back, (s)he reaches the top of the history, the background of the tab changes its color, but, the color being the same, the user is unable to see the difference.

What about using some kind of darker, not flashy, yellow, to indicate a warning?

Actions #16

Updated by Soren Stoutner 8 months ago

Currently the whole app bar background changes color when a proxy is used. But it would be fairly easy to only change the background of the URL bar and let the background of the individual tabs indicate if they will close on Back.

I am not sure how well this would work, or if it would feel distracting to have a patchwork of tab colors. It might look distracting. I would probably have to fully implement the idea and test it out for a while to even have a sense if it would be a good solution.

Actions #17

Updated by v ... 8 months ago

If only the background color of the URL bar, and not the whole app bar, changes, when a proxy is selected, then it's OK for me.

I made the above suggestion about the yellow color only if the "proxy color" has to continue painting the whole app bar's background.

So I'm pretty in favour of your idea to use the same color on different app bar's areas.

Actions

Also available in: Atom PDF