Skip to content

docs: update reference to functions moved to dedicated namespaces#746

Merged
tbouffard merged 1 commit intomainfrom
docs/update_code_example
Apr 3, 2025
Merged

docs: update reference to functions moved to dedicated namespaces#746
tbouffard merged 1 commit intomainfrom
docs/update_code_example

Conversation

@tbouffard
Copy link
Member

@tbouffard tbouffard commented Apr 3, 2025

Summary by CodeRabbit

  • Documentation
    • Revised the editor tutorial to reflect updated instructions for handling configuration files.
    • Enhanced the migration guide with clear steps for transitioning to the new utility methods.

@tbouffard tbouffard added the documentation Improvements or additions to documentation label Apr 3, 2025
@coderabbitai
Copy link

coderabbitai bot commented Apr 3, 2025

Walkthrough

The changes update how configuration files are loaded in the editor tutorial by replacing the direct import and call to the load function with the use of the requestUtils module’s load method. Additionally, the migration documentation now instructs developers to shift from using default namespace methods (like get() and load()) to the new requestUtils namespace, which includes methods such as get(), getAll(), load(), post(), and submit().

Changes

Files Change Summary
packages/.../docs/tutorials/editor.md Updated import: replaced { load } with { requestUtils }. Modified config load call from load('editors/config/keyhandler-commons.xml') to requestUtils.load('editors/config/keyhandler-commons.xml').
packages/.../docs/usage/migrate-from-mxgraph.md Added migration instructions for using requestUtils methods (get(), getAll(), load(), post(), submit()). Removed references to default namespace methods (get(), load()).

Sequence Diagram(s)

sequenceDiagram
    participant Editor
    participant requestUtils
    Editor->>requestUtils: load('editors/config/keyhandler-commons.xml')
    requestUtils-->>Editor: returns configuration data
Loading

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.

❤️ 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.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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
Copy link

sonarqubecloud bot commented Apr 3, 2025

Copy link

@coderabbitai coderabbitai bot left a 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 (1)
packages/website/docs/usage/migrate-from-mxgraph.md (1)

175-181: Clear Documentation of the New requestUtils Namespace Methods
The added section for requestUtils clearly lists the updated utility methods (get(), getAll(), load(), post(), and submit()) along with their migration instructions from mxUtils. This makes it easier for developers to locate and update their code.

Minor Note: Consider reviewing the punctuation and formatting of the bullet entries for consistency, although the current style is acceptable.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~176-~176: Loose punctuation mark.
Context: ....show(). #### requestUtils-get(): Update your code to use requestUtils.g...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~177-~177: Loose punctuation mark.
Context: ...instead of mxUtils.get(). - getAll(): Update your code to use `requestUtils.g...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~178-~178: Loose punctuation mark.
Context: ...nstead of mxUtils.getAll(). - load(): Update your code to use `requestUtils.l...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~179-~179: Loose punctuation mark.
Context: ... instead of mxUtils.load(). - post(): Update your code to use `requestUtils.p...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~180-~180: Loose punctuation mark.
Context: ...nstead of mxUtils.post(). - submit(): Update your code to use `requestUtils.s...

(UNLIKELY_OPENING_PUNCTUATION)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cab2555 and 6799f3c.

📒 Files selected for processing (2)
  • packages/website/docs/tutorials/editor.md (1 hunks)
  • packages/website/docs/usage/migrate-from-mxgraph.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
packages/website/docs/usage/migrate-from-mxgraph.md

[uncategorized] ~176-~176: Loose punctuation mark.
Context: ....show(). #### requestUtils-get(): Update your code to use requestUtils.g...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~177-~177: Loose punctuation mark.
Context: ...instead of mxUtils.get(). - getAll(): Update your code to use `requestUtils.g...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~178-~178: Loose punctuation mark.
Context: ...nstead of mxUtils.getAll(). - load(): Update your code to use `requestUtils.l...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~179-~179: Loose punctuation mark.
Context: ... instead of mxUtils.load(). - post(): Update your code to use `requestUtils.p...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~180-~180: Loose punctuation mark.
Context: ...nstead of mxUtils.post(). - submit(): Update your code to use `requestUtils.s...

(UNLIKELY_OPENING_PUNCTUATION)

🔇 Additional comments (1)
packages/website/docs/tutorials/editor.md (1)

37-38: Updated Import and Method Call Using the New Namespace
The code snippet now correctly imports requestUtils from @maxgraph/core and uses requestUtils.load(...) to load the configuration file. This update is consistent with the migration guidelines and improves clarity by grouping utility methods under a dedicated namespace.

@tbouffard tbouffard changed the title docs: update reference to utils functions move to dedicated namespaces docs: update reference to utils functions moved to dedicated namespaces Apr 3, 2025
@tbouffard tbouffard changed the title docs: update reference to utils functions moved to dedicated namespaces docs: update reference to functions moved to dedicated namespaces Apr 3, 2025
@tbouffard tbouffard merged commit 3c87c30 into main Apr 3, 2025
4 checks passed
@tbouffard tbouffard deleted the docs/update_code_example branch April 3, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant