Add support/privacy/about branding URLs#130
Conversation
Introduce supportUrl, privacyPolicyUrl and aboutUrl branding properties across the project. Updates include managed schema, default configs, enterprise policy templates (REG/PS/ADMX/ADML/JSON), options and popup UI/JS, config manager merging logic (including deriving supportUrl from supportEmail when missing), and tests covering branding link behavior. Also removes the legacy companyURL field from many places and updates docs to show the new properties and examples.
There was a problem hiding this comment.
Pull request overview
Adds explicit branding link properties (supportUrl, privacyPolicyUrl, aboutUrl) across the extension (config, enterprise policies, UI, and docs), while removing the legacy companyURL/companyLink surface.
Changes:
- Extend branding defaults/schema/config and enterprise policy templates to include
supportUrl,privacyPolicyUrl, andaboutUrl. - Update popup/options UI to use the new branding URL fields (and remove the company link from the popup footer).
- Add tests for enterprise-provided branding URLs and derived support link behavior.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/config-persistence.test.js | Adds tests for branding link precedence and support URL derivation. |
| scripts/modules/config-manager.js | Adds new default branding fields and updates branding merge/derivation logic. |
| popup/popup.js | Applies aboutUrl (and removes legacy company link handling). |
| popup/popup.html | Removes footer company hyperlink. |
| options/options.js | Adds new branding inputs (support/privacy/about URLs) and removes company URL handling. |
| options/options.html | Updates branding settings UI to include new URL fields and removes company URL field. |
| enterprise/macos-linux/edge-managed-policy.json | Adds new branding URL fields to managed policy example/template. |
| enterprise/macos-linux/chrome-managed-policy.json | Adds new branding URL fields to managed policy example/template. |
| enterprise/firefox/policies.json | Removes legacy companyURL and adds new branding URL fields. |
| enterprise/admx/en-US/Check-Extension.adml | Updates policy strings/presentations for the new branding URL fields. |
| enterprise/admx/Check-Extension.admx | Adds new policies for branding URL fields and removes legacy company URL policy references. |
| enterprise/Test-Extension-Policy.ps1 | Removes legacy company URL from test branding values. |
| enterprise/Remove-Windows-Chrome-and-Edge.ps1 | Updates registry cleanup list to remove new branding URL properties. |
| enterprise/Deploy-Windows-Chrome-and-Edge.ps1 | Adds deployment variables and registry writes for new branding URL properties. |
| enterprise/Check-Extension-Policy.reg | Adds new branding URL values to registry template. |
| docs/settings/branding.md | Documents the new branding URL properties and updates examples. |
| config/managed_schema.json | Replaces legacy company URL with new branding URL properties in managed schema. |
| config/branding.json | Adds new top-level branding URL defaults and removes legacy company URL. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -480,6 +488,11 @@ export class ConfigManager { | |||
| finalBranding.genericWebhook = currentConfig.genericWebhook; | |||
| } | |||
|
|
|||
| // Derive support URL when only partial branding is configured | |||
| if (!finalBranding.supportUrl && finalBranding.supportEmail) { | |||
| finalBranding.supportUrl = `mailto:${finalBranding.supportEmail}`; | |||
| } | |||
There was a problem hiding this comment.
getFinalBrandingConfig() always seeds finalBranding with getDefaultBrandingConfig(), which includes a non-empty supportUrl. That means if (!finalBranding.supportUrl && finalBranding.supportEmail) will never run when a config only sets supportEmail (it will keep the default supportUrl), so the intended “derive supportUrl from supportEmail when missing” behavior won’t happen. Consider deriving based on whether supportUrl was explicitly provided in user/enterprise branding (e.g., check 'supportUrl' in brandingConfig/customBranding) or compute the mailto before applying the default supportUrl fallback.
| await t.test('should honor explicit support/privacy/about URLs from enterprise custom branding', async () => { | ||
| chromeMock.storage.managed.set({ | ||
| customBranding: { | ||
| supportUrl: 'https://enterprise.example/support', | ||
| privacyPolicyUrl: 'https://enterprise.example/privacy', | ||
| aboutUrl: 'https://enterprise.example/about' | ||
| } | ||
| }); |
There was a problem hiding this comment.
The managed customBranding set in the first subtest persists into the second subtest, so the “derive support link from supportEmail” case is still running under enterprise branding and won’t exercise the intended path. Clear/reset chromeMock.storage.managed (or explicitly unset customBranding) before running the second subtest so it runs with manual-only branding.
Introduce supportUrl, privacyPolicyUrl and aboutUrl branding properties across the project. Updates include managed schema, default configs, enterprise policy templates (REG/PS/ADMX/ADML/JSON), options and popup UI/JS, config manager merging logic (including deriving supportUrl from supportEmail when missing), and tests covering branding link behavior. Also removes the legacy companyURL field from many places and updates docs to show the new properties and examples.