GeezerVison is showing github.com — refactor: use singular and kebab-case for source folder names by tbouffard · Pull Request #985 · maxGraph/maxGraph
Conversation
tbouffard
commented
Dec 23, 2025
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Standardize folder naming convention:
- codecs → codec
- mixins → mixin
- plugins → plugin
- undoable_changes → undoable-change
Summary by CodeRabbit
- Refactor
- Internal module and export locations reorganized for consistency; no changes to public APIs or runtime behavior visible to users.
- Documentation
- Added guidance on source folder naming (singular, kebab-case) to developer docs.
- Note
- User-facing features and functionality remain unchanged.
✏️ Tip: You can customize this high-level summary in your review settings.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Standardize folder naming convention:
- codecs → codec
- mixins → mixin
- plugins → plugin
- undoable_changes → undoable-change
coderabbitai
Bot
commented
Dec 23, 2025
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Walkthrough
Renames and re-targets many module import/export paths in packages/core: plural folders changed to singular (e.g., undoable_changes → undoable-change, plugins → plugin, codecs → codec, mixins → mixin), updating imports/exports and tests to the new paths.
Changes
| Cohort / File(s) |
Change Summary |
Serialization codec & tests packages/core/__tests__/serialization/codec/mxgraph/utils.test.ts, packages/core/src/serialization/register-model-codecs.ts, packages/core/src/serialization/register-other-codecs.ts, packages/core/src/serialization/codec/ChildChangeCodec.ts, packages/core/src/serialization/codec/RootChangeCodec.ts, packages/core/src/serialization/codec/TerminalChangeCodec.ts |
Import paths changed from ./codecs/... → ./codec/... and undoable change imports from ../undoable_changes/... → ../undoable-change/...; test import updated to match new codec path. |
Undoable-change modules packages/core/src/view/GraphDataModel.ts, packages/core/src/view/GraphSelectionModel.ts, packages/core/src/view/GraphView.ts, packages/core/src/view/animate/Effects.ts, packages/core/src/view/layout/LayoutManager.ts, packages/core/src/view/mixin/SelectionMixin.ts, packages/core/src/serialization/register-other-codecs.ts |
All references to undoable-change classes and UndoableEdit moved from ./undoable_changes/... → ./undoable-change/.... |
Plugin / handler relocations packages/core/src/editor/Editor.ts, packages/core/src/view/handler/EdgeHandler.ts, packages/core/src/view/handler/KeyHandler.ts, packages/core/src/view/handler/VertexHandler.ts, packages/core/src/view/cell/CellRenderer.ts, packages/core/src/view/mixin/ConnectionsMixin.ts, packages/core/src/view/mixin/EditingMixin.ts, packages/core/src/view/mixin/EventsMixin.ts, packages/core/src/view/mixin/PanningMixin.ts, packages/core/src/view/other/DragSource.ts |
Handler and plugin type/import paths changed from ./plugins/... → ./plugin/... (e.g., SelectionHandler, CellEditorHandler, ConnectionHandler, PanningHandler, etc.). |
Graph core imports packages/core/src/view/AbstractGraph.ts, packages/core/src/view/Graph.ts, packages/core/src/view/other/Outline.ts |
Default plugin import path updated from ./plugins/index.js → ./plugin/index.js; mixins → mixin path corrections applied where present. |
Public API re-exports packages/core/src/index.ts |
Public exports updated to re-export from new singular paths (undoable-change, plugin, codec, mixin); exported symbol names unchanged. |
Misc docs CLAUDE.md |
Added “Source Folder Naming” guidance; documentation-only changes. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Pre-merge checks and finishing touches
❌ Failed checks (1 warning)
| Check name |
Status |
Explanation |
Resolution |
| Description check |
⚠️ Warning |
The PR description lists the folder renaming changes but lacks required template sections like issue reference, checklist items, and detailed explanation of the problem being solved. |
Add issue reference (closes/fixes #), address PR checklist items, and provide detailed explanation of why this standardization is beneficial and what problem it solves. |
✅ Passed checks (2 passed)
| Check name |
Status |
Explanation |
| Title check |
✅ Passed |
The PR title clearly and concisely describes the main change: standardizing folder names to singular and kebab-case across the codebase. |
| Docstring Coverage |
✅ Passed |
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✨ Finishing touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
- Commit unit tests in branch
refactor/source_folders_name_kebab-case_only
📜 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 d076d35 and 334aa55.
📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Document the naming rules for source folders in packages/core/src/:
- Use singular form (handler/, not handlers/)
- Use kebab-case (my-feature/, not myFeature/)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 64dd088 and d076d35.
📒 Files selected for processing (1)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx,json,md}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Format code using Prettier with tab width 2, trailing comma ES5, print width 90, and end of line auto.
Files:
🧠 Learnings (5)
📓 Common learnings
Learnt from: tbouffard
Repo: maxGraph/maxGraph PR: 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
Repo: maxGraph/maxGraph PR: 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: CR
Repo: maxGraph/maxGraph PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T13:43:28.685Z
Learning: Applies to packages/core/package.json : Configure imports and exports to use ES2020 module format, with conditional exports supporting both ESM and CommonJS through proper package.json exports field.
Learnt from: CR
Repo: maxGraph/maxGraph PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T16:45:26.610Z
Learning: Applies to packages/core/__tests__/**/*.ts : Import paths in tests should omit the `.js` extension (handled by moduleNameMapper)
Learnt from: tbouffard
Repo: maxGraph/maxGraph PR: 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.
📚 Learning: 2025-12-19T16:45:26.610Z
Learnt from: CR
Repo: maxGraph/maxGraph PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T16:45:26.610Z
Learning: Applies to packages/core/src/**/*.ts : Use functions from `internal/i18n-utils.js` (translate, isI18nEnabled) instead of accessing `GlobalConfig.i18n` directly
Applied to files:
📚 Learning: 2025-12-19T16:45:26.610Z
Learnt from: CR
Repo: maxGraph/maxGraph PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T16:45:26.610Z
Learning: Applies to packages/core/__tests__/**/*.ts : Tests should be located in `packages/core/__tests__/` mirroring the structure of `src/` directory
Applied to files:
📚 Learning: 2025-12-19T16:45:26.610Z
Learnt from: CR
Repo: maxGraph/maxGraph PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T16:45:26.610Z
Learning: Applies to packages/core/src/**/*.ts : Shapes must be registered via registries (e.g., `ShapeRegistry`) before use; `Graph` class auto-registers default shapes, but `BaseGraph` requires manual registration
Applied to files:
📚 Learning: 2025-12-10T13:43:28.685Z
Learnt from: CR
Repo: maxGraph/maxGraph PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T13:43:28.685Z
Learning: Applies to packages/core/__tests__/**/*.test.ts : Test files must follow the naming pattern `**/*.test.ts` and be located in `packages/core/__tests__/` directory.
Applied to files:
🪛 markdownlint-cli2 (0.18.1)
CLAUDE.md
299-299: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (1)
CLAUDE.md (1)
293-309: Source folder naming guidelines are clear and well-documented.
The new section effectively documents the naming convention (singular form, kebab-case) with concrete good/bad examples. The placement and tone align well with the rest of CLAUDE.md and match the PR objectives for standardizing folder names.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|