Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

help-beta: Remove header from Zulip note.

Shubham Padia6d93465f3b17
diff --git a/eslint.config.js b/eslint.config.js
index 6d554f0ed95..3357e86cc76 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -305,4 +305,10 @@ export default tseslint.config(
},
},
...astroConfigs.recommended,
+ {
+ files: ["help-beta/src/components/ZulipNote.astro"],
+ rules: {
+ "import/unambiguous": "off",
+ },
+ },
);
diff --git a/help-beta/src/components/ZulipNote.astro b/help-beta/src/components/ZulipNote.astro
new file mode 100644
index 00000000000..d8ed3b403ea
--- /dev/null
+++ b/help-beta/src/components/ZulipNote.astro
@@ -0,0 +1,11 @@
+<!--
+We wanted to have our note without a header that is the ⓘ followed by a title.
+We can make the title disappear by making the title a single space: " ".
+The default aside component provided by starlight will always have an icon however.
+That is why we needed this custom components.
+-->
+<aside aria-label="Note" class={`starlight-aside starlight-aside--note`}>
+ <div class="starlight-aside__content">
+ <slot />
+ </div>
+</aside>
diff --git a/tools/convert-help-center-docs-to-mdx b/tools/convert-help-center-docs-to-mdx
index 024d0188584..f5b81f18ec5 100755
--- a/tools/convert-help-center-docs-to-mdx
+++ b/tools/convert-help-center-docs-to-mdx
@@ -446,12 +446,10 @@ def convert_admonitions_to_asides(
# implementation.
# See https://chat.zulip.org/#narrow/channel/19-documentation/topic/Stage.202.3A.20New.20syntax.20for.20!!!tip.20in.20help-beta/near/2174415
# for more details.
- type = "note"
- title = ""
- replacement = (
- f'\n<Aside type="{type}" title="{title}">\n{admonition_content}\n</Aside>\n'
+ replacement = f"\n<ZulipNote>\n{admonition_content}\n</ZulipNote>\n"
+ import_statement_set.add(
+ f"import ZulipNote from '{components_dir_path}/ZulipNote.astro';"
)
- import_statement_set.add("import { Aside } from '@astrojs/starlight/components'")
elif klass == "tip":
type = "tip"
title = "Tip"