chore: remove commented clearSelection in CellEditorHandler - #1075
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
WalkthroughThe PR removes a duplicate clearSelection() method from CellEditorHandler and relies on the imported clearSelection utility from domUtils; stopEditing is repositioned after isSelectText. ChangesRemove duplicate selection clearing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
150ba68 to
b2af590
Compare
The commented clearSelection method mirrored the original mxGraph implementation but was already superseded by the clearSelection utility from domUtils, which is invoked in stopEditing. Both implementations are functionally equivalent, so the dead code can be removed. This is the same mxGraph migration leftover pattern previously addressed in efb5b4b, where a stray /** left by the initial refactor silently commented out the GraphHierarchyNode.isAncestor method.
b2af590 to
8bff8bb
Compare
|



Summary
clearSelectionmethod inCellEditorHandler(packages/core/src/view/plugin/CellEditorHandler.ts).mxCellEditor.clearSelection, butstopEditingalready invokes the equivalentclearSelectionutility fromdomUtils.ts. The two implementations only differ in the order they proberemoveAllRangesvsempty, which is not observable in modern browsers./**left by the initial refactor silently commented out theGraphHierarchyNode.isAncestormethod.Test plan
npm run lintpasses for the changed filestopEditingalready calls the importedclearSelectionutilitySummary by CodeRabbit