settings_toggle: Rename `highlight_toggle` to `goto`.

The name sounded like it was doing some highlighting of the given
tab, instead of the actual navigation that the function does.

See https://github.com/zulip/zulip/pull/30268#discussion_r1631531684
This commit is contained in:
Shubham Padia 2024-06-12 07:37:00 +00:00 committed by Tim Abbott
parent d858c36c43
commit 1204d86818
4 changed files with 4 additions and 4 deletions

View File

@ -283,5 +283,5 @@ export function launch(section) {
if (section !== "") {
settings_panel_menu.org_settings.set_current_tab(section);
}
settings_toggle.highlight_toggle("organization");
settings_toggle.goto("organization");
}

View File

@ -370,7 +370,7 @@ function do_hashchange_overlay(old_hash) {
} else {
settings_panel_menu.org_settings.set_current_tab(section);
}
settings_toggle.highlight_toggle(base);
settings_toggle.goto(base);
return;
}

View File

@ -164,7 +164,7 @@ export function launch(section) {
if (section !== "") {
settings_panel_menu.normal_settings.set_current_tab(section);
}
settings_toggle.highlight_toggle("settings");
settings_toggle.goto("settings");
}
export function initialize() {

View File

@ -6,7 +6,7 @@ import * as settings_panel_menu from "./settings_panel_menu";
let toggler;
export function highlight_toggle(tab_name) {
export function goto(tab_name) {
if (toggler) {
toggler.goto(tab_name);
}