Closed atuchin-m closed 1 month ago
@rebron To fix https://github.com/brave/brave-browser/issues/39610 we need to reimplement the adblock-related items in the menu, that is done in the PR https://github.com/brave/brave-core/pull/25411.
Here is some product-related questions to answer. Could you please take a look?
Brave
should be located? Before the PR we use the extension section, but it's not an extension-related anymore. The the PR I add the item after Print
. Allows all trackers and ads
is set in Shields? Currently we always show it, but added filters will not work if Shields are down.before | after |
---|---|
@rebron To fix #39610 we need to reimplement the adblock-related items in the menu, that is done in the PR brave/brave-core#25411.
Here is some product-related questions to answer. Could you please take a look?
- Do we want to rename the menu items or the current state is ok?
I'm wondering if we just bring in Block element
up to the menu and we can remove Manage custom filters here.
wdyt @ShivanKaul @antonok-edm There's probably still a better name for this. Content blocking
if we're keeping the sub-menu.
- Do we still need to have Leo icon? We don't use it for other items.
It's fine to remove the Brave logo, especially if we do the above.
- Where the menu
Brave
should be located? Before the PR we use the extension section, but it's not an extension-related anymore. The the PR I add the item after
Put it back to under Translate to English. Your current location may have Cast...
as a menu item. And Create QR Code for this page has Send to your Devices if Sync is enabled.
- Should we disable or hide the menu when
Allows all trackers and ads
is set in Shields? Currently we always show it, but added filters will not work if Shields are down.
Always show. It's fine even with allow all tracker and ads to have this option.
- Should we hide the items in some menu mode (the text selected, the image, the link)? Before the PR we don't care, always show.
That makes sense to me. Don't show when selecting text and on a link. I think with an image, users may want to block that image.
- Should we disable or hide the menu when
Allows all trackers and ads
is set in Shields? Currently we always show it, but added filters will not work if Shields are down.Always show. It's fine even with allow all tracker and ads to have this option.
Actually @ShivanKaul @antonok-edm. I guess with Shields down, blocking elements doesn't work then probably doesn't make sense to have this menu item available as an option.
Actually @ShivanKaul @antonok-edm. I guess with Shields down, blocking elements doesn't work then probably doesn't make sense to have this menu item available as an option.
It's an issue now: if Shields are done, you can still select an item to block and it will be immediately blocked (not by adblock, but by injecting a CSS by the script). But after you reload the page the element will be still visible.
option 1 | option 2 |
---|---|
Image menu position(before) | Image menu position(option 1) |
---|---|
BTW, @rebron WDYT about replacing Block element
to Block elements
? The first sounds like:
Sounds good. Can change it to Block elements
for now.
This is fantastic work @atuchin-m! https://github.com/brave/brave-browser/issues/40821#issuecomment-2328467130 are all very pertinent questions.
I'll chat with @antonok-edm about the context menu label/behaviour (whether under Brave > or top-level) and get back to you by EOD.
Where the menu Brave should be located? Before the PR we use the extension section, but it's not an extension-related anymore. The the PR I add the item after Print.
No strong feelings here, but it might make more sense for it to be right above Inspect
, since the next step, creating the filter by selecting it on the page, is in the same category of user actions as Inspecting an HTML element IMO.
Should we disable or hide the menu when Allows all trackers and ads is set in Shields? Currently we always show it, but added filters will not work if Shields are down.
You're right about the behaviour in https://github.com/brave/brave-browser/issues/40821#issuecomment-2330746626, it's definitely a bit confusing. It SGTM to just have it not appear if Ads & Tracker setting is Disabled
(or allowed like you said). Shields down would override that setting too.
Should we hide the items in some menu mode (the text selected, the image, the link)? Before the PR we don't care, always show.
I see that a link is actually selectable/blockable currently. I propose hiding the item when text selected (where it doesn't show up, you can only block the div/para), but not in the other 2 situations.
Okay, here's a suggestion:
Block elements
to be top-level. Get rid of the Manage custom filters
.Manage custom filters
button alongside Create
and Quit
after the user selects an element.
@rebron @ShivanKaul PTAL:
Translate to ..
);Manage filters
is added. BTW, these button are not translatable now (the same for Create
and Quit
)Allows all trackers and ads
state;Thanks @atuchin-m.
Block elements
to live in the View Page Source
and Inspect
section. If it's not too much trouble, let's make this change.Everything else SGTM.
@ShivanKaul thanks for the comment.
Leo AI tool
, you could try it yourself. inspect
: after clicking it a user have to select the element again.Gotcha, that all seems fine then. I guess I can't think of a case where a user might want to block an item on the page that was a hyperlink but not an image, so we can leave it out for now.
@ShivanKaul @rebron Ok, let's move the item, it isn't a rocket science. Also it is always shown for links. | blank space click | link click |
---|---|---|
IMO it should still have the Brave shields icon in the menu, but if that's been decided otherwise then fine.
Your rationale is that it's a Brave Shields feature? I considered that, just seems slightly inconsistent to have a Brave logo (which happens to be the same as the Shields logo) for this but not Leo context menu or Copy Clean Link.
For QA: it makes sense to verify all the related changes together: https://github.com/brave/brave-core/pull/25330 https://github.com/brave/brave-core/pull/25358 https://github.com/brave/brave-core/pull/25411
Scenario 1:
Block elements
Create
.Brave => Block element
) as the referenceScenario 2 (Manage filters):
Block elements
Create
Block elements
again, click Manage filters
button.Case 3 (Menu position and show/hide logic). Verify that:
Block elements
item is always above Inspect
Adding QA/Blocked
pending response from https://github.com/brave/brave-browser/issues/40696#issuecomment-2362112901
The above requires 1.71.95
or higher for 1.71.x
verification 👍
@atuchin-m @kjozwiak Will this be coming to Android? #33241
Verification PASSED
using
Brave | 1.71.109 Chromium: 129.0.6668.89 (Official Build) beta (64-bit)
-- | --
Revision | 538f203fb4c3449f0684dbabd4ef6e777c4e4a3b
OS | Windows 11 Version 23H2 (Build 22631.4249)
Testcase 1: (Create)
Block elements
optionBlock elements
activated the content picker modebrave://settings/shields/filters
page againstep 4 | step 5 | step 7 | step 8 | step 10 | step 12 | step 15 | step 17 | |
---|---|---|---|---|---|---|---|---|
Testcase 2 (Manage filters):
Block elements
optionCreate
in the rules-box writes the rule into brave://settings/shields/filters
without any issuesstep 3 | step 4 | step 7 | step 9 |
---|---|---|---|
Testcase 3 (Menu position and show/hide logic).
Block elements
item is always above Inspect via context menu Block elements
is being displayed via the context menu for linksBlock elements
is not being displayed for selected text in the context menu Block elements
is hidden on NTP Block elements
is hidden for brave://pages
Block elements
is not being displayed when Allow all trackers & ads
in a page Block elements
is being displayed when Block trackers & ads & Aggressive
is selectedstep 3 | step 4 | step 5 | step 6 | step 7a | step 7b |
---|---|---|---|---|---|
step 8a | step 8 b | step 9a | step 9b |
---|---|---|---|
Verified with
Brave | 1.71.105 Chromium: 129.0.6668.89 (Official Build) beta (x86_64)
-- | --
Revision | f69ba167992437799f1dbcce81e90ba501a3d63e
OS | macOS Version 14.7 (Build 23H124)
Verified test plan from https://github.com/brave/brave-browser/issues/40821#issuecomment-2352446992.
Verified with
Brave | 1.71.112 Chromium: 130.0.6723.44 (Official Build) (64-bit)
-- | --
Revision | 7d51df656b247f9432ee714a6d160142a1e11c13
OS | Linux
Verified test plan from https://github.com/brave/brave-browser/issues/40821#issuecomment-2352446992.
Description
The epic: https://github.com/brave/brave-browser/issues/39610 The previous task: https://github.com/brave/brave-browser/issues/40696
Currently content picker typescript doesn't need Brave extension to work, but it's still injected via the background page. We need:
No changes in the feature logic are expected.