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

New popup More and Less buttons do not always dissapear #1059

Closed
5 of 8 tasks
jspenguin2017 opened this issue May 21, 2020 · 12 comments
Closed
5 of 8 tasks

New popup More and Less buttons do not always dissapear #1059

jspenguin2017 opened this issue May 21, 2020 · 12 comments
Labels
bug Something isn't working fixed issue has been addressed

Comments

@jspenguin2017
Copy link

Prerequisites

  • I verified that this is not a filter issue
  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

When the advanced option popupPanelLockedSections is used, the Less button in the new popup do not disappear when all non-locked sections are hidden.

Similarly, when the advanced option popupPanelDisabledSections is used, the More button in the new popup do not disappear when all non-disabled sections are shown.

image

A specific URL where the issue occurs

Advanced settings page.

Steps to Reproduce

  1. Change popupPanelLockedSections to 3
  2. Open the popup
  3. Keep clicking Less

  1. Change popupPanelDisabledSections to 3
  2. Open the popup
  3. Keep clicking More

Expected behavior:

The Less button would disappear when all non-locked sections are hidden.


The More button would disappear when all non-disabled sections are shown.

Actual behavior:

The Less button never disappears and stops responding to clicks when all non-locked sections are hidden.


The More button never disappears and stops responding to clicks when all non-disabled sections are shown.

Your environment

  • uBlock Origin version: 1.27.5b2
  • Browser Name and version: Chrome 84
  • Operating System and version: Windows 10
@jspenguin2017
Copy link
Author

Also it looks like the Wiki is missing the documentation for the new advanced settings options.

@gothic-bum
Copy link

gothic-bum commented Nov 23, 2022

@gorhill:

I tested the fix with uBO 1.45.3b7 on Firefox 107.0, and here is a case where the "More" and "Less" buttons still appear:

popupPanelDisabledSections 33
popupPanelLockedSections 28

But they don't appear in this case:

popupPanelDisabledSections 34
popupPanelLockedSections 29

Shouldn't the "More" and "Less" buttons not appear at all in the first case (since there isn't anything to expand/compress), and thus behave like the second case?

@gorhill
Copy link
Member

gorhill commented Nov 23, 2022

It's because section b (blocked since install section) is a child of section a (stats section), so not disabling b means it's considered expandable even if not visible. Use 35 instead of 33. Note that these advanced settings are still undocumented, so I am not going to add code to deal with the quirk you mention, I consider what I fixed to be already good enough, and the workaround is to use 0b11 (disable both a and b sections). Eventually if I make these settings official, I will probably use a more human friendly approach than bit vectors.

@gwarser
Copy link

gwarser commented Dec 7, 2022

While testing #2248 on Firefox 107.0 (64 bity) in a relatively fresh profile (profile recreated few days ago), I updated 1.45.2 to b9 (turn off in add-ons manager, install from release page, turn back on), popup was locked on minimum preset and more/less buttons mostly stopped working:

simplescreenrecorder-2022-12-07_18.27.46.mp4

On second try (after recreating profile again) all looked fine, but when I tried applying settings from #1059 (comment) my graphics freezed :|

It's all probably because of me and my system, but can someone try again if it works fine after update?

Details
uBlock Origin: 1.45.3b9
Firefox: 107
filterset (summary): 
  network: 92991
  cosmetic: 86170
  scriptlet: 18722
  html: 875
listset (total-discarded, last-updated): 
  added: 
    fanboy-cookiemonster: 43734-158, 22m
  default: 
    user-filters: 1-0, never
    ublock-filters: 32293-92, 23m
    ublock-badware: 4153-1, 23m
    ublock-privacy: 309-0, 23m
    ublock-abuse: 77-0, 23m
    ublock-unbreak: 1927-2, 23m
    ublock-quick-fixes: 410-0, 23m
    easylist: 65699-649, 23m
    easyprivacy: 30950-1739, 23m
    urlhaus-1: 9239-0, 23m
    plowe-0: 3677-3, 23m
    POL-0: 7859-25, 23m
    POL-2: 1279-12, 23m
filterset (user): [array of 1 redacted]
modifiedUserSettings: 
  advancedUserEnabled: true <- this toggled after the fact, to check the settings
modifiedHiddenSettings: [none]
supportStats: 
  allReadyAfter: 388 ms
  maxAssetCacheWait: 185 ms

@gorhill
Copy link
Member

gorhill commented Dec 7, 2022

Were there errors reported in browser console?

@gwarser
Copy link

gwarser commented Dec 7, 2022

I can reproduce. What I did:

  • remove b9
  • restart browser
  • install 45.2
  • add
     popupPanelDisabledSections 33
     popupPanelLockedSections 28
    
    by pasting in last (42) line of advanced settings and apply (nice trick)
  • open popup, click More/Less few times and then smash "More" many times (10? 20?) (not 100% sure about details in this point, I will try again)
  • select above lines in advanced settings and delete them, then apply
  • turn off uBO
  • install b9 from releases page
  • try popup again

@gorhill
Copy link
Member

gorhill commented Dec 7, 2022

by pasting in last (42) line of advanced settings and apply (nice trick)

I don't understand what you are saying there. You mean you paste the two lines at the end of advanced settings content?

@gwarser
Copy link

gwarser commented Dec 7, 2022

Yes, and settings are automagically updated after applying.

@gwarser
Copy link

gwarser commented Dec 7, 2022

AAAnd I cannot reproduce again :(

Maybe it has something to do with number of clicks on buttons, or maybe some storage issue...


No errors in console BTW.

@gwarser
Copy link

gwarser commented Dec 7, 2022

Ok, I can repro again, but this time I did not reset the settings to default in 45.2 before update to b10. Popup is still broken even after resetting advanced settings to default.

@gorhill
Copy link
Member

gorhill commented Dec 7, 2022

Weird, when I look at the popup panel content through the browser inspector, I still see CSS declarations from the previous uBO version, i.e. the one that was using ~= to detect whether the data-more attribute contained specific letters. There is no more such use in the latest version, so it seems to me the browser is using the wrong popup-fenix.css for unknown reasons.


After restarting the browser, it seems fixed for me (maybe I restarted twice). So there is a Firefox issue somewhere which causes the old version of a file to still be used after an update.

@gwarser
Copy link

gwarser commented Dec 10, 2022

It's fine when updated without turning off uBO from add-on manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

4 participants