Commit Graph

94 Commits

Author SHA1 Message Date
Alya Abbott
e712f02c91 help: Document channel folder management functionality.
Updates the left sidebar and relative settings link in both the
current and new help center documentation.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-08-08 07:19:57 -07:00
Shubham Padia
5e9dec802e help-beta: Make loose ordered lists tight in the conversion tool.
We chose not to edit the original markdown files to make this change
since the conversion script logic can be used for removing these lines
with very little changes and we don't need the original markdown source
files to be edited before the cutover.

The css for making loose and ordered lists look same has been removed
since we wanted to to respect commonmark specification.
2025-08-06 10:44:04 -07:00
Lauryn Menard
1e550d84b7 help-beta: Add icons to settings non-relative link template.
This makes the text for the organization and personal settings
options from the gear menu consistent with the relative link
type of NavigationSteps.
2025-08-05 13:29:07 -07:00
Lauryn Menard
e90302e649 help-beta: Add icon field to RelativeLinkInfo.
When building relative links in NavigationSteps components, we
want to trim any new lines from the raw icon file that's imported.
2025-08-05 13:29:07 -07:00
Lauryn Menard
212580f43e help-beta: Rename imported icon classes in NavigationSteps. 2025-08-05 13:29:07 -07:00
Shubham Padia
3ae0c4c68b help-beta: Make tight and loose lists look the same. 2025-08-04 13:25:15 -07:00
Shubham Padia
c6a0e79342 help-beta: Insert steps around ordered lists.
We remove the ol > li margin rule to space out ordered list items since
that was the result of us overriding an upstream margin rule in
steps.css.

We inserted Steps inside include files only if they are not entirely
composed of an ordered list. If they are, they will eventually be
wrapped inside FlattenedSteps and wrapping these macros with Steps will
not give us the results we desire.
2025-08-04 13:25:15 -07:00
Shubham Padia
502c8072b0 help-beta: Use steps component instead of using steps.css.
Using steps.css right now might feel like the more convenient way out,
but it might introduce friction in upgrades when the upstream code
changes. To tackle that, we convert FlattenList to FlattenedSteps and
explicitly use the steps component.
2025-08-04 13:25:15 -07:00
Shubham Padia
ec72c46ed6 help-beta: All lists should start with one after conversion.
The format step was converting our ordered list items to have
incremental numbering instead of using `1.` for every list item. This
was not because of any remark-lint rule, but because of
`remark-stringify` which auto increments any lists it processes. We
followed the recommended fix from
ae2f941d88/packages/remark-lint-ordered-list-marker-value/readme.md (L185)

We also don't need remark-lint-ordered-list-marker-value package, since
that is already part of the markdown style guide with the value we
desire. Setting it to false was a mistake in the first place.
2025-08-04 09:58:14 -07:00
Shubham Padia
baa87f3f0c help-beta: Run format step in the conversion tool. 2025-08-04 09:55:18 -07:00
Lauryn Menard
624988d498 help-beta: Rename "identifier" to "target" in NavigationSteps. 2025-08-01 09:15:12 -07:00
Lauryn Menard
0c9e0ed941 new-help-center: Update left sidebar for current help center state. 2025-07-30 17:21:49 -07:00
Shubham Padia
66c477f6df help-beta: Add more spacing b/w ordered list steps.
We should ideally be having this styling on class, but there is no
default class for li elements inside an ol. Maybe the best thing here is
to attach classes at different places if possible once have some spare
time after the important post cutover issues are done.
2025-07-30 11:06:16 -07:00
Shubham Padia
429bbae77c help-beta: Flatten only in case of matching tagName.
In the commits following this, we are going to make changes which will
introduce cases with paragraphs, code blocks and other elements inside
list items. Right now, FlattenList will just break in those cases. We
need to return those elements without flattening since those are valid
elements inside a list item.
2025-07-29 10:09:21 -07:00
Alya Abbott
3e661bee9b help: Document channel folders, and update existing docs. 2025-07-28 23:52:53 -07:00
Shubham Padia
f343fc6823 help-beta: Correct casing for sidebar sections. 2025-07-28 22:19:30 -07:00
Shubham Padia
8b99a33c86 help-beta: Make footer smaller in font-size (0.85em). 2025-07-28 15:24:20 -07:00
Shubham Padia
af3b6c8f5e help-beta: Make keyboard shortcut styling more similar to tooltips.
Fixes #35118.
Visual tuning for this was done on a call, some of it was done in
https://chat.zulip.org/#narrow/channel/19-documentation/topic/new.20help.20center.3A.20design
For dark theme, we use the same color as we use in styling
`.tooltip-hotkey-hint`. For light theme, we brainstormed a color that
looked fine to us. Padding and font-size was also experimented and set.
Since we just took inspiration from `tooltip-hotkey-hint` and did not
use the same styling i.e. tweaked them, we do not add any comments
declaring dependency b/w both styles.

We increase the font-size from 0.85em to 1.2em, so we don't need to
increase font-size for ⌘ and ⌥ in scripts/adjust_mac_kbd_tags.ts.

Current help center had special styling for arrow keys, we don't port
that over here, since the styling we do for our keyboard shortcuts does
not necessitate that.
2025-07-28 13:38:59 -07:00
Shubham Padia
b8d4ad8b47 help-beta: Use colors same as webapp banners for asides.
Fixes #35122.
The existing colors were attracting too much attention.
Design discussion was done on
https://chat.zulip.org/#narrow/channel/19-documentation/topic/new.20help.20center.3A.20design.
2025-07-28 13:38:59 -07:00
Shubham Padia
8c503b856e help-beta: Make availability icons work in the new help center.
This commit does not apply the gradient for the idle user circle icon.
We are instead just displaying --color-user-circle-idle for now. #35496
tracks this followup.

We need to use icon tags in our markdown for the icons to be converted
to unplugin icons by the conversion script, this commit fixes that
problem at source for the availability icons.

The css is duplicated from portico/markdown.css, we have not added any
notes that this is duplicated since the css for these classes is already
being duplicated without warning and a simple grep while making those
changes would make it obvious on what changes need to happen.
2025-07-28 12:07:41 -07:00
Lauryn Menard
da148259d8 help-beta: Add "navigation-step-relative-type" class.
Updates the NavigationSteps astro component to add a the
navigation-step-relative-type class for any instructions
that include icons as part of the potential relative link
label.

We remove the space between the icon and text in the label
item and instead use a CSS rule to add white space between
the icon and text. This way any text decoration rules will
not apply to the visual white space between the label's
icon and text.
2025-07-28 11:03:52 -07:00
Shubham Padia
28cb68117f help-beta: Better align icon with the rest of the text for ZulipTip. 2025-07-24 22:35:40 -07:00
Shubham Padia
fd81f5f5fd help-beta: Make icon + Keyboard Tip: a prefix instead of header.
We do not want icon + `Keyboard Tip:` to occupy it's own row. Our
approach for this component and most of the logic is similar to
ZulipTip. We prefer having separate components for note, tip and
keyboard tip, that is why we have duplicated code between ZulipTip and
KeyboardTip, we should think about having a single underlying component
for both to avoid duplication in the future.
We do not have any cases of non paragraph content in keyboard tip, so we
have removed that chunk of code when copying over logic from ZulipTip.
2025-07-24 13:37:51 -07:00
Shubham Padia
cb852b0fa6 help-beta: Add ZulipTip custom component that does not have a header.
We do not want to have a heading for every tip and thus we created a
custom component for our aside. We want to add a lightbulb icon and the
text `Tip:` is bold as a prefix for every tip as if it was already part
of the text. To do that, we cannot insert both of those as html seperate
from the slot html, we had to access the slot html and insert both of
them into the HTML tree.
2025-07-24 12:00:26 -07:00
Shubham Padia
41846b35ab help-beta: Convert indented admonitions to asides.
Fixes https://chat.zulip.org/#narrow/channel/19-documentation/topic/new.20help.20center.3A.20broken.20tip
After indenting asides properly, they became part of lists, so we had to
change Flattenlist to allow asides inside it and ignore comments.
2025-07-24 11:59:48 -07:00
Shubham Padia
21bcf590a1 help-beta: Use zulip-unplugin-icon class for font awesome icons. 2025-07-24 09:02:00 -07:00
Shubham Padia
7311d7e11b help-beta: Add styling for kbd elements.
Fixes #35404.
The styling is just copy-pasted from existing styling.
For ⌘ and ⌥, we removed vertical align as middle, since it was not
aligning with the new css and it looked fine without it. The font-size
was also looking too big, which has been reduced but not all the way to
0.85em. At 0.85em, the symbol is not legible.
2025-07-23 11:37:38 -07:00
Shubham Padia
9f6c00a52c help-beta: Set class explicitly instead of using default class.
Even though we do not allow classes in svgs anymore, astro inserts it's
own class in some cases, causing problems with the icons. `defaultClass`
is only applicable if the svg does not have a class already. So we have
switched to using iconCustomizer instead so the zulip icons always have
the `zulip-unplugin-icon` class.
2025-07-23 11:24:12 -07:00
Anders Kaseorg
d0f9fb73cc dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-22 14:19:56 -07:00
Shubham Padia
81464c2812 help-beta: Make icons work in dark mode.
The icons were not changing color in dark mode, after setting fill to
currentColor, that problem should be solved.
2025-07-22 12:55:05 -07:00
Shubham Padia
bd935e07d8 help-beta: Use defaultClass instead of defaultStyle.
Somehow defaultStyle was not getting applied in all cases, but
defaultClass was getting applied in all cases. We don't have time to
investigate, but using a class is better anyways, so this change should
be fine.
2025-07-22 12:55:05 -07:00
Anders Kaseorg
7236476a9d help-beta: Downgrade to Zod 3.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-22 10:29:37 -07:00
Shubham Padia
21558bd784 help-beta: Decrease line height to make text easier to read. 2025-07-21 12:56:52 -07:00
Shubham Padia
6d93465f3b help-beta: Remove header from Zulip note.
We don't want to have a title of note and the ⓘ  icon in the note aside.
The only way to do this is to have our custom component called
ZulipNote.
2025-07-21 12:56:52 -07:00
Tim Abbott
eaf4970215 help-beta: Shrink all the headings some more. 2025-07-18 14:12:16 -07:00
Shubham Padia
4dc802aa9a help-beta: Add option to format mdx documents.
Partially fixes #35129.

Prettier could not be used because of prettier issue number 12209, not
linked here to avoid spam backlinks on the original issue. Prettier does
not have support for mdx v2 and v3.

We are using remarkLintRulesLintRecommended and
remarkPresentLintMarkdownStyleGuide as our starting set of rules.
None of the rules were giving an error on the starting set, but some
rules were giving lots of warnings on the generated mdx. They are
set to false in this file, we can add them back later as and when
required.

We have not inserted this in the main lint tool, we should do that in
the final cutover PR since we don't want the lint here to give any
unexpected warnings when people are linting stuff unrelated to the mdx
files.

This commit has been tested out on the current state of help center to
not produce any errors or warnings. The first run of format will produce
tons of warnings which are the issues being auto-fixed by the linter.
After that, the second run should produce zero errors.
2025-07-18 12:44:29 -07:00
Shubham Padia
9c22cc07f6 help-beta: Remove top margin from unplugin icons.
In some cases, some of the starlight css was inserting a margin top of
1rem to the svg tag inserted by unplgin-icons. We make the top margin
0 explicitly to make sure that extra margin is not added.
2025-07-17 09:21:16 -07:00
Shubham Padia
a738ac0ff7 help-beta: Fix incorrectly linked entries in sidebar.
Slug was mentioned for the two entries in question as if they were
normal help pages, but they were external links and should have been
mentioned accordingly.
2025-07-17 09:20:34 -07:00
Shubham Padia
070b94aabc help-beta: Set first paragraph of content as meta.description.
Fixes #35115.
2025-07-16 12:02:32 -07:00
Shubham Padia
c03328eeee help-beta: Use astro recommended tsconfig for our project.
Having some options not set to true was causing hard to debug issues
when it comes to types. While that can be solved by changing `allowJs`
to true, it would be good to use the standard tsconfig they recommend in
order to avoid such issues in the future.
2025-07-16 12:02:32 -07:00
Shubham Padia
e0abc5253b help-beta: Adjust kbd tags if the user is using a mac style keyboard.
Fixes #31287.
These tags are not limited to just KeyboardTip, so we want to run the
transformation on all html.
We need to run the transformation client-side since the user's keyboard
style is only known at that time.
We had to override the HEAD component since that's what starlight
recommends to do if we want to include local assets on every page. If we
were using a remote js file, we could have modified the head config
option provided by starlight.
The script file to adjust the tags is mostly just copy-paste of the
original function to adjust for the lack of JQuery. Most of the comments
are also copy-pasted.
One change in the new script is to just use ⌘ symbol directly instead of
using zulip-icon since we don't have any centering problems in the new
help center.
2025-07-16 12:00:45 -07:00
Shubham Padia
1a2adb4e82 help-beta: Update sidebar to the current state.
Partially fixes #35130.
We will still need to do a second check before the cutover, but this
commit does most of the work before the cutover happens.
The comparison was done manually.
Added comment to sidebar index should help update these changes to astro
config, although we will not solely rely on people reading that. A
second check before cutover would be prudent.
2025-07-15 12:23:47 -07:00
Shubham Padia
183b79b1ab help-beta: Highlight heading if it is the target.
Fixes #35119.
In the old help center, our css used to target each heading tag, h1, h2,
etc. individually. We don't need to do that anymore since the first
child of .sl-heading-wrapper is the heading element in starlight.

The rounded border on the top left and top right has been removed since
it did not look good with the default starlight theme.
2025-07-15 09:15:37 -07:00
Shubham Padia
2cdcadf1c6 help-beta: Remove border after the title. 2025-07-15 09:11:27 -07:00
Shubham Padia
4f23bd2e68 help-beta: Decrease heading sizing by a factor of 1.
Fixes #35123.
2025-07-15 09:11:27 -07:00
Shubham Padia
de472a09f9 help-beta: Add footer to the new help center.
Fixes #35116.
We copied whatever logic we needed from documentation_main.html. We have
not added the policy footer case from that html file into our footer
since that case does not apply to the new help center yet.
We process and pass the support email in the build help center step.
2025-07-14 10:45:40 -07:00
Shubham Padia
37da139442 help-beta: Use CORPORATE_ENABLED instead of SHOW_BILLING_HELP_LINKS.
We should use the generic name of the env variable since we intend to
use it in places without the billing help links context.
2025-07-14 10:45:40 -07:00
Shubham Padia
124da4d588 help-beta: Nested lists should not have 1rem margin.
Fixes #35126.
2025-07-14 10:42:25 -07:00
Shubham Padia
aebbdee5b5 help-beta: Add eslint plugin for astro files. 2025-06-30 09:06:18 -07:00
Shubham Padia
f37ffd8937 help-beta: Add prettier plugin for astro files.
Even though we have separate packages for `help-beta`, we have opted to
put the prettier plugin and config for astro files in the main project
itself, so that linting needs to be configured only at one place.
2025-06-30 09:06:18 -07:00