help-beta: Introduce NavigationSteps component for settings links.

Fixes #31254.
We are using `SHOW_RELATIVE_LINKS` as the env variable to set if we
want to show relative settings link or non-linked markdown instructions.
We are not trying to determine `SHOW_SETTINGS_LINK` by ourselves. See
https://chat.zulip.org/#narrow/channel/49-development-help/topic/Passing.20sitename.20for.20astro.20project.20in.20production.2E
for more details.
Until the cutover happens, we would need to manually update the mapping
in both the astro component and the python file, but since that mapping
is not frequently changed, that is a tradeoff we can make.
We had to add margin-bottom: 0 to icon styling since starlight was
inserting a margin-bottom of 1.25 em for list items.
This commit is contained in:
Shubham Padia
2025-06-23 14:15:31 +00:00
committed by Tim Abbott
parent 8e1f0c4bcf
commit a0deeae80e
4 changed files with 240 additions and 6 deletions

View File

@@ -15,6 +15,11 @@ from zerver.lib.markdown.priorities import PREPROCESSOR_PRIORITIES
REGEXP = re.compile(r"\{settings_tab\|(?P<setting_identifier>.*?)\}")
# If any changes to this link mapping are made,
# `help-beta/src/components/NavigationSteps.astro` should be updated accordingly.
# This manual update mechanism will cease to exist once we have switched to the
# help-beta system.
link_mapping = {
# a mapping from the setting identifier that is the same as the final URL
# breadcrumb to that setting to the name of its setting type, the setting