docs: migrate the mxGraph tutorial by tbouffard · Pull Request #618 · maxGraph/maxGraph
Adapt the mxGraph tutorial, which mainly includes information about the Editor class.
Notes
Closes #613
Summary by CodeRabbit
-
Documentation
- Updated README.md with clearer migration status description.
- Removed "work in progress" warning from intro documentation.
- Added new tutorial documents for maxGraph:
- Editor Input/Output
- maxGraph Editor
- Graph
- The Hello World Example
- Adjusted sidebar positioning for various documentation sections.
- Introduced a new "Tutorials" category in documentation.
- Updated migration documentation with significant changes to features and usage patterns.
-
Chores
- Disabled documentation announcement bar.
- Removed old mxGraph tutorial HTML file.
Walkthrough
This pull request focuses on migrating and updating the documentation for the maxGraph library. The changes involve removing work-in-progress warnings, adding new tutorial documents, and reorganizing the documentation structure. The tutorials cover key aspects of the library such as the Graph class, Editor, and a Hello World example, progressively replacing the original mxGraph documentation. The changes aim to provide more comprehensive and clear guidance for users transitioning to maxGraph.
Changes
| File | Change Summary |
|---|---|
README.md |
Updated documentation migration warning and streamlined migration status sections |
packages/website/docs/development/_category_.json |
Modified category position from 13 to 21 |
packages/website/docs/intro.md |
Removed work-in-progress warning block |
packages/website/docs/known-issues.md |
Changed sidebar_position from 20 to 100 |
packages/website/docs/tutorials/_category_.json |
Added new Tutorials category with position 12 |
packages/website/docs/tutorials/editor-input-output.md |
New tutorial on Editor input/output functionality |
packages/website/docs/tutorials/editor.md |
New tutorial on maxGraph Editor usage and configuration |
packages/website/docs/tutorials/graph.md |
New tutorial on Graph class and its features |
packages/website/docs/tutorials/the-hello-world-example.md |
New Hello World tutorial |
packages/website/docs/usage/_category_.json |
Updated category position from 12 to 13 |
packages/website/docusaurus.config.ts |
Commented out announcement bar configuration |
packages/website/old-mxgraph/tutorial.html |
Deleted original mxGraph tutorial file |
Assessment against linked issues
| Objective | Addressed | Explanation |
|---|---|---|
| Migrate first draft of content [#618] | ✅ | |
| Review and adapt content to maxGraph API | ✅ | |
| Avoid duplicating content between Manual and Tutorial | ❓ | Requires further review of Manual content. |
Possibly related issues
- Issue [DOC] Migrate the mxGraph Javascript Manual #612: The migration of the mxGraph JavaScript Manual may benefit from the updated tutorials and documentation structure introduced in this PR.
- Issue Migrate the mxGraph documentation #345: This PR contributes to the broader effort of migrating mxGraph documentation to maxGraph by providing new tutorials and reorganizing existing content.
Possibly related PRs
- docs: add a Codecs page #524: Migration documentation updates in
migrate-from-mxgraph.md, providing additional context for library transition.
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?
🪧 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
@coderabbitaiin 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
@coderabbitaiin 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 pauseto pause the reviews on a PR.@coderabbitai resumeto resume the paused reviews.@coderabbitai reviewto trigger an incremental review. This is useful when automatic reviews are disabled for the repository.@coderabbitai full reviewto do a full review from scratch and review all the files again.@coderabbitai summaryto regenerate the summary of the PR.@coderabbitai generate docstringsto generate docstrings for this PR. (Beta)@coderabbitai resolveresolve all the CodeRabbit review comments.@coderabbitai configurationto show the current CodeRabbit configuration for the repository.@coderabbitai helpto get help.
Other keywords and placeholders
- Add
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed. - Add
@coderabbitai summaryto generate the high-level summary at a specific location in the PR description. - Add
@coderabbitaianywhere in the PR title to generate the title automatically.
CodeRabbit Configuration File (.coderabbit.yaml)
- You can programmatically configure CodeRabbit by adding a
.coderabbit.yamlfile 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (10)
packages/website/docs/tutorials/editor-input-output.md (2)
67-70: Modernize JavaScript exampleThe JavaScript example could be improved with modern practices:
-const data = editor.writeGraphModel(); -editor.readGraphModel(xmlUtils.parseXml(data)); +try { + const data = editor.writeGraphModel(); + editor.readGraphModel(xmlUtils.parseXml(data)); +} catch (error) { + console.error('Failed to process graph model:', error); + // Handle error appropriately +}
33-33: Add missing comma for better readability-The editor issues a post request to the specified URL passing the XML along as a POST variable called xml. +The editor issues a post request to the specified URL, passing the XML along as a POST variable called xml.🧰 Tools
🪛 LanguageTool
[uncategorized] ~33-~33: Possible missing comma found.
Context: ... issues a post request to the specified URL passing the XML along as a POST variabl...(AI_HYDRA_LEO_MISSING_COMMA)
packages/website/docs/tutorials/the-hello-world-example.md (2)
34-34: Enhance CSS styling guidanceConsider providing a complete CSS example for container styling:
.graph-container { width: 100%; height: 600px; border: 1px solid #ccc; overflow: auto; /* Optional: Prevent text selection during graph interaction */ user-select: none; }
63-79: Add error handling to the graph manipulation exampleThe code example should demonstrate proper error handling:
// Gets the default parent for inserting new cells. // This is normally the first child of the root (ie. layer 0). const parent = graph.getDefaultParent(); // Adds cells to the model in a single step model.beginUpdate(); try { + if (!parent) { + throw new Error('Failed to get default parent'); + } const v1 = graph.insertVertex(parent, null, 'Hello,', 20, 20, 80, 30); const v2 = graph.insertVertex(parent, null, 'World!', 200, 150, 80, 30); graph.insertEdge(parent, null, '', v1, v2); +} catch (error) { + console.error('Failed to create graph:', error); + // Handle error appropriately } finally { // Updates the display model.endUpdate(); }packages/website/docs/tutorials/editor.md (2)
36-39: Update code example to use modern practicesThe code example uses the older
mxUtils. Consider updating to modern practices:-const config = mxUtils.load('editors/config/keyhandler-commons.xml').getDocumentElement(); -const editor = new Editor(config); +async function createEditor() { + try { + const response = await fetch('editors/config/keyhandler-commons.xml'); + const text = await response.text(); + const parser = new DOMParser(); + const config = parser.parseFromString(text, 'text/xml').documentElement; + return new Editor(config); + } catch (error) { + console.error('Failed to initialize editor:', error); + throw error; + } +}
70-84: Add explanation for XML template attributesThe XML template example would benefit from detailed comments explaining each attribute's purpose:
<add as="symbol"> <Symbol label="Symbol" customAttribute="whatever"> <Cell vertex="1" connectable="true"> + <!-- Geometry defines the size of the cell --> <Geometry as="geometry" width="32" height="32"/> + <!-- Style configuration for the cell --> <Object fillColor="green" image="images/event.png" as="style"> <Array as="baseStyleNames"> + <!-- Base style that this cell inherits from --> <add value="symbol" /> </Array> </Object> </Cell> + <!-- Custom child elements can be added for additional metadata --> <CustomChild customAttribute="whatever"/> </Symbol> </add>packages/website/docs/tutorials/graph.md (4)
29-29: Add alt text to the Graph class hierarchy diagramThe image is missing alt text which impacts accessibility.
- +
43-43: Add alt text to the model diagramThe image is missing alt text which impacts accessibility.
- +🧰 Tools
🪛 Markdownlint (0.37.0)
43-43: null
Images should have alternate text (alt text)(MD045, no-alt-text)
100-100: Update TODO comment to be more specificThe TODO comment about migrating to a new method signature should include more details about the expected changes.
-[//]: # (TODO migrate to the new insertVertex method using a single object parameter) +[//]: # (TODO migrate to use graph.insertVertex({ parent, value, position: [x, y], size: [width, height], style }) instead of the legacy parameter list)
26-27: Improve wording in introductionConsider a more concise wording to avoid wordiness.
-Instantiate [Graph](https://maxgraph.github.io/maxGraph/api-docs/classes/Graph.html) in order to create a graph. This is the central class in the API. +Create a graph by instantiating the [Graph](https://maxgraph.github.io/maxGraph/api-docs/classes/Graph.html) class, which is central to the API.🧰 Tools
🪛 LanguageTool
[style] ~26-~26: Consider a shorter alternative to avoid wordiness.
Context: ...o/maxGraph/api-docs/classes/Graph.html) in order to create a graph. This is the central cla...(IN_ORDER_TO_PREMIUM)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
packages/website/docs/tutorials/assets/graphs/editor.pngis excluded by!**/*.pngpackages/website/docs/tutorials/assets/graphs/graph.pngis excluded by!**/*.pngpackages/website/docs/tutorials/assets/graphs/model.pngis excluded by!**/*.pngpackages/website/docs/tutorials/assets/hello-world-example.pngis excluded by!**/*.png
📒 Files selected for processing (12)
README.md(1 hunks)packages/website/docs/development/_category_.json(1 hunks)packages/website/docs/intro.md(0 hunks)packages/website/docs/known-issues.md(1 hunks)packages/website/docs/tutorials/_category_.json(1 hunks)packages/website/docs/tutorials/editor-input-output.md(1 hunks)packages/website/docs/tutorials/editor.md(1 hunks)packages/website/docs/tutorials/graph.md(1 hunks)packages/website/docs/tutorials/the-hello-world-example.md(1 hunks)packages/website/docs/usage/_category_.json(1 hunks)packages/website/docusaurus.config.ts(1 hunks)packages/website/old-mxgraph/tutorial.html(0 hunks)
💤 Files with no reviewable changes (2)
- packages/website/docs/intro.md
- packages/website/old-mxgraph/tutorial.html
✅ Files skipped from review due to trivial changes (5)
- packages/website/docs/usage/category.json
- packages/website/docs/development/category.json
- packages/website/docs/known-issues.md
- packages/website/docusaurus.config.ts
- packages/website/docs/tutorials/category.json
🧰 Additional context used
🪛 LanguageTool
packages/website/docs/tutorials/graph.md
[style] ~26-~26: Consider a shorter alternative to avoid wordiness.
Context: ...o/maxGraph/api-docs/classes/Graph.html) in order to create a graph. This is the central cla...
(IN_ORDER_TO_PREMIUM)
packages/website/docs/tutorials/editor-input-output.md
[uncategorized] ~33-~33: Possible missing comma found.
Context: ... issues a post request to the specified URL passing the XML along as a POST variabl...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~39-~39: Possible missing comma found.
Context: ... an example, consider the following PHP file which is located in the same directory ...
(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~40-~40: Consider a shorter alternative to avoid wordiness.
Context: ...st be set to server.php on the editor in order to post the diagram to the server. The PHP...
(IN_ORDER_TO_PREMIUM)
packages/website/docs/tutorials/the-hello-world-example.md
[uncategorized] ~55-~55: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...The endUpdate should always go into a finally-block to make sure it is always executed if t...
(HYPHENATED_LY_ADVERB_ADJECTIVE)
packages/website/docs/tutorials/editor.md
[uncategorized] ~11-~11: Possible missing comma found.
Context: ...Graphtutorial was used to create this page which still containsmxGraph` class di...
(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~26-~26: Consider a shorter alternative to avoid wordiness.
Context: .../maxGraph/api-docs/classes/Editor.html) in order to create an editor. This is the central c...
(IN_ORDER_TO_PREMIUM)
🪛 Markdownlint (0.37.0)
packages/website/docs/tutorials/graph.md
68-68: null
Spaces inside link text
(MD039, no-space-in-links)
85-85: null
Spaces inside link text
(MD039, no-space-in-links)
43-43: null
Images should have alternate text (alt text)
(MD045, no-alt-text)
packages/website/docs/tutorials/editor.md
32-32: null
Images should have alternate text (alt text)
(MD045, no-alt-text)
🔇 Additional comments (1)
README.md (1)
132-132: LGTM! Documentation update is clear and conciseThe simplified warning message better reflects the current state of the documentation while maintaining transparency about ongoing improvements.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (3)
packages/website/docs/tutorials/editor.md (1)
71-84: Add XML example contextThe XML template example could benefit from a brief explanation of:
- The purpose of the
Symbolelement- The significance of the
customAttribute- The role of
baseStyleNamespackages/website/docs/tutorials/graph.md (2)
100-100: Address TODO comment about migrationThere's a TODO comment about migrating to the new
insertVertexmethod.Would you like me to help implement the migration to the new method signature or create an issue to track this task?
68-68: Fix markdown formattingRemove spaces inside link text for better markdown formatting:
-A style is a [CellStateStyle object ](https://maxgraph.github.io/maxGraph/api-docs/types/CellStateStyle.html) +A style is a [CellStateStyle object](https://maxgraph.github.io/maxGraph/api-docs/types/CellStateStyle.html)Also applies to: 85-85
🧰 Tools
🪛 Markdownlint (0.37.0)
68-68: null
Spaces inside link text(MD039, no-space-in-links)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
packages/website/docs/tutorials/editor-input-output.md(1 hunks)packages/website/docs/tutorials/editor.md(1 hunks)packages/website/docs/tutorials/graph.md(1 hunks)
🧰 Additional context used
📓 Learnings (1)
packages/website/docs/tutorials/graph.md (1)
Learnt from: tbouffard
PR: maxGraph/maxGraph#618
File: packages/website/docs/tutorials/graph.md:56-59
Timestamp: 2025-01-06T09:09:47.410Z
Learning: In the maxGraph library, the classes "Cell" and "GraphDataModel" are valid, while "GraphCell" and "GraphModel" do not exist.
🪛 LanguageTool
packages/website/docs/tutorials/graph.md
[uncategorized] ~11-~11: Possible missing comma found.
Context: ...Graphtutorial was used to create this page which still containsmxGraph` class di...
(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~26-~26: Consider a shorter alternative to avoid wordiness.
Context: ...o/maxGraph/api-docs/classes/Graph.html) in order to create a graph. This is the central cla...
(IN_ORDER_TO_PREMIUM)
[uncategorized] ~115-~115: A comma might be missing here.
Context: ...earance"> ## Appearance In certain cases you may want to override specific attri...
(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
packages/website/docs/tutorials/editor.md
[style] ~26-~26: Consider a shorter alternative to avoid wordiness.
Context: .../maxGraph/api-docs/classes/Editor.html) in order to create an editor. This is the central c...
(IN_ORDER_TO_PREMIUM)
packages/website/docs/tutorials/editor-input-output.md
[style] ~40-~40: Consider a shorter alternative to avoid wordiness.
Context: ...st be set to server.php on the editor in order to post the diagram to the server. The PHP...
(IN_ORDER_TO_PREMIUM)
🪛 Markdownlint (0.37.0)
packages/website/docs/tutorials/graph.md
68-68: null
Spaces inside link text
(MD039, no-space-in-links)
85-85: null
Spaces inside link text
(MD039, no-space-in-links)
43-43: null
Images should have alternate text (alt text)
(MD045, no-alt-text)
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 (8)
packages/website/docs/tutorials/editor.md (1)
72-84: Add comments to explain XML attributesConsider adding inline comments to explain the purpose of key attributes in the template XML.
<add as="symbol"> + <!-- 'as' attribute defines the template name --> <Symbol label="Symbol" customAttribute="whatever"> + <!-- Cell element defines the graphical properties --> <Cell vertex="1" connectable="true"> <Geometry as="geometry" width="32" height="32"/> + <!-- Object element defines the visual style --> <Object fillColor="green" image="images/event.png" as="style"> <Array as="baseStylenames"> <add value="symbol" /> </Array> </Object> </Cell> <CustomChild customAttribute="whatever"/> </Symbol> </add>packages/website/docs/tutorials/graph.md (3)
11-11: Fix grammar in warning messageAdd a comma after "this page" for better readability.
-The original `mxGraph` tutorial was used to create this page which still contains `mxGraph` class diagrams to migrate to the maxGraph API. +The original `mxGraph` tutorial was used to create this page, which still contains `mxGraph` class diagrams to migrate to the maxGraph API.🧰 Tools
🪛 LanguageTool
[uncategorized] ~11-~11: Possible missing comma found.
Context: ...Graphtutorial was used to create this page which still containsmxGraph` class di...(AI_HYDRA_LEO_MISSING_COMMA)
68-68: Fix markdown link formattingRemove extra spaces in link text for better markdown compliance.
-A style is a [CellStateStyle object ](https://maxgraph.github.io/maxGraph/api-docs/types/CellStateStyle.html), to be used with the cells. +A style is a [CellStateStyle object](https://maxgraph.github.io/maxGraph/api-docs/types/CellStateStyle.html), to be used with the cells. -The cell style is a [CellStateStyle object ](https://maxgraph.github.io/maxGraph/api-docs/types/CellStateStyle.html) which tells the graph to use the given named styles and override the specified keys. +The cell style is a [CellStateStyle object](https://maxgraph.github.io/maxGraph/api-docs/types/CellStateStyle.html) which tells the graph to use the given named styles and override the specified keys.Also applies to: 85-85
🧰 Tools
🪛 Markdownlint (0.37.0)
68-68: null
Spaces inside link text(MD039, no-space-in-links)
100-100: Address TODO comment about insertVertex method migrationThe TODO comment indicates that the
insertVertexmethod needs to be migrated to use a single object parameter.Would you like me to help implement this migration or create a GitHub issue to track this task?
packages/core/src/util/MaxXmlRequest.ts (1)
414-415: Show complete usage example.
The snippet properly demonstrates retrieving the document element. Consider adding minimal error handling for completeness.packages/website/docs/usage/migrate-from-mxgraph.md (3)
176-176: Minor punctuation suggestion.
In the bullet list, consider removing the trailing colon after “getXml()”. The sentence reads more cleanly without it.- - `getXml()`: Update your code to use `xmlUtils.getXml()` ... + - `getXml()` Update your code to use `xmlUtils.getXml()` ...🧰 Tools
🪛 LanguageTool
[uncategorized] ~176-~176: Loose punctuation mark.
Context: ...tPoint(). ####xmlUtils-getXml(): Update your code to usexmlUtils.getXm...(UNLIKELY_OPENING_PUNCTUATION)
179-179: Check section headings for clarity.
Ensure “In the default namespace” matches actual usage. If it’s describing only “get” and “load,” consider renaming for clarity.
180-181: Grammar and formatting consistency.
The bullet points forget()andload()sections read well, but each line could be rephrased to keep the instructions parallel (e.g., “Useget()instead ofmxUtils.get()” to match the line forload()).🧰 Tools
🪛 LanguageTool
[uncategorized] ~181-~181: Loose punctuation mark.
Context: ...instead ofmxUtils.get(). -load(): Update your code to useload()` instea...(UNLIKELY_OPENING_PUNCTUATION)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
packages/core/src/util/MaxXmlRequest.ts(2 hunks)packages/website/docs/tutorials/editor.md(1 hunks)packages/website/docs/tutorials/graph.md(1 hunks)packages/website/docs/usage/migrate-from-mxgraph.md(1 hunks)
🧰 Additional context used
📓 Learnings (1)
packages/website/docs/tutorials/graph.md (1)
Learnt from: tbouffard
PR: maxGraph/maxGraph#618
File: packages/website/docs/tutorials/graph.md:56-59
Timestamp: 2025-01-06T09:09:47.410Z
Learning: In the maxGraph library, the classes "Cell" and "GraphDataModel" are valid, while "GraphCell" and "GraphModel" do not exist.
🪛 LanguageTool
packages/website/docs/tutorials/graph.md
[uncategorized] ~11-~11: Possible missing comma found.
Context: ...Graphtutorial was used to create this page which still containsmxGraph` class di...
(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~26-~26: Consider a shorter alternative to avoid wordiness.
Context: ...o/maxGraph/api-docs/classes/Graph.html) in order to create a graph. This is the central cla...
(IN_ORDER_TO_PREMIUM)
packages/website/docs/usage/migrate-from-mxgraph.md
[uncategorized] ~176-~176: Loose punctuation mark.
Context: ...tPoint(). #### xmlUtils-getXml(): Update your code to use xmlUtils.getXm...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~177-~177: Loose punctuation mark.
Context: ...Utils.getXml(). - createXmlDocument(): Update your code to use xmlUtils.creat...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~181-~181: Loose punctuation mark.
Context: ...instead ofmxUtils.get(). - load(): Update your code to use load()` instea...
(UNLIKELY_OPENING_PUNCTUATION)
packages/website/docs/tutorials/editor.md
[style] ~26-~26: Consider a shorter alternative to avoid wordiness.
Context: .../maxGraph/api-docs/classes/Editor.html) in order to create an editor. This is the central c...
(IN_ORDER_TO_PREMIUM)
🪛 Markdownlint (0.37.0)
packages/website/docs/tutorials/graph.md
68-68: null
Spaces inside link text
(MD039, no-space-in-links)
85-85: null
Spaces inside link text
(MD039, no-space-in-links)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: build
- GitHub Check: build (windows-2022)
- GitHub Check: build (macos-14)
- GitHub Check: build (ubuntu-22.04)
🔇 Additional comments (7)
packages/website/docs/tutorials/editor.md (1)
37-39: 🛠️ Refactor suggestionUpdate code example to use xmlUtils
The example should use the
xmlUtilsutility class instead of the deprecatedloadfunction.-import { load } from '@maxgraph/core'; -const config = load('editors/config/keyhandler-commons.xml').getDocumentElement(); +import { xmlUtils } from '@maxgraph/core'; +const config = xmlUtils.parseXml('editors/config/keyhandler-commons.xml').documentElement; const editor = new Editor(config);Likely invalid or redundant comment.
packages/core/src/util/MaxXmlRequest.ts (6)
347-347: Use plain definitions for clarity.
This change clarifies “textareas” → “text areas” in the comment, improving the documentation’s readability.
381-383: Ensure doc references match.
The doc block referencesgetfor asynchronous loading, which aligns well with the newly documented function. This is consistent, no issues noted.
388-390: Validate error reporting.
Switching from an alert-based error toconsole.erroris more user-friendly in modern JS environments. Confirm thatconsole.errormeets the project’s logging guidelines.Also applies to: 392-393
399-399: Return type clarity.
ReturningMaxXmlRequestfromloadclarifies its usage for the caller. This is a good way to indicate the synced request outcome.
406-409: Improved documentation on async loading.
These lines adequately describe how the async call works. The mention of both success and error callbacks is helpful.
420-420: Consistency in examples.
All examples follow a similar pattern across the file, which is good for new users. Keep them consistent in style with the rest of the docs.Also applies to: 423-425
tbouffard
deleted the
docs/613_extract_mxGraph_tutorial
branch
This was referenced
Jan 7, 2025This was referenced
Jan 20, 2025This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters