Repository navigation
docs: Document formatting updates and corrections for 3.0 - #22200
Conversation
Improve the formatting of the API parameters table to allow specifying minimum and maximum values, as well as minimum and maximum lengths for string values. These get displayed in the "Type" column below the data type name. Alter the appearance of required and deprecated parameters to make required parameters stand out more, and more clearly indicate deprecated parameters. I've reformatted some of the existing parameter entries to take advantage of the new features, and added or corrected descriptions to several parameters.
WalkthroughThis pull request updates the API documentation and the associated UI components. It refines parameter descriptions by adding new constraints such as Sequence Diagram(s)sequenceDiagram
participant Client
participant API_Server
Client->>API_Server: POST /sendChatMessage\n(meetingID, message, userName, checksum)
API_Server-->>Client: XML Response
sequenceDiagram
participant Client
participant API_Server
Client->>API_Server: GET /getJoinUrl\n(parameters)
API_Server-->>Client: XML Response with new join URL
Suggested labels
Suggested reviewers
Tip 🌐 Web search-backed reviews and chat
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.
Actionable comments posted: 2
🧹 Nitpick comments (2)
docs/docs/data/sendChatMessage.tsx (1)
1-38: LGTM! The parameter constraints and descriptions are well-defined.The parameter definitions are clear, concise, and include appropriate constraints. The descriptions effectively communicate the purpose and limitations of each parameter.
Consider adding a
minLengthconstraint for theuserNameparameter to prevent empty usernames.Apply this diff to add the constraint:
{ "name": "userName", "required": false, "type": "String", + "minLength": 1, "maxLength": 255, "default": "System", "description": ( <p>The name that will be shown as the sender of the chat message.</p> ) }docs/src/components/APITableComponent/styles.module.css (1)
36-38: Review the Use oftext-wrap-mode
The new rule for.apiConstraints spanusestext-wrap-mode: nowrap;to prevent wrapping. Note that this property is not standard; consider using a standard property likewhite-space: nowrap;for better cross-browser support. For example:- text-wrap-mode: nowrap; + white-space: nowrap;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
docs/docs/data/create.tsx(3 hunks)docs/docs/data/end.tsx(1 hunks)docs/docs/data/getRecordings.tsx(1 hunks)docs/docs/data/join.tsx(2 hunks)docs/docs/data/publishRecordings.tsx(1 hunks)docs/docs/data/sendChatMessage.tsx(1 hunks)docs/docs/development/api.md(1 hunks)docs/src/components/APITableComponent/index.tsx(2 hunks)docs/src/components/APITableComponent/styles.module.css(1 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
docs/src/components/APITableComponent/index.tsx
[error] 79-79: Missing key property for this element in iterable.
The order of the items may change, and having a key can help React identify which item was moved.
Check the React documentation.
(lint/correctness/useJsxKeyInIterable)
[error] 6-6: Don't use 'Boolean' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'boolean' instead
(lint/complexity/noBannedTypes)
[error] 7-7: Don't use 'String' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'string' instead
(lint/complexity/noBannedTypes)
[error] 8-8: Don't use 'Boolean' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'boolean' instead
(lint/complexity/noBannedTypes)
[error] 10-10: Don't use 'String' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'string' instead
(lint/complexity/noBannedTypes)
[error] 11-11: Don't use 'String' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'string' instead
(lint/complexity/noBannedTypes)
[error] 12-12: Don't use 'Number' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'number' instead
(lint/complexity/noBannedTypes)
[error] 13-13: Don't use 'Number' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'number' instead
(lint/complexity/noBannedTypes)
[error] 14-14: Don't use 'Number' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'number' instead
(lint/complexity/noBannedTypes)
[error] 15-15: Don't use 'Number' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'number' instead
(lint/complexity/noBannedTypes)
🔇 Additional comments (17)
docs/src/components/APITableComponent/index.tsx (5)
17-29: No immediate concerns.
This segment constructing the first table cell for each row looks functionally correct and well-structured.
31-59: Parameter constraints logic appears sound.
The conditional checks and the arrangement of constraints forminLength,maxLength,minimum, andmaximumare correct. Nicely handled.
61-67: Displaying the parameter type and constraints is clear.
The approach to render the type and optionally show constraints works well.
69-77: Description and default value display logic is clean.
No issues found. Good job maintaining clarity of the parameter description.
89-90: Table styling looks fine.
ApplyingclassName={styles.apiParams}is consistent with the styling pattern used throughout the component.docs/docs/data/publishRecordings.tsx (1)
13-14: Updated type and description look correct.
Switching from"String"to"Boolean"aligns with the revised API behavior. The clarified description accurately states the purpose of the publish parameter.docs/docs/data/end.tsx (1)
13-18: Deprecation handling is correctly introduced.
Marking thepasswordparameter as deprecated and updating the description clarifies its non-essential nature in newer versions of BigBlueButton.docs/docs/data/getRecordings.tsx (1)
29-42: LGTM! Good use of numeric constraints.The changes improve clarity by moving numeric constraints from descriptions to dedicated properties:
offset: minimum=0limit: minimum=1, maximum=100docs/docs/data/join.tsx (1)
17-27: LGTM! Good improvements to parameter documentation.The changes enhance clarity through:
- Clear deprecation notice for the
passwordparameter with guidance to useroleinstead- Better formatted descriptions using paragraphs
- Added version information for
webcamBackgroundURLAlso applies to: 71-81
docs/docs/data/create.tsx (1)
8-13: LGTM! Good improvements to parameter documentation.The changes enhance clarity through:
- Appropriate type changes (String → Boolean/JSON)
- Clear deprecation notices
- Better formatted descriptions using paragraphs
- Added version information
Also applies to: 24-40, 489-510
docs/src/components/APITableComponent/styles.module.css (5)
9-11: Clarify the Last-Child Reset Rule
The new rule for.apiParams td > :last-childensures that the bottom margin is reset for the last child element in table cells. Verify that this selector targets the intended elements consistently across different browser renderings.
13-18: New.apiRequiredClass Addition
The added.apiRequiredclass sets the font weight to bold, uses a slightly reduced font size, applies an italic style, and resets margin-bottom. This aligns well with the objective to make required parameters more prominent.
19-23: Updated.apiDeprecatedStyling
The changes for.apiDeprecatedremove the previous text-decoration (line-through) and standardize it with an 0.85rem font size and italic style. Ensure that this visual update maintains a clear distinction from the required parameters.
25-28: New.apiConstraintsClass Introduction
The new.apiConstraintsclass properly applies an italic style and resets the bottom margin. This change should help highlight constraint details (like min/max values) under parameter types as intended.
30-34: Updated.apiDefaultMargin Using Variable
Changing themargin-topproperty to use a CSS variable (var(--ifm-leading)) increases flexibility and consistency with theming. This looks good.docs/docs/development/api.md (2)
1226-1227: Annotate the "sendChatMessage" Endpoint Update
The addition of<i>Added:</i> 3.0at the start of the sendChatMessage endpoint section clearly indicates its introduction in version 3.0. This improves clarity for users reviewing version changes. Consider verifying that similar version annotations are applied consistently across all new endpoints.
1252-1270: "getJoinUrl" Endpoint Documentation Review
The newly added "getJoinUrl" endpoint is documented in detail—it describes its purpose (session transfers and device switching), parameters, and usage examples. The documentation is comprehensive and aligns with the PR objectives for enhancing endpoint clarity in the API docs.
| const rows = data.map((entry: { | ||
| deprecated: Boolean; | ||
| name: String; | ||
| required: Boolean; | ||
| description: JSX.Element; | ||
| type: String; | ||
| default: String; | ||
| minLength: Number; | ||
| maxLength: Number; | ||
| minimum: Number; | ||
| maximum: Number; |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Use lowercase primitive type annotations for consistency.
The code uses uppercase wrapper objects (e.g., Boolean, String, Number), whereas it's a best practice in TypeScript to use lowercase primitives (boolean, string, number).
Below is a suggested diff to correct these types:
- const rows = data.map((entry: {
- deprecated: Boolean;
- name: String;
- required: Boolean;
- description: JSX.Element;
- type: String;
- default: String;
- minLength: Number;
- maxLength: Number;
- minimum: Number;
- maximum: Number;
+ const rows = data.map((entry: {
+ deprecated: boolean;
+ name: string;
+ required: boolean;
+ description: JSX.Element;
+ type: string;
+ default: string;
+ minLength: number;
+ maxLength: number;
+ minimum: number;
+ maximum: number;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const rows = data.map((entry: { | |
| deprecated: Boolean; | |
| name: String; | |
| required: Boolean; | |
| description: JSX.Element; | |
| type: String; | |
| default: String; | |
| minLength: Number; | |
| maxLength: Number; | |
| minimum: Number; | |
| maximum: Number; | |
| const rows = data.map((entry: { | |
| deprecated: boolean; | |
| name: string; | |
| required: boolean; | |
| description: JSX.Element; | |
| type: string; | |
| default: string; | |
| minLength: number; | |
| maxLength: number; | |
| minimum: number; | |
| maximum: number; |
🧰 Tools
🪛 Biome (1.9.4)
[error] 6-6: Don't use 'Boolean' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'boolean' instead
(lint/complexity/noBannedTypes)
[error] 7-7: Don't use 'String' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'string' instead
(lint/complexity/noBannedTypes)
[error] 8-8: Don't use 'Boolean' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'boolean' instead
(lint/complexity/noBannedTypes)
[error] 10-10: Don't use 'String' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'string' instead
(lint/complexity/noBannedTypes)
[error] 11-11: Don't use 'String' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'string' instead
(lint/complexity/noBannedTypes)
[error] 12-12: Don't use 'Number' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'number' instead
(lint/complexity/noBannedTypes)
[error] 13-13: Don't use 'Number' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'number' instead
(lint/complexity/noBannedTypes)
[error] 14-14: Don't use 'Number' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'number' instead
(lint/complexity/noBannedTypes)
[error] 15-15: Don't use 'Number' as a type.
Use lowercase primitives for consistency.
Safe fix: Use 'number' instead
(lint/complexity/noBannedTypes)
|
@antobinary when I look at https://docs.bigbluebutton.org/3.0/development/api/#get-sendchatmessage I can see that the document text changes have been applied, but it's still using the old table rendering code, so the new features like min/max length aren't showing up correctly. I guess this is a side-effect of how the combined docs page is generated? Is there a way to resolve it? |
|
I believe this will get truly applied when the code changes you made land on branch |



Improve the formatting of the API parameters table to allow specifying minimum and maximum values, as well as minimum and maximum lengths for string values. These get displayed in the "Type" column below the data type name.
Alter the appearance of required and deprecated parameters to make required parameters stand out more, and more clearly indicate deprecated parameters.
I've reformatted some of the existing parameter entries to take advantage of the new features, and added or corrected descriptions to several parameters.
Here's how the
sendChatMessagetable looks following this change: