Skip to content

fix: correct misspelled function name#80

Merged
rgerum merged 1 commit intorgerum:mainfrom
yao24247:fix-typo
Jan 20, 2026
Merged

fix: correct misspelled function name#80
rgerum merged 1 commit intorgerum:mainfrom
yao24247:fix-typo

Conversation

@yao24247
Copy link
Copy Markdown
Contributor

Correct misspelled function name: make_dragable → make_draggable.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jan 20, 2026

Greptile Summary

This PR corrects a typo in the function name from make_dragable to make_draggable throughout the codebase. The change also includes a refactoring in drag_helper.py that extracts two helper methods (make_axes_draggable and make_figure_draggable) from inline code in the __init__ method, improving code organization and maintainability.

Changes:

  • Renamed make_dragablemake_draggable in DragManager class (18 total occurrences across both files)
  • Extracted make_axes_draggable helper method for making axes and their child elements draggable
  • Extracted make_figure_draggable helper method for making figure elements (texts, patches, legends, subfigures) draggable
  • Updated all call sites in qitem_properties.py to use the corrected spelling

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Simple spelling correction with no functional changes. All instances of the misspelled function name have been corrected consistently across the codebase. The refactoring improves code organization without altering behavior.
  • No files require special attention

Important Files Changed

Filename Overview
pylustrator/components/qitem_properties.py Updated 7 calls to make_draggable (previously misspelled as make_dragable)
pylustrator/drag_helper.py Refactored code to extract make_axes_draggable and make_figure_draggable helper methods, and renamed make_dragablemake_draggable throughout (11 occurrences)

Sequence Diagram

sequenceDiagram
    participant User
    participant QItemProperties
    participant DragManager
    participant Artist
    
    Note over User,Artist: PR Change: make_dragable → make_draggable
    
    User->>QItemProperties: buttonAddTextClicked()
    QItemProperties->>Artist: create text element
    QItemProperties->>DragManager: make_draggable(text)
    DragManager->>Artist: set_picker(True)
    DragManager->>Artist: set_bbox(...)
    
    User->>QItemProperties: buttonLegendClicked()
    QItemProperties->>Artist: legend()
    QItemProperties->>DragManager: make_draggable(legend)
    DragManager->>Artist: set_picker(True)
    
    Note over DragManager: Initialization (refactored)
    DragManager->>DragManager: make_figure_draggable(figure)
    DragManager->>DragManager: make_axes_draggable(axes)
    loop For each axes
        DragManager->>DragManager: make_draggable(ax)
        DragManager->>DragManager: make_draggable(texts)
        DragManager->>DragManager: make_draggable(patches)
    end
Loading

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jan 20, 2026

Greptile found no issues!

From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section.

This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".

@rgerum rgerum merged commit 5fbc201 into rgerum:main Jan 20, 2026
3 checks passed
@yao24247 yao24247 deleted the fix-typo branch January 21, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants