Skip to content

V0.27 - EgonDV, Refactor & QOL ✨

Choose a tag to compare

@Ariel4545 Ariel4545 released this 05 Jan 15:13
· 11 commits to main since this release
f350a12

Patch Notes: EgonDV Refactoring & QOL Update

🚀 Major Updates

1. Architecture Refactoring (OOP)

  • New Base Class (BasePlotMaker):
    • Introduced BasePlotMaker inheriting from customtkinter.CTk.
    • Centralized window initialization logic (title, geometry, resize behavior).
    • Centralized protocol handling (WM_DELETE_WINDOW) and window tracking (opened_programs list).
    • Added finalize_setup() method to handle common finalization tasks like centering the window (place_w_middle) and initializing "Fun Numbers".
  • Inheritance Update:
    • All specific graph maker classes (GraphMaker, BarMaker, BoxPlot, etc.) now inherit from BasePlotMaker instead of directly from customtkinter.CTk.
    • Removed redundant __init__ boilerplate code across all classes.

2. User Interface Redesign (Tabs)

  • Tabbed Navigation:
    • Replaced monolithic grid layouts with customtkinter.CTkTabview for most tools.
    • Controls are now organized into logical categories (e.g., Data, Style, Options, Legend) to reduce window clutter and improve usability.
  • Layout Improvements:
    • Standardized grid layouts within tabs using sticky='ew' for better responsiveness.

3. Enhanced Data Import

  • Advanced CSV Upload:
    • Replaced the generic upload() function with a robust ask_for_file() and ask_for_columns() workflow.
    • Column Selector: When uploading a CSV, a new popup window allows users to select specific columns to map to input fields, rather than dumping the entire file content into a single entry.

🛠 Detailed Class Changes

BoxPlot

  • Inheritance: Updated to BasePlotMaker.
  • UI: Implemented Tabs:
    • Data: Data entries and upload button.
    • Style: Patch artist, Notch, Line width/style.
    • Names: Titles and Axis names.

ErrorBarMaker

  • Inheritance: Updated to BasePlotMaker.
  • UI: Implemented Tabs:
    • Data: X/Y values and upload.
    • Error Values: Xerr/Yerr entries.
    • Options: Upper/Lower limits checkboxes.

ContourfMaker

  • Inheritance: Updated to BasePlotMaker.
  • UI: Implemented Tabs:
    • Data: X/Y values and upload.
    • Z Values: Z entry fields.

ImShowMaker

  • Inheritance: Updated to BasePlotMaker.
  • UI: Implemented Tabs:
    • Image: Upload button.
    • Style: Title, Transparency, Colormap, Interpolation.

ScatterPlotMaker

  • Inheritance: Updated to BasePlotMaker.
  • UI: Implemented Tabs:
    • Data: X/Y values and upload.
    • Style: Colors, Sizes, Transparency, Colormap.

StemMaker

  • Inheritance: Updated to BasePlotMaker.
  • UI: Implemented Tabs:
    • Data: X/Y values and upload.
    • Style: Bottom value, Line format, Marker format.

PieMaker

  • Inheritance: Updated to BasePlotMaker.
  • UI: Implemented Tabs:
    • Data: Values, Names, Upload.
    • Style: Shadows, Start angle, Explode values.
    • Legend: Legend toggle and title.

BarMaker

  • Inheritance: Updated to BasePlotMaker.
  • UI: Implemented Tabs:
    • Data: Names, Y values, Upload.
    • Style: Bar width, Direction (Horizontal/Vertical).
    • Legend: Legend toggle and title.

GraphMaker

  • Inheritance: Updated to BasePlotMaker.
  • UI: Implemented Tabs:
    • Data: X/Y values and upload.
    • Style: Marker, Line style, Dot/Line sizes.
    • Titles & Grid: Main/X/Y titles, Grid modes.
    • Advanced: Infinite line settings.

HistogramMaker

  • Inheritance: Updated to BasePlotMaker.
  • UI: Retained original grid layout (No Tabs implemented).

🐛 Code Cleanup & Fixes

  • Fun Numbers: Logic moved from __init__ to dedicated _setup_fun_numbers() methods in subclasses.
  • Window Centering: place_w_middle call moved to BasePlotMaker.finalize_setup().
  • Global Variables: Reduced reliance on global variable checks inside individual classes.