Skip to content

docs: Document formatting updates and corrections for 3.0 - #22200

Merged
antobinary merged 1 commit into
bigbluebutton:v3.0.x-releasefrom
kepstin:bbb-3-0-docs
Feb 5, 2025
Merged

antobinary merged 1 commit into
bigbluebutton:v3.0.x-releasefrom
kepstin:bbb-3-0-docs

Conversation

@kepstin

@kepstin kepstin commented Feb 5, 2025 •

Copy link
Copy Markdown
Contributor

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 sendChatMessage table looks following this change:

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.
@kepstin
kepstin requested a review from antobinary February 5, 2025 20:18
@coderabbitai

coderabbitai Bot commented Feb 5, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request updates the API documentation and the associated UI components. It refines parameter descriptions by adding new constraints such as minLength, maxLength, minimum, and maximum, and also marks several fields as deprecated. Changes include updating data types (e.g., from String to Boolean or JSON), reformatting descriptive texts into structured paragraphs, and introducing explicit deprecation flags. Additionally, new endpoints (sendChatMessage and getJoinUrl) have been documented with example request and response formats. The updates extend to the rendering logic in the API table component and the accompanying CSS, ensuring that new properties and constraints are displayed correctly within the documentation interface.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API_Server
    Client->>API_Server: POST /sendChatMessage\n(meetingID, message, userName, checksum)
    API_Server-->>Client: XML Response
Loading
sequenceDiagram
    participant Client
    participant API_Server
    Client->>API_Server: GET /getJoinUrl\n(parameters)
    API_Server-->>Client: XML Response with new join URL
Loading

Suggested labels

cla: signed

Suggested reviewers

  • gustavotrott

Tip

🌐 Web search-backed reviews and chat
  • We have enabled web search-based reviews and chat for all users. This feature allows CodeRabbit to access the latest documentation and information on the web.
  • You can disable this feature by setting web_search: false in the knowledge_base settings.
  • Please share any feedback in the Discord discussion.

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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sonarqubecloud

sonarqubecloud Bot commented Feb 5, 2025

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 minLength constraint for the userName parameter 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 of text-wrap-mode
The new rule for .apiConstraints span uses text-wrap-mode: nowrap; to prevent wrapping. Note that this property is not standard; consider using a standard property like white-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

📥 Commits

Reviewing files that changed from the base of the PR and between 236927a and 1c0457e.

📒 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 for minLength, maxLength, minimum, and maximum are 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.
Applying className={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 the password parameter 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=0
  • limit: minimum=1, maximum=100
docs/docs/data/join.tsx (1)

17-27: LGTM! Good improvements to parameter documentation.

The changes enhance clarity through:

  • Clear deprecation notice for the password parameter with guidance to use role instead
  • Better formatted descriptions using paragraphs
  • Added version information for webcamBackgroundURL

Also 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-child ensures 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 .apiRequired Class Addition
The added .apiRequired class 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 .apiDeprecated Styling
The changes for .apiDeprecated remove 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 .apiConstraints Class Introduction
The new .apiConstraints class 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 .apiDefault Margin Using Variable
Changing the margin-top property 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.0 at 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.

Comment on lines +5 to +15
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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ 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.

Suggested change
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 antobinary left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

@antobinary antobinary changed the title Document formatting updates and corrections for 3.0 docs: Document formatting updates and corrections for 3.0 Feb 5, 2025
@antobinary
antobinary merged commit 836df4d into bigbluebutton:v3.0.x-release Feb 5, 2025
@antobinary antobinary added this to the Release 3.0 milestone Feb 5, 2025
@kepstin

kepstin commented Feb 5, 2025

Copy link
Copy Markdown
Contributor Author

@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?

@antobinary

Copy link
Copy Markdown
Member

I believe this will get truly applied when the code changes you made land on branch develop which is where the documentation gets triggered (and starts to build all branches of docs). ETA a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants