Skip to content

docs: fix some typedoc warnings#870

Merged
tbouffard merged 2 commits intomainfrom
docs/fix_typedoc_warnings
Jul 10, 2025
Merged

docs: fix some typedoc warnings#870
tbouffard merged 2 commits intomainfrom
docs/fix_typedoc_warnings

Conversation

@tbouffard
Copy link
Member

@tbouffard tbouffard commented Jul 10, 2025

Reduce the number of warning from 671 to 569.

The fixes include:

  • use correct reference in links
  • remove ref to mxCell in function parameters
  • update and fix code examples
  • add some languages for syntax highlighting to the typedoc defaults

Summary by CodeRabbit

  • Documentation
    • Updated all documentation comments to replace outdated type references (e.g., mxCell, mxGeometry) with current names (Cell, Geometry) for improved clarity and consistency.
    • Improved and clarified example code and parameter descriptions in comments across various classes and interfaces.
    • Removed the @alpha annotation from certain types and classes to reflect updated documentation status.
    • Enhanced TypeDoc configuration to support syntax highlighting for additional languages, including C#, Java, and XML.

Reduce the number of warning from 671 to 569.

The fixes include:
  - use correct reference in links
  - remove ref to mxCell in function parameters
  - add some languages for syntax highlighting to the typedoc defaults
@tbouffard tbouffard added the documentation Improvements or additions to documentation label Jul 10, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 10, 2025

Walkthrough

This change updates documentation comments throughout the codebase to replace outdated references such as "mxCell" and "mxGeometry" with "Cell" and "Geometry." It also modernizes example code, corrects terminology (e.g., "dictionary" to "map"), renames a class, removes @alpha annotations, clarifies JSDoc comments, and adds syntax highlighting languages in the TypeDoc config. No functional or logic changes are made.

Changes

Files/Groups Change Summary
Editor.ts, Codec.ts, GraphSelectionModel.ts, CompactTreeLayout.ts, RadialTreeLayout.ts, SwimlaneManager.ts, CellsMixin.type.ts, ConnectionsMixin.type.ts, EdgeMixin.type.ts, LabelMixin.type.ts, SwimlaneMixin.type.ts Updated JSDoc comments and parameter type references from mxCell/mxGeometry to Cell/Geometry.
GraphDataModel.ts, CellsMixin.ts Changed terminology in comments from "dictionary" to "map" for internal data structures.
FastOrganicLayout.ts Renamed class and default export from MxFastOrganicLayout to FastOrganicLayout; updated comment terminology.
ModelXmlSerializer.ts Removed @alpha annotation from exported type and class.
AbstractGraph.ts Updated JSDoc comment to reference CellState instead of mxCellStates.
cell/CellHighlight.ts, shape/Shape.ts Updated example code and documentation to use new class names and modern JS syntax; fixed minor syntax errors.
event/EventSource.ts, event/InternalEvent.ts Improved clarity and conciseness in JSDoc comments; updated example code to use current class names.
other/DragSource.ts, plugins/SelectionCellsHandler.ts Clarified and corrected property comments and example usages.
undoable_changes/ChildChange.ts Corrected and clarified method documentation for connect.
tsconfig.json Added highlightLanguages to typedocOptions for additional syntax highlighting languages in documentation.

Sequence Diagram(s)

No sequence diagrams generated as the changes are limited to documentation and comments.

Possibly related PRs

  • maxGraph/maxGraph#714: Adds and improves JSDoc categories and restructures documentation in Editor.ts and other files. Related through documentation changes in the same file, though focusing on categorization rather than terminology updates.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-07-10T13_25_28_379Z-debug-0.log


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7a5ef9a and 391afef.

📒 Files selected for processing (5)
  • packages/core/src/view/cell/CellHighlight.ts (1 hunks)
  • packages/core/src/view/layout/FastOrganicLayout.ts (3 hunks)
  • packages/core/src/view/mixins/CellsMixin.type.ts (8 hunks)
  • packages/core/src/view/other/DragSource.ts (2 hunks)
  • packages/core/src/view/shape/Shape.ts (3 hunks)
✅ Files skipped from review due to trivial changes (2)
  • packages/core/src/view/cell/CellHighlight.ts
  • packages/core/src/view/other/DragSource.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/core/src/view/layout/FastOrganicLayout.ts
  • packages/core/src/view/shape/Shape.ts
  • packages/core/src/view/mixins/CellsMixin.type.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: build
  • GitHub Check: build (macos-14)
  • GitHub Check: build (windows-2022)
  • GitHub Check: build (ubuntu-24.04)
✨ Finishing Touches
  • 📝 Generate Docstrings

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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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.

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 (10)
packages/core/src/view/layout/FastOrganicLayout.ts (1)

253-256: Comment wording mismatches actual structure

The comment now says “indices map”, but indices is still a plain object literal ({ [key: string]: number }).
Consider re-phrasing to “indices lookup table” (or use Map) to avoid confusing readers.

packages/core/src/view/cell/CellHighlight.ts (1)

35-37: Typo in example snippet

cont should be const.

-* cont highlight = new CellHighlight(graph, '#ff0000', 2);
+* const highlight = new CellHighlight(graph, '#ff0000', 2);
packages/core/src/view/event/EventSource.ts (1)

124-136: Doc sample still shows positional arguments; consider using key/value form for clarity.

The new example

fireEvent(new EventObject("eventName", key1, val1, ))

is valid, but we usually promote the {name, value} overload for readability (used elsewhere in the docs). Not blocking, just flagging in case you want full consistency.

packages/core/src/view/shape/Shape.ts (2)

48-59: Left-over “mxGraph” reference in updated paragraph.

Since the project branding was switched to maxGraph elsewhere in this PR, keeping mxGraph here is probably unintentional and will trigger another unresolved-symbol warning.
Quick fix:

- * mxGraph, namely for text, image, rectangle, rhombus, ellipse and polyline.
+ * maxGraph, namely for text, image, rectangle, rhombus, ellipse and polyline.

99-101: Minor style: comment says “Assigned in CellHighlight”

If this property really originates from CellHighlight, consider adding a @see tag so TypeDoc links it automatically:

/** @see CellHighlight */

Totally optional.

packages/core/src/view/other/DragSource.ts (4)

96-99: Grammar tweak: “a” instead of “an” and consider shortening the sentence

Minor nit: “an {@link Guide}” sounds awkward—Guide starts with a consonant sound.
Also, the second sentence merely repeats information already on the previous line; you could remove it without losing meaning.

- * Holds an {@link Guide} for the {@link currentGraph} if {@link dragElement} is not `null`.
+ * Holds a {@link Guide} for the {@link currentGraph} (only created when {@link dragElement} exists).

102-104: Duplicate phrasing with earlier comment

Lines 84-86 already describe “the DOM node used to represent the drag preview.”
This new comment duplicates that idea for the graph-specific preview. To avoid confusion, consider clarifying the distinction:

- * Holds the DOM node that is used to represent the drag preview in the graph.
+ * Holds the DOM node representing the in-graph preview (separate from the floating dragElement).

132-134: Article + link formatting

Same “a/​an” issue as above; plus the link should be {@link Guide} (inside braces).

- * Holds an {@link Guide} for the {@link currentGraph} if {@link dragElement} is not `null`.
+ * Holds a {@link Guide} for the {@link currentGraph} when a {@link dragElement} is active.

137-139: Consistent article

- * Holds an {@link CellHighlight} for the {@link currentGraph}.
+ * Holds a {@link CellHighlight} for the {@link currentGraph}.
packages/core/src/view/mixins/CellsMixin.type.ts (1)

466-476: const variable is reassigned in the JSDoc example

In the example for InternalEvent.CELLS_RESIZED, geo is declared with const and later reassigned (geo = geo.clone()).
Readers who copy-paste the snippet will hit a runtime/TS error. Declare it with let (or rename the clone) to avoid confusion.

-        const geo = cell.getGeometry();
+        let geo = cell.getGeometry();
...
-           geo = geo.clone();
+           geo = geo.clone();
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 015e3a9 and 7a5ef9a.

📒 Files selected for processing (24)
  • packages/core/src/editor/Editor.ts (2 hunks)
  • packages/core/src/serialization/Codec.ts (2 hunks)
  • packages/core/src/serialization/ModelXmlSerializer.ts (0 hunks)
  • packages/core/src/view/AbstractGraph.ts (1 hunks)
  • packages/core/src/view/GraphDataModel.ts (3 hunks)
  • packages/core/src/view/GraphSelectionModel.ts (6 hunks)
  • packages/core/src/view/cell/CellHighlight.ts (1 hunks)
  • packages/core/src/view/event/EventSource.ts (1 hunks)
  • packages/core/src/view/event/InternalEvent.ts (1 hunks)
  • packages/core/src/view/layout/CompactTreeLayout.ts (2 hunks)
  • packages/core/src/view/layout/FastOrganicLayout.ts (1 hunks)
  • packages/core/src/view/layout/RadialTreeLayout.ts (2 hunks)
  • packages/core/src/view/layout/SwimlaneManager.ts (2 hunks)
  • packages/core/src/view/mixins/CellsMixin.ts (1 hunks)
  • packages/core/src/view/mixins/CellsMixin.type.ts (8 hunks)
  • packages/core/src/view/mixins/ConnectionsMixin.type.ts (2 hunks)
  • packages/core/src/view/mixins/EdgeMixin.type.ts (1 hunks)
  • packages/core/src/view/mixins/LabelMixin.type.ts (1 hunks)
  • packages/core/src/view/mixins/SwimlaneMixin.type.ts (3 hunks)
  • packages/core/src/view/other/DragSource.ts (2 hunks)
  • packages/core/src/view/plugins/SelectionCellsHandler.ts (1 hunks)
  • packages/core/src/view/shape/Shape.ts (3 hunks)
  • packages/core/src/view/undoable_changes/ChildChange.ts (1 hunks)
  • packages/core/tsconfig.json (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/core/src/serialization/ModelXmlSerializer.ts
🧰 Additional context used
🧠 Learnings (12)
📓 Common learnings
Learnt from: tbouffard
PR: maxGraph/maxGraph#857
File: packages/core/src/view/plugins/SelectionHandler.ts:1081-1092
Timestamp: 2025-06-26T13:27:19.012Z
Learning: User tbouffard prefers to keep PRs focused on their main objective and defer implementation improvements or logic fixes to future dedicated PRs. For maxGraph, refactoring PRs like Dictionary→Map migration should not include unrelated logic improvements even when valid issues are identified in the migrated code.
Learnt from: tbouffard
PR: maxGraph/maxGraph#776
File: packages/core/src/view/AbstractGraph.ts:492-495
Timestamp: 2025-04-24T12:34:56.726Z
Learning: PR #776 focuses on refactoring to introduce AbstractGraph as a base class and moving code from Graph to AbstractGraph. Type improvements and other refinements should be addressed in future PRs to keep this one focused on the core architectural change.
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/core/src/view/style/edge/Segment.ts:26-35
Timestamp: 2025-04-29T13:29:45.122Z
Learning: In the maxGraph project, JSDoc `{@link}` references to symbols don't need to be imported in the current file to work correctly. TypeDoc can resolve symbols across the entire project namespace, not just within the current file, which is common in modern documentation systems and IDEs.
Learnt from: tbouffard
PR: maxGraph/maxGraph#593
File: .github/workflows/create-github-release.yml:42-42
Timestamp: 2025-01-28T16:22:25.804Z
Learning: In the GitHub release notes template for maxGraph, TODO comments are intentionally included to mark sections that must be reviewed by maintainers before publishing the release. These TODOs should not be removed or converted to validation steps as they are part of the release review process.
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.
Learnt from: tbouffard
PR: maxGraph/maxGraph#849
File: packages/html/stories/DragSource.stories.js:98-101
Timestamp: 2025-06-13T07:48:10.300Z
Learning: User tbouffard prefers answers in English; avoid switching to other languages in future replies.
packages/core/src/view/GraphSelectionModel.ts (4)
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.
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/core/src/view/style/edge/Segment.ts:26-35
Timestamp: 2025-04-29T13:29:45.122Z
Learning: In the maxGraph project, JSDoc `{@link}` references to symbols don't need to be imported in the current file to work correctly. TypeDoc can resolve symbols across the entire project namespace, not just within the current file, which is common in modern documentation systems and IDEs.
Learnt from: tbouffard
PR: maxGraph/maxGraph#776
File: packages/core/src/view/Graph.ts:85-92
Timestamp: 2025-04-24T12:34:10.366Z
Learning: The Graph class intentionally doesn't use collaborators (cellRenderer, selectionModel, view) from options in initializeCollaborators, as it's designed to replicate the previous implementation using only its factory methods for backward compatibility.
Learnt from: tbouffard
PR: maxGraph/maxGraph#593
File: .github/workflows/create-github-release.yml:42-42
Timestamp: 2025-01-28T16:22:25.804Z
Learning: In the GitHub release notes template for maxGraph, TODO comments are intentionally included to mark sections that must be reviewed by maintainers before publishing the release. These TODOs should not be removed or converted to validation steps as they are part of the release review process.
packages/core/src/view/AbstractGraph.ts (5)
Learnt from: tbouffard
PR: maxGraph/maxGraph#776
File: packages/core/src/view/AbstractGraph.ts:492-495
Timestamp: 2025-04-24T12:34:56.726Z
Learning: PR #776 focuses on refactoring to introduce AbstractGraph as a base class and moving code from Graph to AbstractGraph. Type improvements and other refinements should be addressed in future PRs to keep this one focused on the core architectural change.
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.
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/core/src/view/style/edge/Segment.ts:26-35
Timestamp: 2025-04-29T13:29:45.122Z
Learning: In the maxGraph project, JSDoc `{@link}` references to symbols don't need to be imported in the current file to work correctly. TypeDoc can resolve symbols across the entire project namespace, not just within the current file, which is common in modern documentation systems and IDEs.
Learnt from: tbouffard
PR: maxGraph/maxGraph#776
File: packages/core/src/view/Graph.ts:85-92
Timestamp: 2025-04-24T12:34:10.366Z
Learning: The Graph class intentionally doesn't use collaborators (cellRenderer, selectionModel, view) from options in initializeCollaborators, as it's designed to replicate the previous implementation using only its factory methods for backward compatibility.
Learnt from: tbouffard
PR: maxGraph/maxGraph#593
File: .github/workflows/create-github-release.yml:42-42
Timestamp: 2025-01-28T16:22:25.804Z
Learning: In the GitHub release notes template for maxGraph, TODO comments are intentionally included to mark sections that must be reviewed by maintainers before publishing the release. These TODOs should not be removed or converted to validation steps as they are part of the release review process.
packages/core/src/view/mixins/EdgeMixin.type.ts (4)
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/website/docs/usage/edge-styles.md:59-63
Timestamp: 2025-04-29T13:32:14.572Z
Learning: In the EdgeStyles documentation, the sentence "A perimeter is a function matching the `EdgeStyleFunction` type" contains an incorrect term - "perimeter" should be replaced with "EdgeStyle" or "custom EdgeStyle" as the document is specifically about EdgeStyles.
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/website/docs/usage/edge-styles.md:59-63
Timestamp: 2025-04-29T13:30:18.686Z
Learning: In the EdgeStyles documentation, tbouffard prefers the existing text "A perimeter is a function matching the `EdgeStyleFunction` type" over suggestions that might create redundancy, even if terminology might be technically misaligned.
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/core/src/view/style/edge/Segment.ts:26-35
Timestamp: 2025-04-29T13:29:45.122Z
Learning: In the maxGraph project, JSDoc `{@link}` references to symbols don't need to be imported in the current file to work correctly. TypeDoc can resolve symbols across the entire project namespace, not just within the current file, which is common in modern documentation systems and IDEs.
Learnt from: tbouffard
PR: maxGraph/maxGraph#770
File: packages/core/src/view/cell/CellTracker.ts:99-101
Timestamp: 2025-04-18T07:02:31.931Z
Learning: In TypeScript, when implementing an interface, methods can have fewer parameters than declared in the interface due to TypeScript's structural typing system. Both omitting unused parameters entirely and prefixing them with underscore (e.g., _sender) are valid patterns in the maxGraph codebase.
packages/core/src/view/mixins/ConnectionsMixin.type.ts (4)
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/core/src/view/style/edge/Segment.ts:26-35
Timestamp: 2025-04-29T13:29:45.122Z
Learning: In the maxGraph project, JSDoc `{@link}` references to symbols don't need to be imported in the current file to work correctly. TypeDoc can resolve symbols across the entire project namespace, not just within the current file, which is common in modern documentation systems and IDEs.
Learnt from: tbouffard
PR: maxGraph/maxGraph#776
File: packages/core/src/view/AbstractGraph.ts:492-495
Timestamp: 2025-04-24T12:34:56.726Z
Learning: PR #776 focuses on refactoring to introduce AbstractGraph as a base class and moving code from Graph to AbstractGraph. Type improvements and other refinements should be addressed in future PRs to keep this one focused on the core architectural change.
Learnt from: tbouffard
PR: maxGraph/maxGraph#770
File: packages/core/src/view/cell/CellTracker.ts:99-101
Timestamp: 2025-04-18T07:02:31.931Z
Learning: In TypeScript, when implementing an interface, methods can have fewer parameters than declared in the interface due to TypeScript's structural typing system. Both omitting unused parameters entirely and prefixing them with underscore (e.g., _sender) are valid patterns in the maxGraph codebase.
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.
packages/core/src/editor/Editor.ts (2)
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/core/src/view/style/edge/Segment.ts:26-35
Timestamp: 2025-04-29T13:29:45.122Z
Learning: In the maxGraph project, JSDoc `{@link}` references to symbols don't need to be imported in the current file to work correctly. TypeDoc can resolve symbols across the entire project namespace, not just within the current file, which is common in modern documentation systems and IDEs.
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.
packages/core/src/view/layout/CompactTreeLayout.ts (1)
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/core/src/view/style/edge/Segment.ts:26-35
Timestamp: 2025-04-29T13:29:45.122Z
Learning: In the maxGraph project, JSDoc `{@link}` references to symbols don't need to be imported in the current file to work correctly. TypeDoc can resolve symbols across the entire project namespace, not just within the current file, which is common in modern documentation systems and IDEs.
packages/core/src/view/shape/Shape.ts (9)
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/core/src/view/style/edge/Segment.ts:26-35
Timestamp: 2025-04-29T13:29:45.122Z
Learning: In the maxGraph project, JSDoc `{@link}` references to symbols don't need to be imported in the current file to work correctly. TypeDoc can resolve symbols across the entire project namespace, not just within the current file, which is common in modern documentation systems and IDEs.
Learnt from: tbouffard
PR: maxGraph/maxGraph#785
File: packages/core/src/view/style/register.ts:19-19
Timestamp: 2025-04-28T08:24:39.831Z
Learning: In the maxGraph project, the Perimeter namespace is defined in the 'builtin-style-elements.ts' file using the statement 'export * as Perimeter from './perimeter';'. To access the Perimeter namespace in other files, they must import from './builtin-style-elements' instead of directly from './perimeter', as part of the tree-shaking optimization.
Learnt from: tbouffard
PR: maxGraph/maxGraph#776
File: packages/core/src/view/Graph.ts:77-83
Timestamp: 2025-04-24T12:33:36.243Z
Learning: All register functions in maxGraph (`registerDefaultShapes`, `registerDefaultEdgeStyles`, `registerDefaultPerimeters`, and `registerDefaultEdgeMarkers`) have internal state flags to prevent duplicate registrations, making them inherently idempotent.
Learnt from: tbouffard
PR: maxGraph/maxGraph#593
File: .github/workflows/create-github-release.yml:42-42
Timestamp: 2025-01-28T16:22:25.804Z
Learning: In the GitHub release notes template for maxGraph, TODO comments are intentionally included to mark sections that must be reviewed by maintainers before publishing the release. These TODOs should not be removed or converted to validation steps as they are part of the release review process.
Learnt from: tbouffard
PR: maxGraph/maxGraph#770
File: packages/core/src/view/cell/CellTracker.ts:99-101
Timestamp: 2025-04-18T07:02:31.931Z
Learning: In TypeScript, when implementing an interface, methods can have fewer parameters than declared in the interface due to TypeScript's structural typing system. Both omitting unused parameters entirely and prefixing them with underscore (e.g., _sender) are valid patterns in the maxGraph codebase.
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.
Learnt from: tbouffard
PR: maxGraph/maxGraph#785
File: packages/core/src/view/style/register.ts:19-19
Timestamp: 2025-04-28T08:24:39.831Z
Learning: In the maxGraph project, the Perimeter namespace is defined in the './builtin-style-elements' file as a namespace export ('export * as Perimeter'), making this the correct import location for accessing the Perimeter namespace.
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/website/docs/usage/edge-styles.md:59-63
Timestamp: 2025-04-29T13:32:14.572Z
Learning: In the EdgeStyles documentation, the sentence "A perimeter is a function matching the `EdgeStyleFunction` type" contains an incorrect term - "perimeter" should be replaced with "EdgeStyle" or "custom EdgeStyle" as the document is specifically about EdgeStyles.
Learnt from: tbouffard
PR: maxGraph/maxGraph#776
File: packages/core/src/view/AbstractGraph.ts:492-495
Timestamp: 2025-04-24T12:34:56.726Z
Learning: PR #776 focuses on refactoring to introduce AbstractGraph as a base class and moving code from Graph to AbstractGraph. Type improvements and other refinements should be addressed in future PRs to keep this one focused on the core architectural change.
packages/core/src/view/mixins/CellsMixin.type.ts (3)
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.
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/core/src/view/style/edge/Segment.ts:26-35
Timestamp: 2025-04-29T13:29:45.122Z
Learning: In the maxGraph project, JSDoc `{@link}` references to symbols don't need to be imported in the current file to work correctly. TypeDoc can resolve symbols across the entire project namespace, not just within the current file, which is common in modern documentation systems and IDEs.
Learnt from: tbouffard
PR: maxGraph/maxGraph#776
File: packages/core/src/view/AbstractGraph.ts:492-495
Timestamp: 2025-04-24T12:34:56.726Z
Learning: PR #776 focuses on refactoring to introduce AbstractGraph as a base class and moving code from Graph to AbstractGraph. Type improvements and other refinements should be addressed in future PRs to keep this one focused on the core architectural change.
packages/core/src/view/layout/RadialTreeLayout.ts (1)
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/core/src/view/style/edge/Segment.ts:26-35
Timestamp: 2025-04-29T13:29:45.122Z
Learning: In the maxGraph project, JSDoc `{@link}` references to symbols don't need to be imported in the current file to work correctly. TypeDoc can resolve symbols across the entire project namespace, not just within the current file, which is common in modern documentation systems and IDEs.
packages/core/src/view/other/DragSource.ts (1)
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/core/src/view/style/edge/Segment.ts:26-35
Timestamp: 2025-04-29T13:29:45.122Z
Learning: In the maxGraph project, JSDoc `{@link}` references to symbols don't need to be imported in the current file to work correctly. TypeDoc can resolve symbols across the entire project namespace, not just within the current file, which is common in modern documentation systems and IDEs.
packages/core/src/view/GraphDataModel.ts (6)
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.
Learnt from: tbouffard
PR: maxGraph/maxGraph#776
File: packages/core/src/view/AbstractGraph.ts:492-495
Timestamp: 2025-04-24T12:34:56.726Z
Learning: PR #776 focuses on refactoring to introduce AbstractGraph as a base class and moving code from Graph to AbstractGraph. Type improvements and other refinements should be addressed in future PRs to keep this one focused on the core architectural change.
Learnt from: tbouffard
PR: maxGraph/maxGraph#593
File: .github/workflows/create-github-release.yml:42-42
Timestamp: 2025-01-28T16:22:25.804Z
Learning: In the GitHub release notes template for maxGraph, TODO comments are intentionally included to mark sections that must be reviewed by maintainers before publishing the release. These TODOs should not be removed or converted to validation steps as they are part of the release review process.
Learnt from: tbouffard
PR: maxGraph/maxGraph#776
File: packages/core/src/view/Graph.ts:85-92
Timestamp: 2025-04-24T12:34:10.366Z
Learning: The Graph class intentionally doesn't use collaborators (cellRenderer, selectionModel, view) from options in initializeCollaborators, as it's designed to replicate the previous implementation using only its factory methods for backward compatibility.
Learnt from: tbouffard
PR: maxGraph/maxGraph#791
File: packages/core/src/view/style/edge/Segment.ts:26-35
Timestamp: 2025-04-29T13:29:45.122Z
Learning: In the maxGraph project, JSDoc `{@link}` references to symbols don't need to be imported in the current file to work correctly. TypeDoc can resolve symbols across the entire project namespace, not just within the current file, which is common in modern documentation systems and IDEs.
Learnt from: tbouffard
PR: maxGraph/maxGraph#826
File: packages/js-example-nodejs/src/index.cjs:64-69
Timestamp: 2025-05-13T12:54:55.231Z
Learning: For example code in the maxGraph repository, maintainers prefer to keep scripts simple without error handling to focus on demonstrating core functionality, especially in demonstration scripts like those in packages/js-example-nodejs.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: build
  • GitHub Check: build (windows-2022)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (ubuntu-24.04)
🔇 Additional comments (31)
packages/core/src/view/plugins/SelectionCellsHandler.ts (1)

98-99: LGTM – doc tweak only

The shortened wording is clear and consistent with the project-wide terminology change.

packages/core/src/view/mixins/CellsMixin.ts (1)

459-461: LGTM – comment update aligns with new terminology

No further action required.

packages/core/src/view/AbstractGraph.ts (1)

536-537: Correct reference update; no other issues spotted.

Replacing mxCellStates with CellStates keeps the docs in-sync with the current API and removes a TypeDoc warning. No further action required.

packages/core/src/view/event/InternalEvent.ts (1)

71-72: JSDoc trim looks good.

The wording is now concise and the legacy mxUtils.bind note is gone – one less warning. 👍

packages/core/src/view/undoable_changes/ChildChange.ts (1)

68-71: Good catch on the method description.

The updated wording accurately reflects what connect does and removes the misleading note inherited from mxGraph. Nice!

packages/core/src/view/shape/Shape.ts (2)

76-77: 👍 Switched to ShapeRegistry.add example.

The example now mirrors the actual API, preventing confusion in generated docs.


83-85: const usage modernises the snippet – good move.

No further comments.

packages/core/src/view/mixins/LabelMixin.type.ts (1)

70-74: Link replacement looks good

mxCellCell aligns with current project terminology; no further action needed.

packages/core/src/serialization/Codec.ts (2)

384-390: Reference update OK

JSDoc now references Cell; change is correct and compiles cleanly with TypeDoc.


436-440: Comment corrected — no issues

Updated inline explanation retains intent while using the proper class name.

packages/core/src/view/GraphSelectionModel.ts (6)

135-136: Param annotation fix approved

Cell reference is now correct.


175-176: Param annotation fix approved


210-212: Param annotation fix approved


221-222: Param annotation fix approved


259-260: Param annotation fix approved


270-272: Param annotation fix approved

packages/core/src/view/mixins/EdgeMixin.type.ts (1)

320-323: Documentation reference corrected

Cell is the correct type; change is accurate.

packages/core/src/view/layout/CompactTreeLayout.ts (2)

232-235: LGTM! Documentation reference updated correctly.

The JSDoc comments have been properly updated to reference Cell instead of the legacy mxCell type, which aligns with the current codebase terminology and helps reduce TypeDoc warnings.


255-256: LGTM! Parameter documentation updated correctly.

The JSDoc parameter documentation has been properly updated to reference Cell instead of the legacy mxCell type, maintaining consistency with the current type naming conventions.

packages/core/src/view/mixins/ConnectionsMixin.type.ts (3)

207-208: LGTM! Method parameter documentation updated correctly.

The JSDoc parameter documentation for isCellDisconnectable has been properly updated to reference Cell instead of the legacy mxCell type, ensuring consistency with current type naming conventions.


228-228: LGTM! Parameter documentation updated correctly.

The JSDoc parameter documentation for isValidSource has been properly updated to reference Cell instead of the legacy mxCell type.


235-235: LGTM! Parameter documentation updated correctly.

The JSDoc parameter documentation for isValidTarget has been properly updated to reference Cell instead of the legacy mxCell type.

packages/core/src/editor/Editor.ts (2)

195-203: Terminology change is correct and consistent.

mxCell/mxGeometry references were successfully replaced with Cell/Geometry in the examples – matches the wider renaming effort.
No further action needed.


216-218: Good catch on “known annotations” note.

The comment now references “Cell node” instead of “mxCell node”, keeping the doc coherent. ✅

packages/core/tsconfig.json (1)

52-66: Addition of highlightLanguages looks fine.

The extra languages (csharp, java, xml) will improve rendered snippets.
TS config files accept trailing commas and // comments, so the syntax is legal JSONC.

packages/core/src/view/layout/SwimlaneManager.ts (2)

228-230: Doc param rename aligns with project vocabulary.

Switching mxCellCell in JSDoc keeps things uniform.


299-301: Second JSDoc update also correct.
No issues spotted.

packages/core/src/view/layout/RadialTreeLayout.ts (2)

121-124: JSDoc vertex-ignore wording updated correctly.

Matches current type names; nothing else required.


139-141: Execute method docs updated – LGTM.

Consistent with other layout files.

packages/core/src/view/GraphDataModel.ts (1)

351-358: Documentation update looks good

Example now uses const and Cell, matching current API. No further issues spotted.

packages/core/src/view/mixins/SwimlaneMixin.type.ts (1)

53-57: JSDoc param rename is consistent

mxCellCell reference fixed; aligns with the rest of the PR and removes TypeDoc warnings.

@sonarqubecloud
Copy link

@tbouffard tbouffard merged commit 62df033 into main Jul 10, 2025
7 checks passed
@tbouffard tbouffard deleted the docs/fix_typedoc_warnings branch July 10, 2025 14:01
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