-
-
Notifications
You must be signed in to change notification settings - Fork 95
Update Custom Commands Page #356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThe documentation for creating custom commands was updated to clarify usage differences between commands with and without arguments. The method for retrieving arguments was revised, related images were updated, and JSON command placeholders were made more descriptive. Changes
Poem
✨ Finishing Touches🧪 Generate Unit Tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
documentation/plugins/code-snippets/snippets.json (1)
1-310
: Monolithic snippet registry hurts maintainabilityAll snippets are crammed into a single ~300-line JSON blob. A small edit triggers huge merge conflicts and makes PR reviews painful.
Split the registry into one-snippet-per-file (or at least per topic) and compose them during the build step.documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (2)
16-18
: Grammar nits in warning blockSmall wording fixes improve professionalism:
-This guide show you how to create a custom command with argument, if you don't need arguments, you can use the ... +This guide shows you how to create a custom command with arguments. If you don't need arguments, use the ...
39-40
: Alt text & wording out-of-sync with new variable namesThe guide now refers to “String Builder Variable” but the image alt text still says
Interaction Context Text Variable
.-<Image img={...} alt="Interaction Context Text Variable" width={400}/> +<Image img={...} alt="String Builder Variable example" width={400}/>Also consider explicitly linking to the docs for
StringBuilderVar
&InteractionContextStringVar
so readers can jump straight to the APIs.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
documentation/docs/docs/assets/interactions/context-text-variable.png
is excluded by!**/*.png
documentation/docs/docs/assets/interactions/string-builder-variable.png
is excluded by!**/*.png
📒 Files selected for processing (3)
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx
(2 hunks)documentation/docs/docs/03-creating-stories/07-advanced-interactions/assets/commands/sequence.json
(1 hunks)documentation/plugins/code-snippets/snippets.json
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx
[uncategorized] ~17-~17: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... :::warning[Custom Commands] This guide show you how to create a custom command with...
(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)
[uncategorized] ~17-~17: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...you how to create a custom command with argument, if you don't need arguments, you can u...
(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Test Documentation Build
🔇 Additional comments (1)
documentation/docs/docs/03-creating-stories/07-advanced-interactions/assets/commands/sequence.json (1)
11-11
: 👍 Descriptive placeholders improve readabilitySwitching from
<1>/<2>
to<pseudo>/<age>
makes the message self-explanatory. No further action required.
Will look at this when i am home (: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (3)
17-20
: Fix wording and grammar in the warning blockMinor language issues reduce professionalism and may confuse non-native speakers:
show
→shows
with argument
→with an argument
- Split the comma splice into two sentences for clarity.
-:::warning[Custom Commands] -This guide show you how to create a custom command with argument, if you don't need arguments, you can use the [RunCommandEvent](../../../adapters/BasicAdapter/entries/event/on_run_command.mdx) to create a command without arguments. -::: +:::warning[Custom Commands] +This guide shows you how to create a custom command with an argument. +If you don't need arguments, use the [RunCommandEvent](../../../adapters/BasicAdapter/entries/event/on_run_command.mdx) to create a command without them. +:::
40-42
: Update image alt text to match the new variable namesYou replaced
Interaction Context Text Variable
withString Builder Variable
/Interaction Context String Variable
, but thealt
attribute still refers to the old term, causing cognitive dissonance and harming accessibility.-<Image img={require("../../assets/interactions/string-builder-variable.png")} alt="Interaction Context Text Variable" width={400}/> +<Image img={require("../../assets/interactions/string-builder-variable.png")} alt="String Builder Variable and Interaction Context String Variable" width={400}/>
58-58
: Optional: Provide a poster frame or fallback text for the.webm
videoSome browsers/users block auto-playing WebM. Supplying a
poster
or descriptive fallback improves UX.Example:
<Player url={require("../../assets/custom-commands/result.webm").default} poster={require("../../assets/custom-commands/result-poster.jpg").default} />
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx
(3 hunks)
🧰 Additional context used
🪛 LanguageTool
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx
[uncategorized] ~18-~18: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... :::warning[Custom Commands] This guide show you how to create a custom command with...
(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)
[uncategorized] ~18-~18: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...you how to create a custom command with argument, if you don't need arguments, you can u...
(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Test Documentation Build
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review of updated Custom Commands Page
Thanks xaya for updating this page so that it is filled with the latest things available in the beta!
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (2)
17-19
: Minor grammar fixesThe sentence should read:
“This guide shows you how to create a custom command with arguments …”-This guide show you how to create a custom command with argument, +This guide shows you how to create a custom command with arguments,
38-46
: Polish punctuation & list claritySeveral commas are missing after introductory phrases, and step 5 lacks a period. Consider:
-If you want your command to actually do something when you run it you can do the following steps: +If you want your command to actually do something when you run it, you can follow these steps: -5. Do the same for the number argument -6. Lastly construct a message. For this guide we used `Hi <pseudo>, you are <age> years old.` +5. Do the same for the number argument. +6. Lastly, construct a message. For this guide we used `Hi <pseudo>, you are <age> years old.`
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx
(3 hunks)
🧰 Additional context used
🪛 LanguageTool
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx
[uncategorized] ~18-~18: This verb does not appear to agree with the subject. Consider using a different form.
Context: ... :::warning[Custom Commands] This guide show you how to create a custom command with...
(AI_EN_LECTOR_REPLACEMENT_VERB_AGREEMENT)
[uncategorized] ~18-~18: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...you how to create a custom command with argument, if you don't need arguments, you can u...
(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)
[typographical] ~39-~39: Consider adding a comma here.
Context: ...d to actually do something when you run it you can do the following steps: 1. In t...
(IF_COMMA)
[typographical] ~40-~40: Use a comma after an introductory phrase.
Context: ...n the Number Argument
, add a trigger. For this guide we will use a Send Message
entry. 2. ...
(COMMA_INTRODUCTORY_WORDS_PHRASES)
[uncategorized] ~41-~41: A comma might be missing here.
Context: ...geentry. 2. Inside the
Send Message` entry click on the <ActionButton button="dyna...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~43-~43: A comma might be missing here.
Context: ...l it pseudo
. 4. For the value of this part use a `Interaction Context String Varia...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~45-~45: A comma might be missing here.
Context: ... Do the same for the number argument 6. Lastly construct a message. For this guide we ...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[typographical] ~45-~45: Use a comma after an introductory phrase.
Context: ...argument 6. Lastly construct a message. For this guide we used `Hi , you are yea...
(COMMA_INTRODUCTORY_WORDS_PHRASES)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Test Documentation Build
🔇 Additional comments (2)
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (2)
64-64
: Asset path confirmed
The demo video exists atdocumentation/docs/docs/assets/custom-commands/result.webm
, which is exactly where../../assets/custom-commands/result.webm
resolves from03-creating-stories/07-advanced-interactions/02-custom-commands.mdx
. No further action required.
10-10
: Verify theActionButtons
component path
I couldn’t find any matchingActionButton
orActionButtons
files in the repo—please double-check that the component exists under@site/src/components
and update the import accordingly.• File to check:
documentation/docs/docs/03-creating-stories/07-advanced-interactions/02-custom-commands.mdx (line 10)
• Possible resolutions:
- If the file is named
ActionButton.tsx
, change the import to:import ActionButton from "@site/src/components/ActionButton"- If it’s
ActionButtons.tsx
(plural) or lives in its own folder (ActionButtons/index.tsx
), ensure the path matches that exact filename/location.
• Run locally to confirm, for example:ls documentation/src/components | grep -E '^ActionButtons?(\.tsx|/)$'
Hey! I've finally updated the custom commands page to make it compatible with Typewriter beta 160.
Summary by CodeRabbit