Skip to content

docs(HiearchicalLayout): fix copy pasted JSDoc for cache attributes#975

Merged
tbouffard merged 2 commits intomaxGraph:mainfrom
le-codeur-rapide:fix_docs_hierarchical_layout
Dec 23, 2025
Merged

docs(HiearchicalLayout): fix copy pasted JSDoc for cache attributes#975
tbouffard merged 2 commits intomaxGraph:mainfrom
le-codeur-rapide:fix_docs_hierarchical_layout

Conversation

@le-codeur-rapide
Copy link
Copy Markdown

@le-codeur-rapide le-codeur-rapide commented Dec 13, 2025

Overview

Hello ! First of all thank you for the work on this library, it is very cool to use !
I was going throught the code and I think I spot a wrong copy/paste for the docstrings of edgesCache, edgeSourceTermCache and edgesTargetTermCache. I also removed a variable declaration that wasn't used

Very small changes so I didn't raise an issue, I hope it is ok

Summary by CodeRabbit

  • Refactor
    • Removed an unused local code declaration to streamline internal layout logic.
  • Documentation
    • Clarified internal documentation describing how layout-related caches map edges and terminals for more accurate maintenance.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 13, 2025

Walkthrough

Clarified JSDoc comments for three internal caches in HierarchicalLayout and removed an unused local destructuring in the getEdges method; no behavior or exported API changes.

Changes

Cohort / File(s) Change Summary
Documentation & cleanup
packages/core/src/view/layout/HierarchicalLayout.ts
Updated JSDoc for edgesCache, edgeSourceTermCache, and edgesTargetTermCache to accurately describe their mappings; removed an unused const { model } = this.graph destructuring in getEdges.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing copy-pasted JSDoc documentation for cache attributes in HierarchicalLayout, and follows Conventional Commits format.
Description check ✅ Passed The description is minimal but adequate for a small documentation fix. It clearly explains what was changed (JSDoc for three cache attributes and an unused variable) and appropriately justifies not opening a separate issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0612008 and eb66b6a.

📒 Files selected for processing (1)
  • packages/core/src/view/layout/HierarchicalLayout.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/core/src/view/layout/HierarchicalLayout.ts

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@tbouffard tbouffard changed the title docs(HiearchicalLayout): fix copy pasted docstrings for cache attributes docs(HiearchicalLayout): fix copy pasted JSDoc for cache attributes Dec 16, 2025
@tbouffard
Copy link
Copy Markdown
Member

Hi and thanks for your contribution

Very small changes so I didn't raise an issue, I hope it is ok

That's fine, for a change like this, there's no need to create a ticket, that would be overwhelming. 😄


/**
* A cache of edges whose source terminal is the key
* Maps each vertex to its computed list of incident edges considered by the layout.
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.

thought: I suggest replacing the term “vertex” with “cell” in all modified JSDocs.
This is because the source and target of an edge can be either a vertex or an edge, so the word “cell” is more general and better represents what can be stored in maps.

What do you think?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes I agree, I made the change

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.

👍🏿

@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@tbouffard tbouffard left a comment

Choose a reason for hiding this comment

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

LGTM, thanks again for the contribution.

@tbouffard tbouffard added the documentation Improvements or additions to documentation label Dec 23, 2025
@tbouffard tbouffard merged commit bec31d6 into maxGraph:main Dec 23, 2025
7 checks passed
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.

2 participants