mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
starlight_help: Add comments for the tip components.
We could also have one underlying component powering all of our custom aside components. The code duplication between KeyboardTip and ZulipTip is high. We are holding off on having that underlying component since that component looks really complex compared to having 2 separate components now. If we feel the duplication is a major issue later on, combining them shouldn't be too much of an hassle.
This commit is contained in:
committed by
Tim Abbott
parent
9812bf187f
commit
5501954637
@@ -15,6 +15,12 @@ assert.ok(
|
||||
);
|
||||
keyboard_icon_first_child.properties.class = "zulip-unplugin-icon";
|
||||
|
||||
// We want to add the `Keyboard tip: ` prefix without a line break or
|
||||
// wrapping it in a paragraph. If we write `Keyboard tip: <slot />`,
|
||||
// slot will be wrapped in it's own paragraph and thus will be placed on
|
||||
// the next line as `Keyboard tip:`. We have to edit slot HTML tree
|
||||
// directly instead to solve this. Same case applies for the keyboard
|
||||
// icon we are inserting. We just inject the icon as raw svg.
|
||||
const prefix_element_list = [
|
||||
keyboard_icon_first_child,
|
||||
{
|
||||
|
@@ -16,6 +16,12 @@ assert.ok(
|
||||
lightbulb_icon_first_child.properties.class =
|
||||
"zulip-unplugin-icon aside-icon-lightbulb";
|
||||
|
||||
// We want to add the `Tip: ` prefix without a line break or wrapping
|
||||
// it in a paragraph. If we write `Tip: <slot />`, slot will be wrapped
|
||||
// in it's own paragraph and thus will be placed on the next line as
|
||||
// `Tip:`. We have to edit slot HTML tree directly instead to solve this.
|
||||
// Same case applies for the ligthbulb icon we are inserting. We just
|
||||
// inject the icon as raw svg.
|
||||
let prefix_element_list = [
|
||||
lightbulb_icon_first_child,
|
||||
{
|
||||
|
Reference in New Issue
Block a user