brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.8k stars 2.33k forks source link

Shields should be visible when Brave is used in PWA context #7715

Open bsclifton opened 4 years ago

bsclifton commented 4 years ago

Problem description

Users have the ability to create a PWA for specific sites (ex: Twitter). They can pick: Hamburger menu => More tools => Create shortcut (if prompted when making the app, click "Create new window")

This allows a distinct icon to be pinned to taskbar / stored on OS as shortcut. When opened, it'll feel like a distinct app. When this is opened, it doesn't show the shields icon... but shields are being applied.

Actual result:

Shields icon (Lion icon) is not shown ☹️

Screen Shot 2020-01-13 at 1 49 38 PM

Expected result:

Shields icon should show and (when clicked) panel should open... like it does in non-PWA context

Screen Shot 2020-01-13 at 1 49 17 PM

The root cause (and proposed fix)

When moving the Shields and BAT icons to the omnibox / URL bar, the extension icons were moved into a BraveActionsContainer which is NOT shown for PWAs.

We could check if the rendering is inside of a PWA context and then not skip rendering of the Shields (and possibly the BAT) icons. In that case, they'd show up in the menu seen under Actual result, next to the other extension icons

Reproduces how often:

100%

Brave version (brave://version info)

Brave 1.5.27 Chromium: 79.0.3945.117 (Official Build) nightly (64-bit)
Revision 04f0a055010adab4484f7497fbfdbf312c307f1d-refs/branch-heads/3945@{#1019}
OS macOS Version 10.15.2 (Build 19C57)
srirambv commented 4 years ago

personal +1 on this.

mikaelf commented 3 years ago

Is there a way to view and change settings for shields before this bug has been fixed? I haven't found a workaround.

srirambv commented 3 years ago

+1 from @youssef20031 via #14886

Actual result:

Screenshot 2021-03-23 105411

Expected result:

Screenshot 2021-03-23 1

sbmueller commented 1 year ago

Adding my vote here. Many PWAs don't work correctly if shields are up, and there is currently no way to disable them AFAIK.