-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[PM-13115] Allow users to disable extension content script injections by domain #11826
Changes from 17 commits
76d68d2
3a1f241
9a50c1b
fd9719c
427db63
2686be0
5d60897
2f8d2ac
05b0dc0
1c6ec55
d62edcf
c339d68
09095b0
a77d48d
b962373
2b1a004
958a738
f408574
fe40dd8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,6 @@ | |
|
||
import { BrowserApi } from "../../../platform/browser/browser-api"; | ||
import { PopOutComponent } from "../../../platform/popup/components/pop-out.component"; | ||
import { PopupFooterComponent } from "../../../platform/popup/layout/popup-footer.component"; | ||
import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component"; | ||
import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component"; | ||
|
||
|
@@ -67,7 +66,6 @@ | |
JslibModule, | ||
LinkModule, | ||
PopOutComponent, | ||
PopupFooterComponent, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
PopupHeaderComponent, | ||
PopupPageComponent, | ||
RouterModule, | ||
|
@@ -87,6 +85,7 @@ | |
protected inlineMenuVisibility: InlineMenuVisibilitySetting = | ||
AutofillOverlayVisibility.OnFieldFocus; | ||
protected inlineMenuPositioningImprovementsEnabled: boolean = false; | ||
protected blockBrowserInjectionsByDomainEnabled: boolean = false; | ||
protected browserClientVendor: BrowserClientVendor = BrowserClientVendors.Unknown; | ||
protected disablePasswordManagerURI: DisablePasswordManagerUri = | ||
DisablePasswordManagerUris.Unknown; | ||
|
@@ -164,6 +163,10 @@ | |
FeatureFlag.InlineMenuPositioningImprovements, | ||
); | ||
|
||
this.blockBrowserInjectionsByDomainEnabled = await this.configService.getFeatureFlag( | ||
FeatureFlag.BlockBrowserInjectionsByDomain, | ||
); | ||
|
||
this.showInlineMenuIdentities = | ||
this.inlineMenuPositioningImprovementsEnabled && | ||
(await firstValueFrom(this.autofillSettingsService.showInlineMenuIdentities$)); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<popup-page> | ||
<popup-header slot="header" pageTitle="{{ 'blockedDomains' | i18n }}" showBackButton> | ||
<ng-container slot="end"> | ||
<app-pop-out></app-pop-out> | ||
</ng-container> | ||
</popup-header> | ||
|
||
<div class="tw-bg-background-alt"> | ||
<p>{{ "blockedDomainsDesc" | i18n }}</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it make sense for this description to have info about the type of matching that is used for blocked domains? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do think we need that documentation, though I'm not sure if we should clarify it in the ui here. Perhaps we could explore that in PM-15997 ? |
||
<bit-section *ngIf="!isLoading"> | ||
<bit-section-header> | ||
<h2 bitTypography="h6">{{ "domainsTitle" | i18n }}</h2> | ||
<span bitTypography="body2" slot="end">{{ blockedDomainsState?.length || 0 }}</span> | ||
</bit-section-header> | ||
|
||
<ng-container *ngIf="blockedDomainsState"> | ||
<bit-item | ||
*ngFor="let domain of blockedDomainsState; let i = index; trackBy: trackByFunction" | ||
> | ||
<bit-item-content> | ||
<bit-label *ngIf="i >= fieldsEditThreshold">{{ | ||
"websiteItemLabel" | i18n: i + 1 | ||
}}</bit-label> | ||
<input | ||
*ngIf="i >= fieldsEditThreshold" | ||
#uriInput | ||
appInputVerbatim | ||
bitInput | ||
id="excludedDomain{{ i }}" | ||
inputmode="url" | ||
name="excludedDomain{{ i }}" | ||
type="text" | ||
(change)="fieldChange()" | ||
[(ngModel)]="blockedDomainsState[i]" | ||
/> | ||
<div id="excludedDomain{{ i }}" *ngIf="i < fieldsEditThreshold">{{ domain }}</div> | ||
</bit-item-content> | ||
<button | ||
*ngIf="i < fieldsEditThreshold" | ||
appA11yTitle="{{ 'remove' | i18n }}" | ||
bitIconButton="bwi-minus-circle" | ||
buttonType="danger" | ||
size="small" | ||
slot="end" | ||
type="button" | ||
(click)="removeDomain(i)" | ||
></button> | ||
</bit-item> | ||
</ng-container> | ||
<button bitLink class="tw-pt-2" type="button" linkType="primary" (click)="addNewDomain()"> | ||
<i class="bwi bwi-plus-circle bwi-fw" aria-hidden="true"></i> {{ "addDomain" | i18n }} | ||
</button> | ||
</bit-section> | ||
</div> | ||
<popup-footer slot="footer"> | ||
<button | ||
bitButton | ||
buttonType="primary" | ||
type="submit" | ||
[disabled]="dataIsPristine" | ||
(click)="saveChanges()" | ||
> | ||
{{ "save" | i18n }} | ||
</button> | ||
</popup-footer> | ||
</popup-page> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any way to deep link to the relevant settings page in the notice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that this would be great to have!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed; I've added a follow up task to the epic
This is used in a banner, so that component may need updates as a result.