Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
help-beta: Rename "identifier" to "target" in NavigationSteps.
Lauryn Menard624988d49810
diff --git a/help-beta/src/components/NavigationSteps.astro b/help-beta/src/components/NavigationSteps.astroindex 4a80ceb88c9..42b1c188baf 100644--- a/help-beta/src/components/NavigationSteps.astro+++ b/help-beta/src/components/NavigationSteps.astro@@ -35,7 +35,7 @@ const setting_link_mapping: Record<setting_link: string;}> = {- // a mapping from the setting identifier that is the same as the final URL+ // a mapping from the setting target that is the same as the final URL// breadcrumb to that setting to the name of its setting type, the setting// name as it appears in the user interface, and a relative link that can// be used to get to that setting@@ -355,8 +355,8 @@ for (const type of Object.keys(relative_link_mapping)) {};}-const {identifier} = Astro.props;-const navigation_link_type = identifier.split("/")[0];+const {target} = Astro.props;+const navigation_link_type = target.split("/")[0];if (navigation_link_type !== "settings" &&@@ -369,10 +369,10 @@ if (let resultHTML: string | undefined;if (navigation_link_type === "settings") {- resultHTML = getSettingsHTML(identifier.split("/")[1], SHOW_RELATIVE_LINKS);+ resultHTML = getSettingsHTML(target.split("/")[1], SHOW_RELATIVE_LINKS);} else {- const link_type = identifier.split("/")[1];- const key = identifier.split("/")[2];+ const link_type = target.split("/")[1];+ const key = target.split("/")[2];resultHTML = RELATIVE_NAVIGATION_HANDLERS_BY_TYPE[link_type]!(key);}assert.ok(resultHTML !== undefined);diff --git a/tools/convert-help-center-docs-to-mdx b/tools/convert-help-center-docs-to-mdxindex aff508a3852..8bda7df0538 100755--- a/tools/convert-help-center-docs-to-mdx+++ b/tools/convert-help-center-docs-to-mdx@@ -67,7 +67,7 @@ def replace_setting_links(f'import NavigationSteps from "{import_relative_base_path}/NavigationSteps.astro"')setting_identifier = match.group("setting_identifier")- return f'<NavigationSteps identifier="settings/{setting_identifier}" />'+ return f'<NavigationSteps target="settings/{setting_identifier}" />'return setting_links_pattern.sub(replace_setting_links_match, markdown_string)@@ -81,7 +81,7 @@ def replace_relative_links()link_type = match.group("link_type")key = match.group("key")- return f'<NavigationSteps identifier="relative/{link_type}/{key}" />'+ return f'<NavigationSteps target="relative/{link_type}/{key}" />'return RELATIVE_LINKS_PATTERN.sub(replace_relative_links_match, markdown_string)