minbrowser / min

A fast, minimal browser that protects your privacy
https://minbrowser.org/
Apache License 2.0
7.9k stars 704 forks source link

Do not change the tab activity colour (fade) when quickly skipping past tabs. #2182

Open flightmansam opened 1 year ago

flightmansam commented 1 year ago

If you are switching between tabs and you only stay in the tab for <.5s the activity (fade) colour will remain whatever it was previously.

Before: EE039E0A-9756-41DE-8507-6F427DB59FE3

After: 5DAF20F1-482D-448B-AACB-ACE7288E8B06

flightmansam commented 1 year ago

@PalmerAL Any thoughts on this?

PalmerAL commented 1 year ago

Sorry for the delay. I like the idea! Regarding the implementation, it doesn't make much sense to me for lastActivity to go backwards. What about implementing this in the tabs model code? https://github.com/minbrowser/min/blob/master/js/tabState/tab.js#L140

Also, there's a small bug - if you opened the browser with an old set of tabs previously, they would be faded out immediately as a side effect of tab-selected triggering a refresh. Now they start un-faded and fade out 7.5s later.