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

Move help tips settings and remove section (uplift to 1.66.x) #23285

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions app/brave_settings_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@
<message name="IDS_SETTINGS_TABS_SEARCH_SHOW" desc="The button for searching tabs on the left of tab strip region.">
Show tab search button
</message>
<message name="IDS_SETTINGS_BRAVE_MRU_CYCLING_LABEL" desc="The label to activate MRU cycling with Ctrl-tab">
Cycle through the most recently used tabs with Ctrl-Tab
</message>
<message name="IDS_SETTINGS_SPEEDREADER_LABEL" desc="The label to activate Speedreader">
Speedreader
</message>
<message name="IDS_SETTINGS_SPEEDREADER_SUB_LABEL" desc="The sub-label describing Speedreader">
Articles automatically load in reader mode, saving you time
</message>
<message name="IDS_SETTINGS_DISABLE_CLICKABLE_MUTE_INDICATORS" desc="The text for the settings option for disabling clickable tab mute indicators">
Disable mute function in tab speaker icons
</message>

<if expr="toolkit_views">
<message name="IDS_SETTINGS_APPEARNCE_SETTINGS_SIDEBAR_PART_TITLE" desc="Title of sidebar part in settings">
Expand Down Expand Up @@ -1440,22 +1440,21 @@
Only a valid IPFS gateway with Origin isolation enabled can be used in Brave
</message>

<!-- Settings / Help tips -->
<message name="IDS_SETTINGS_HELP_TIPS" desc="Title for an item in the 'Help tips' section of Brave Settings">
Help tips
<!-- Settings / Content -->
<message name="IDS_SETTINGS_BRAVE_MRU_CYCLING_LABEL" desc="The label to activate MRU cycling with Ctrl-tab">
Cycle through the most recently used tabs with Ctrl-Tab
</message>
<message name="IDS_SETTINGS_HELP_TIPS_SHOW_BRAVE_WAYBACK_MACHINE_PROMPT" desc="The label describing the 'wayback machine' toggle option">
<message name="IDS_SETTINGS_SHOW_BRAVE_WAYBACK_MACHINE_PROMPT" desc="The label describing the 'wayback machine' toggle option">
Show Wayback Machine prompt on 404 pages
</message>

<!-- Settings / System -->
<message name="IDS_SETTINGS_WINDOW_CLOSING_CONFIRM_OPTION_LABEL" desc="The text for settings option">
Warn me before closing window with multiple tabs
</message>
<message name="IDS_SETTINGS_CLOSING_LAST_TAB_OPTION_LABEL" desc="The text for settings option">
Close window when closing last tab
</message>
<message name="IDS_SETTINGS_DISABLE_CLICKABLE_MUTE_INDICATORS" desc="The text for the settings option for disabling clickable tab mute indicators">
Disable mute function in tab speaker icons
</message>

<!-- Settings / Leo Assistant -->
<message name="IDS_SETTINGS_LEO_ASSISTANT" desc="Title for an item in the 'Leo Assistant' section of Brave Settings">
Expand Down
7 changes: 7 additions & 0 deletions browser/resources/settings/brave_content_page/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
label="$i18n{tabsToLinks}">
</settings-toggle-button>
</if>
<if expr="enable_brave_wayback_machine">
<settings-toggle-button
class="cr-row"
pref="{{prefs.brave.wayback_machine_enabled}}"
label="$i18n{braveWaybackMachineLabel}">
</settings-toggle-button>
</if>
<settings-animated-pages id="pages" section="content">
<template is="dom-if" route-path="/fonts">
<settings-subpage associated-control="[[$$('#customize-fonts-subpage-trigger')]]"
Expand Down

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions browser/resources/settings/brave_overrides/basic_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import '../brave_content_page/playlist.js'
import '../brave_content_page/speedreader.js'
import '../brave_data_collection_page/brave_data_collection_page.js'
import '../brave_default_extensions_page/brave_default_extensions_page.js'
import '../brave_help_tips_page/brave_help_tips_page.js'
import '../brave_ipfs_page/brave_ipfs_page.js'
import '../brave_new_tab_page/brave_new_tab_page.js'
import '../brave_search_engines_page/brave_search_engines_page.js'
Expand Down Expand Up @@ -311,18 +310,6 @@ RegisterPolymerTemplateModifications({
prefs: '{{prefs}}'
}
))
const sectionHelpTips = document.createElement('template')
sectionHelpTips.setAttribute('is', 'dom-if')
sectionHelpTips.setAttribute('restamp', 'true')
sectionHelpTips.setAttribute('if', '[[showPage_(pageVisibility.braveHelpTips)]]')
sectionHelpTips.content.appendChild(createSectionElement(
'braveHelpTips',
'braveHelpTips',
'settings-brave-help-tips-page',
{
prefs: '{{prefs}}'
}
))
const sectionLeoAssist = document.createElement('template')
sectionLeoAssist.setAttribute('is', 'dom-if')
sectionLeoAssist.setAttribute('restamp', 'true')
Expand Down Expand Up @@ -478,12 +465,6 @@ RegisterPolymerTemplateModifications({
sectionLanguages.insertAdjacentElement('beforebegin', sectionAutofill)
}
}
// Move help tips after downloads
const sectionDownloads =
getSectionElement(advancedSubSectionsTemplate.content, 'downloads')
if (sectionDownloads) {
sectionDownloads.insertAdjacentElement('afterend', sectionHelpTips)
}
}
}
})
9 changes: 0 additions & 9 deletions browser/resources/settings/brave_overrides/settings_menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,6 @@ RegisterPolymerTemplateModifications({
const autofillEl = getMenuElement(templateContent, '/autofill')
const languagesEl = getMenuElement(templateContent, '/languages')
languagesEl.insertAdjacentElement('beforebegin', autofillEl)
// Move HelpTips after downloads
const helpTipsEl = createMenuElement(
loadTimeData.getString('braveHelpTips'),
'/braveHelpTips',
'help-outline',
'braveHelpTips',
)
const downloadsEl = getMenuElement(templateContent, '/downloads')
downloadsEl.insertAdjacentElement('afterend', helpTipsEl)
// Allow Accessibility to be removed :-(
const a11yEl = getMenuElement(templateContent, '/accessibility')
a11yEl.setAttribute('hidden', '[[!pageVisibility.a11y]')
Expand Down
25 changes: 24 additions & 1 deletion browser/resources/settings/brave_overrides/system_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,34 @@ RegisterPolymerTemplateModifications({
<settings-toggle-button
class="cr-row"
pref="{{prefs.brave.enable_closing_last_tab}}"
label="${loadTimeData.getString('braveHelpTipsClosingLastTab')}"
label="${loadTimeData.getString('braveClosingLastTab')}"
>
</settings-toggle-button>
`
)

templateContent.appendChild(
html`
<settings-toggle-button
class="cr-row hr"
pref="{{prefs.brave.enable_window_closing_confirm}}"
label="${loadTimeData.getString('braveWarnBeforeClosingWindow')}">
</settings-toggle-button>
`
)

// <if expr="is_macosx">
templateContent.appendChild(
html`
<settings-toggle-button
class="cr-row hr"
pref="{{prefs.browser.confirm_to_quit}}"
label="${loadTimeData.getString('warnBeforeQuitting')}">
</settings-toggle-button>
`
)
// </if>

// <if expr="enable_brave_vpn_wireguard">
let showVpnPage = loadTimeData.getBoolean('isBraveVPNEnabled')
// <if expr="is_macosx">
Expand Down
5 changes: 0 additions & 5 deletions browser/resources/settings/brave_routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ export default function addBraveRoutes(r: Partial<SettingsRoutes>) {
r.BRAVE_WALLET = r.BRAVE_WEB3.createSection('/wallet', 'wallet')
r.BRAVE_WALLET_NETWORKS = r.BRAVE_WALLET.createChild('/wallet/networks');
}
if (r.ADVANCED) {
r.BRAVE_HELP_TIPS = r.ADVANCED.createSection('/braveHelpTips', 'braveHelpTips')
} else if (!isGuest) {
console.error('[Brave Settings Overrides] Could not find ADVANCED page', r)
}
r.BRAVE_NEW_TAB = r.BASIC.createSection('/newTab', 'newTab')
if (r.SITE_SETTINGS_SITE_DETAILS) {
r.BRAVE_SITE_SETTINGS_COOKIES_DETAILS =
Expand Down
1 change: 0 additions & 1 deletion browser/resources/settings/sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ brave_settings_web_component_files = [
"brave_data_collection_page/brave_data_collection_page.ts",
"brave_default_extensions_page/brave_default_extensions_page.ts",
"brave_default_extensions_page/brave_extensions_manifest_v2_subpage.ts",
"brave_help_tips_page/brave_help_tips_page.ts",
"brave_ipfs_page/add_ipfs_peer_dialog.ts",
"brave_ipfs_page/add_p2p_key_dialog.ts",
"brave_ipfs_page/brave_ipfs_page.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,11 @@ void BraveAddCommonStrings(content::WebUIDataSource* html_source,
{"braveWeb3Domains", IDS_BRAVE_WEB3_DOMAINS_SETTINGS_SECTION},
{"braveTor", IDS_BRAVE_TOR_SETTINGS_SECTION},
{"braveWallet", IDS_BRAVE_WALLET_SETTINGS_SECTION},
{"braveHelpTips", IDS_SETTINGS_HELP_TIPS},
{"braveHelpTipsWaybackMachineLabel",
IDS_SETTINGS_HELP_TIPS_SHOW_BRAVE_WAYBACK_MACHINE_PROMPT},
{"braveHelpTipsWarnBeforeClosingWindow",
{"braveWaybackMachineLabel",
IDS_SETTINGS_SHOW_BRAVE_WAYBACK_MACHINE_PROMPT},
{"braveWarnBeforeClosingWindow",
IDS_SETTINGS_WINDOW_CLOSING_CONFIRM_OPTION_LABEL},
{"braveHelpTipsClosingLastTab",
IDS_SETTINGS_CLOSING_LAST_TAB_OPTION_LABEL},
{"braveClosingLastTab", IDS_SETTINGS_CLOSING_LAST_TAB_OPTION_LABEL},
{"braveDisableClickableMuteIndicators",
IDS_SETTINGS_DISABLE_CLICKABLE_MUTE_INDICATORS},

Expand Down
4 changes: 2 additions & 2 deletions patches/chrome-browser-resources-settings-router.ts.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
diff --git a/chrome/browser/resources/settings/router.ts b/chrome/browser/resources/settings/router.ts
index c862f46a27b7b24d91429856d24a0fe3d2e7100f..53273cc20f31a945d93f7d528c46c3fbf5ce913b 100644
index c862f46a27b7b24d91429856d24a0fe3d2e7100f..119cf9ea5431f2e40a9e7899a46b8eb356635c9d 100644
--- a/chrome/browser/resources/settings/router.ts
+++ b/chrome/browser/resources/settings/router.ts
@@ -111,6 +111,7 @@ export interface SettingsRoutes {
SYSTEM: Route;
TRACKING_PROTECTION: Route;
TRIGGERED_RESET_DIALOG: Route;
+ GET_STARTED: Route; SHIELDS: Route; SOCIAL_BLOCKING: Route; EXTENSIONS: Route; EXTENSIONS_V2: Route; BRAVE_SYNC: Route; BRAVE_SYNC_SETUP: Route; BRAVE_IPFS: Route; BRAVE_WALLET: Route; BRAVE_WEB3: Route; BRAVE_HELP_TIPS: Route; BRAVE_NEW_TAB: Route; THEMES: Route; BRAVE_SITE_SETTINGS_COOKIES_DETAILS: Route;
+ GET_STARTED: Route; SHIELDS: Route; SOCIAL_BLOCKING: Route; EXTENSIONS: Route; EXTENSIONS_V2: Route; BRAVE_SYNC: Route; BRAVE_SYNC_SETUP: Route; BRAVE_IPFS: Route; BRAVE_WALLET: Route; BRAVE_WEB3: Route; BRAVE_NEW_TAB: Route; THEMES: Route; BRAVE_SITE_SETTINGS_COOKIES_DETAILS: Route;
}

/** Class for navigable routes. */
Loading