Skip to content

Loading…

Make a preference temporary for just this session #731

Closed
wolftune opened this Issue · 60 comments

8 participants

@wolftune

Request Policy and NoScript and others have mechanisms for temporary settings. So, I'd like to be able to allow something temporarily and know that it will not persist as a setting, but will revert automatically next session.

@gorhill

I need to fix this sooner than later.

@gorhill gorhill added the fixing label
@harshanvn

just my thought, would it be possible for the lock button be made little smaller than now. It looks lot bigger.

@Betsy25

Where can we find that option please ?
I'm not able to see anything different compared to the rev. before this commit ?
:flushed:

EDIT: Oops, now I see.

Does that mean that the regular, one click to set permanently, is now no longer a permanent one but rather a session-only ? I don't get it, a one time click now brings the open lock (which makes me think "not permanently") into view, ????

@BenjaminProgram

Edit: I found it. Is it the lock icon?

Edit 2: IF it is the lock icon how does it work?

@gorhill

It's more like uMatrix now: the rules are temporary by default. If you are happy with them, save them by clicking the padlock. When there is no padlock, this means there are no temporary rules in the list.

@gorhill

@harshanvn Looks fine to me. You have a screenshot so that I can see how it looks on your side?

@harshanvn

@gorhill i guess it is just a matter of taste. If its compared to Element picker/network request logger icon, it seems to be bigger.

lock ublock

@gorhill

@harshanvn Ok, by design. Looks fine to me.

@harshanvn

hmm...ok Then. No Problem. Just needed some time to get to :)

@Betsy25

It might spoil it for some newer users, stating "but I disabled that yesterday, and today it is back",
and regular ones, now each time have to click 2 items for doing what they want to achieve.
After all, i see the average user (and newer ones after a bit of learning) mostly going for a permanent action, and only very seldom making a session-only rule.

@gorhill

@Betsy25 With uMatrix, this proved to be the best way to work. As long as it is documented, an advanced user shouldn't have any problem with this. At first, one will have to padlock often to save rules for one's usual sites, but pass that, having rules temporary by default is very convenient.

How else would you do this? I am certainly not in favor to clutter the UI with huge amount of options, NoScript and RequestPolicy UI are definitely not the way to go with their huge lists of duplicate entries, one for temporary, the other for permanent.

Edit: Here is a challenge for those against the new way to work: provide an alternative solution, not just a statement that you think the current way is not the right way.

@Betsy25

The way I see it, as the vast majority of advanced feature users will want to preserve the actions they take, takes 1 single click.
Having a closed lock popup there as soon as stuff is en-/disabled, because most users will directly opt for permanent results, clicking the closed lock to open it would make their alterations session-only.
So, simply reverting the way it works now ?
(Only a simple personal opinion, I understand you are more aware of what the ideal way should be)

@gorhill

most users will directly opt for permanent results

I completely disagree with this. My rules are already built for the most part, and I find myself now very annoyed that whenever I just allow one 3rd-party to un-break a web site which I will never visit again, that rule is polluting my good ruleset. It's why I made it a priority to fix this.

Once the rules for your usual web sites are set, the likelihood is that all the new rules will not be for beyond the current session. I have uMatrix to back this up, this is how it has worked since forever now, and having to click the padlock, nobody has asked me to change this.

@Betsy25

@gorhill Yep, sorry for the disturbances, You're perfectly correct, sorry that I didn't think this out any further.
:+1:

@wolftune

I completely support the temporary default with the lock option. However, I think you should offer something like "shift-click" to be a one-click permanent option. That will satisfy the people complaining about the extra click, and it will allow mixing and matching of temporary and permanent rules.

Oh, and thanks for the fast work on this!!

@gorhill gorhill added a commit that referenced this issue
@gorhill gorhill #731: UI counterpart 44768e8
@gorhill

For translators:

c

@Mikey1993

Why not enabling this "feature" after clicking the "I am advanced user" with another nested checkbox in the dashboard?

Why not having uBlock highly customizable and not enforce every advanced user to use uBlock like what is convinient it is for some amount of users? (if he is an advanced user, let him customize the behaviour to his likings, right?)

I, personally, would like to revert to the current behaviour - 1 click to permanently change the preference.
No matter how it can be achieved, I will revert it as I don't like it this way.

@gorhill

@Mikey1993 Why is this an issue now? You never mentioned this with uMatrix.

@chrisaljoudi

@Mikey1993 disagreed. I think this paradigm is fantastic.

@Mikey1993

@gorhill Because I didn't see it feasable to revamp the wheel when a lot of people are already used to this, as this is how uMatrix is working for a long time.
I just feel that uBlock can be customized a bit more than uMatrix, as it has started from the ground up with the "feature" off by default. Because of this fact, I think this is feasable to have uBlock more customizable in this area than uMatrix.

@chrisaljoudi This is what I am trying to point, everyone has their own preferences, just as I don't like to be forced to click more accomplish the same before this change.

Isn't that sounds logical?

@chrisaljoudi

@Mikey1993 it sounds logical; it's just not true, in my own humble opinion.

Given the nature of how µBlock stores the rules (no central server for backups or preference storage), and given how easy it is to overwrite something and lose it, the extra click is very reasonable.

The rules actually start being applied as soon as you put them in Temporary Rules, and your temporary rules remain there until your session is restarted.

If you decide that your rules don't radically break things, you can commit them and now they're stashed and saved.

The types of changes you will be doing frequently are types of changes that are temporary. Permanent changes are, in comparison, done very infrequently.


There's an arbitrary number of ways to do this — what they differ in is usefulness and helpfulness. It's useful and wise not to have to worry about losing longer-term rules when experimenting.

@gorhill

@Mikey1993 By the way, you can also commit all your rules at once from the My rules tab, so you can skip having to save them every times if this annoys you.

@gorhill

One argument is also that in in default-deny mode, having rules set permanently by default defeat the purpose of default-deny. I am also not a believer to add countless settings to address all views, to many settings end up being confusing, and results in never ending stream of questions like "how should I use it?" I think what is here given uMatrix usability history is what is optimal for uBlock's integrated mini-firewall.

@Mikey1993

Well, I still can't simply agree with all the "workarounds" and the view about how more options only to advanced users can harm the functionality of a given program.

People will always ask about how to use your program the second it's more complicated than 2 clicks, that is a plain fact.

I truly can't see why implementing the option to unsubscribe to "click 1 more time" "feature" is such a bad idea.
Sorry, I just can't.

@gorhill

@Mikey1993 What I can't understand is such a reaction from someone who never questioned the same feature in uMatrix.

@chrisaljoudi

@Mikey1993 the option isn't a bad idea, it's just not a good idea either, IMHO. It seems relatively arbitrary to me.

Customizability's good, until it's a pain for users and/or implementors.

Have you ever tried to read a really, really, really long man page? You want to find just one option, just one example or sub-command or syntax — but the plethora of all the other options (all not what you want) just kind of gets in the way. :)

It seems like having a long list of checkboxes in the Preferences page harms the 90% of users a lot more than it benefits the 10% (assuming that it is actually desirable to have this).

Like I said: making permanent changes is very infrequent. I'm puzzled: is this just by principle, or is there a use case you're concerned about?

TL;DR: µBlock can't have a toggle/switch for every possible aspect. As you abstract and factor that out more and more, µBlock becomes less of a tool and more of a framework/programming language in a sense. That doesn't seem like the goal.

In any case, I'm sorry for intervening in the discussion, @gorhill and @Mikey1993.

@gorhill

@Mikey1993

"click 1 more time"

What would be the exact wording you would use for such a setting?

@chrisaljoudi

@gorhill ... "click one less time"?

:)

Sorry, just kidding. :)

@Mikey1993

@gorhill As I explained before:

Because I didn't see it feasable to revamp the wheel when a lot of people are already used to this, as this is how uMatrix is working for a long time.

I just didn't see the possibility to change the status quo of uMatrix as it worked with temporary rules long before I was hard into it, and no one really argued about it for whatever reason. But it's not the main issue here.

What would be the exact wording you would use for such setting?

Enable/Disabale Temporary Rules
or
Enable/Disabale the use of Temporary Rules in the popup

How about this?

@chrisaljoudi I don't agree with your statistics, as this option will only be available to users who see themselves as advanced users, so it's some portion of the 10% you have described.

@wolftune

@Mikey1993 wouldn't you be satisfied with my solution that everyone seems to have skipped over in all this chatter?

and @gorhill maybe you missed this?

I think you should offer something like "shift-click" to be a one-click permanent option. That will satisfy the people complaining about the extra click, and it will allow mixing and matching of temporary and permanent rules.

@gorhill

@wolftune re. "shift-click", how would you reverse back to default mode if the padlock doesn't show anymore?

@wolftune

@gorhill I wasn't suggesting removing the padlock or making any other changes. Just offer an additional feature where shift-click results in bypassing the lock and making the particular item clicked be fully permanent. The rest of everything you're doing, including default temporary that then can be locked in seems fine.

@gorhill

@wolftune Ok, clicking on a cell with Shift causes the rule created to be permanent? I'm fine with this.

@wolftune

@gorhill yes, that's what I meant

@gorhill

Actually, I like the idea. I will implement it for the next dev release.

@chrisaljoudi

@gorhill ctrl-click seems more appropriate given that's already used in the popup for the switch.

@wolftune

I have no strong opinions about what the modifier key would be, just that it should ideally not be something anyone would expect to do something else. I still think of ctrl-click from my Mac days as being reserved for contextual menus, but I dunno…

@chrisaljoudi

@wolftune right — in fact, if one just implements it as ctrl-click, that maps to ⌘click on a Mac. Just like with the popup switch.

@wolftune

FWIW, I have no strong feelings, but I prefer to just tell people who want to quickly do permanent things to use this modifier-click option and not have a cluttered UI with some "permanent default" setting. Just keep the temporary-by-default the case along with the lock function and the modifier-click override per item.

But not insisting, that's just my opinion.

@gorhill

@wolftune I like the idea, IMO this resolves everything, and it also serves those who do not mind the padlock. I will go with <Ctrl>-click as per comments.

@alejandrolemus

I would suggest the padlock still been shown, at least briefly, after clicking or ctrl+clicking, in order for the user to receive feedback on whether was a permanent or temporary rule.

@wolftune

@alejandrolemus well, the open padlock must still be shown because that's a separate function. The normal process for almost everyone always will be to make a rule temporary and sometimes choose to later keep it permanent. So they'll want to see the padlock and be able to use it to make-permanent the temporary settings.

I don't yet fully understand whether the padlock will be "make permanent all temporary settings" or some other function. If it is that, then it does not make sense to show it as locked each time someone ctrl-clicks. The locked image would mean that all adjustments are permanent and unlocked means some temporary ones are active… I think… I might be a little confused…

@alejandrolemus

@wolftune I think you are right, if rule is permanent, there is no point in showing the padlock. If I got it right, it is only there to commit temporary rules.
I was thinking more along the lines of users been sure the ctrl key was pressed while clicking the cell, but sure I see now is more of a fancy feature, not a very useful one.

@gorhill

I would suggest the padlock still been shown

No, what is a trivial sentence, "padlock still been shown, at least briefly", is actually quite a whole lot of complicated code.

Currently it's how ot works: if the padlock is there, it's because there is at least one temporary rule in the pane. That's about it. Sticking to that strict definition will remove any possible confusion.

@gorhill gorhill added a commit that referenced this issue
@gorhill gorhill gorhill/uBlock#731 (comment) 050fee4
@gorhill

users been sure the ctrl key was pressed while clicking the cell

If the padlock is not visible, this means the rule was saved.

@gorhill gorhill closed this
@chrisaljoudi

@gorhill this is not regarding the padlock, but the minifirewall in general.

Do you think people would find it easier to understand if the names were "Sandbox"/"Stored" instead of "Temporary"/"Permanent"

@wolftune

@gorhill I think it's great that the ctrl-click function allows per-item permanence instead of just locking in the whole set all at once. But about situations with a mix in terms of UI feedback? If something is temporary and something else is permanent, what will identify to the user reviewing a little while later which rule has which status?

@wolftune

@chrisaljoudi I think "temporary" and "permanent" are most clear and recognized, but that's not a strong feeling. Certainly it's what RequestPolicy and NoScript use.

@alejandrolemus

@gorhill yes I noticed before. Comment timing :)

@chrisaljoudi sorry to get in the way, but pretty please no. I'm a user, not very a savvy one, but a user. Temp/Permanent is way better IMHO.

@wolftune the Settings page? Edit: (screenshots earlier in this thread)

@Betsy25

There's something definitely not quite right here. Here are the steps I take and the results they give me...

  • On this very same page here, ctrl-click images to block images on this site only & reload. (avatars no longer loaded)
  • Open up the "My Rules" page (ctrl-clicked item is seemingly temporary)
  • click "Revert"
  • Now force reload this very page in the browser. Result : The images are still not visible (upon inspection using Fiddler, they do get requested, but get a return of 304 Not Modified, with a Content-Length of 0, and re-opening the "My Rules" page does not show the filter anywhere. Closing & Reopening the browser is needed for all images to become visible again.

Anyone can reproduce ?

EDIT: Same experience when just simple clicking instead of ctrl-clicking.
EDIT: Browser = Firefox (nightly), Win7 64bit.

@gorhill

@wolftune

If something is temporary and something else is permanent, what will identify to the user reviewing a little while later which rule has which status?

uMatrix has some UI to distinguish permanent rules from temporary ones. But it's a part I spend a ridiculous amount of time to work out, and I've never been satisfied completely (too many visual cues can quickly become noise).

That said, I think it's fine for now what we have in uBlock, I prefer the wait and see. We can always invent more issues but I prefer that whatever is deemed an issue confirms itself over time through feedback.

So currently I will be conservative and stick to the definition "there is a least one temporary rule in the pane". If a user like the result of the current rules on the web page, lock the state of the pane down. There is always the "My rules" tab in the dashboard to sort out what is temporary/permanent at a glance.

@wolftune

@gorhill Sounds like good thinking to me overall. Don't do work if it's not really needed. If it were considered any further, I think I'd suggest a little icon of something indicating temporary status next to or over any temporary setting. But yeah, could be a someday/maybe issue.

@gorhill

If anything, we probably need an eraser aside the padlock, just like in uMatrix. But I will wait for now, and if needed that should go in its own issue.

@wolftune

@gorhill One last detail: when does the "session" end? Is it quitting the browser or just leaving the site? I was thinking about an eraser function, like a "remove all temporary" but knowing what will reset the session is an adequate workaround for now…

@gorhill

When restarting the extension.

@wolftune

What's the fastest way to restart the extension?

@Betsy25

@gorhill or anyone else,

One last thing, can you please try to reproduce the issue explained in my previous post

@gorhill

@Betsy25 Open a separate issue please. I tried to repro and could not. Will need more details, but we can't keep throwing more stuff in here.

@gorhill

@wolftune If it's for the purpose of removing all temporary rules, just use "Revert" in the "My rules" tab.

@gorhill gorhill removed the fixing label
@AlexVallat AlexVallat pushed a commit to AlexVallat/uBlock that referenced this issue
@gorhill gorhill this addresses #731 b0f6269
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.