-
Notifications
You must be signed in to change notification settings - Fork 286
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
update some formatting, add 'default widgets' and remote shell widgets section for custom widgets doc #1837
Conversation
…s section for custom widgets doc
WalkthroughThe pull request introduces structural changes to the Key changes involve restructuring the hierarchy of sections such as "Terminal and CLI Widgets," introducing a new "Example Remote Shell Widgets" section, and adding an "Overriding Default Widgets" section. The document now provides more detailed explanations about different types of widgets, including local and remote shell widgets, with a clearer navigation structure. The updates aim to enhance the readability and comprehensiveness of the documentation, making it easier for users to understand the various widget configurations and customization options available in the system. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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: 0
🧹 Nitpick comments (2)
docs/docs/customwidgets.mdx (2)
175-195
: Consider enhancing the remote shell widgets documentation.While the new section is valuable, consider these improvements:
- Add specific examples of connection names (e.g., "ssh://user@host" or "wsl://Ubuntu").
- Include a reference to where users can find their connection names in the UI or
connections.json
.If you want to open a terminal widget for a particular connection (SSH or WSL), you can use the `connection` meta key. The connection key's value should match connections.json (or what's in your connections dropdown menu). Note that you should only use the canonical name (do not use any custom "display:name" that you've set). ```json { <... other widgets go here ...>, "remote-term": { "icon": "rectangle-terminal", "label": "remote", "blockdef": { "meta": { "view": "term", "controller": "shell", - "connection": "<connection>" + "connection": "ssh://user@example.com" // Example: Use your SSH connection name } } }, <... other widgets go here ...> }
+For example:
+- SSH connection:"connection": "ssh://user@example.com"
+- WSL connection:"connection": "wsl://Ubuntu-20.04"
+
+You can find your available connection names in the Wave Terminal's connection dropdown menu or in<WAVETERM_HOME>/config/connections.json
.--- `407-419`: **Consider enhancing the default widgets documentation.** While the new section is valuable, consider these improvements: 1. Add an example of removing or modifying a default widget. 2. Make the GitHub link more specific by pointing to the exact line numbers. ```diff To remove any of them, just set that key to `null` in your widgets.json file. +For example, to remove the AI widget: +```json +{ + "defwidget@ai": null +} +``` + +Or to modify the terminal widget's icon: +```json +{ + "defwidget@terminal": { + "icon": "code", + "label": "term" + } +} +``` + To see their definitions, to copy/paste them, or to understand how they work, you can view all of their definitions on [GitHub - default widgets.json](https://github.com/wavetermdev/waveterm/blob/main/pkg/wconfig/defaultconfig/widgets.json)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/docs/customwidgets.mdx
(9 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Build Docsite
- GitHub Check: Analyze (go)
- GitHub Check: merge-gatekeeper
- GitHub Check: Build for TestDriver.ai
🔇 Additional comments (3)
docs/docs/customwidgets.mdx (3)
Line range hint
69-83
: LGTM! Improved document structure.The heading level adjustment enhances the document hierarchy and makes it more consistent.
🧰 Tools
🪛 LanguageTool
[style] ~67-~67: Consider removing “of” to be more concise
Context: ...ed in blue in the image). This contains all of the details about how the widget actually w...(ALL_OF_THE)
Line range hint
252-281
: LGTM! Improved document structure.The heading level adjustment enhances the document hierarchy and makes it more consistent.
Line range hint
329-406
: LGTM! Improved document structure.The heading level adjustment enhances the document hierarchy and makes it more consistent.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~356-~356: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...o"`.| | "graph:numpoints" | The maximum amount of points that can be shown on the grap...(AMOUNTOF_TO_NUMBEROF)
[misspelling] ~357-~357: This word is normally spelled with a hyphen.
Context: ...m", and
All CPU`. Note that these are case sensitive. If no value is provided, the plot will...(EN_COMPOUNDS_CASE_SENSITIVE)
[uncategorized] ~361-~361: Use a comma before ‘and’ if it connects two independent clauses (unless they are closely connected and short).
Context: ...ave a build process that lasts 3 minutes and you'd like to be able to see the entire...(COMMA_COMPOUND_SENTENCE)
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 (4)
docs/docs/customwidgets.mdx (4)
175-195
: Add more context about connection names and validation.The section provides good information but could be enhanced with:
- A note about how to verify the correct connection name format
- An example of both SSH and WSL connection strings
Apply this diff to enhance the explanation:
If you want to open a terminal widget for a particular connection (SSH or WSL), you can use the `connection` meta key. The connection key's value should match connections.json (or what's in your connections dropdown menu). Note that you should only use the canonical name (do not use any custom "display:name" that you've set). For WSL that might look like `wsl://Ubuntu`, and for SSH connections that might look like `user@remotehostname`. +You can verify your connection names by: +1. Checking the connections dropdown menu in Wave +2. Looking at your `connections.json` file + +Example connection strings: +- WSL: `wsl://Ubuntu-20.04` +- SSH: `admin@prod-server.example.com`🧰 Tools
🪛 LanguageTool
[typographical] ~177-~177: It is considered good style to insert a comma after introductory phrases with dates or proper nouns.
Context: ...om "display:name" that you've set). For WSL that might look likewsl://Ubuntu
, an...(IN_NNP_COMMA)
407-419
: Add a practical example of overriding a default widget.The section clearly explains how to override default widgets but would benefit from a concrete example.
Add this example after the GitHub link:
To see their definitions, to copy/paste them, or to understand how they work, you can view all of their definitions on [GitHub - default widgets.json](https://github.com/wavetermdev/waveterm/blob/main/pkg/wconfig/defaultconfig/widgets.json) +For example, to remove the AI widget and modify the terminal widget's icon: + +```json +{ + "defwidget@ai": null, + "defwidget@terminal": { + "icon": "code", + "label": "term", + "blockdef": { + "meta": { + "view": "term", + "controller": "shell" + } + } + } +} +```
177-177
: Add a comma after the introductory phrase.For better readability, add a comma after "For WSL".
Apply this diff:
-For WSL that might look like `wsl://Ubuntu`, and for SSH connections that might look like `user@remotehostname`. +For WSL, that might look like `wsl://Ubuntu`, and for SSH connections that might look like `user@remotehostname`.🧰 Tools
🪛 LanguageTool
[typographical] ~177-~177: It is considered good style to insert a comma after introductory phrases with dates or proper nouns.
Context: ...om "display:name" that you've set). For WSL that might look likewsl://Ubuntu
, an...(IN_NNP_COMMA)
187-190
: Consider adding explanatory comments in the JSON example.The JSON example would be more helpful with comments explaining each field's purpose.
Apply this diff:
"meta": { "view": "term", "controller": "shell", - "connection": "<connection>" + "connection": "<connection>" // e.g., "wsl://Ubuntu" or "user@remotehostname" }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/docs/customwidgets.mdx
(9 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/docs/customwidgets.mdx
[typographical] ~177-~177: It is considered good style to insert a comma after introductory phrases with dates or proper nouns.
Context: ...om "display:name" that you've set). For WSL that might look like wsl://Ubuntu
, an...
(IN_NNP_COMMA)
⏰ Context from checks skipped due to timeout of 90000ms (5)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Build Docsite
- GitHub Check: merge-gatekeeper
- GitHub Check: Analyze (go)
- GitHub Check: Build for TestDriver.ai
🔇 Additional comments (1)
docs/docs/customwidgets.mdx (1)
69-69
: LGTM! The heading level adjustments improve document hierarchy.The restructuring creates a more logical flow and better organization of content.
Also applies to: 113-113, 175-175, 252-252, 329-329, 359-359
No description provided.