Skip to content

Streamline Editor Architecture: Sheet Ordering, UI Lookup, and UnitUi Factory#87

Open
CG-Tespy wants to merge 3 commits intoLexianDEV:masterfrom
CG-Tespy:eventSheetAndBlockUiLogicReorganization
Open

Streamline Editor Architecture: Sheet Ordering, UI Lookup, and UnitUi Factory#87
CG-Tespy wants to merge 3 commits intoLexianDEV:masterfrom
CG-Tespy:eventSheetAndBlockUiLogicReorganization

Conversation

@CG-Tespy
Copy link
Copy Markdown
Contributor

What This PR Does

Moves responsibilities from FKMainEditor → FKEventSheet

  • Determining the correct ordering of FKUnits for UI refresh
  • FKEventSheet now exposes an ordered list of units, so FKMainEditor no longer reconstructs order manually in _populate_from_sheet().
  • Writing FKUnits into the sheet
  • Generating new FKEventSheet instances from a list of FKUnits
    This consolidates all sheet‑structure logic into the sheet itself, where it belongs.

Moves responsibilities from FKMainEditor → FKBlockContainerUi

  • Gathering FKUnitUis and their represented FKUnits
  • FKBlockContainerUi now maintains a lookup table and exposes units / unit_uis properties, so clients no longer need to manually iterate children or reconstruct ordering.
    This makes the container the authoritative source for UI‑side block order and lookup.

Introduces a new class: FKUnitUiFactory

  • Responsible for creating FKUnitUi nodes from FKUnits
  • Currently supports EventRows, Comments, and Groups
  • (Condition/action UIs will be added later once structural issues are resolved)
    This removes UI instantiation logic from FKMainEditor and centralizes it in a dedicated factory.

Small Improvements

  • FKUnitUi’s before_block_changed and block_changed signals now explicitly specify that the passed node is an FKUnitUi.
  • Added optional debug print logs to aid troubleshooting.

Bugfix(es)

  • Fixed a regression that prevented comment reordering from persisting.

…i | Bugfix

Bug(s) fixed:
- Moving top-level elements in the EventSheet ui not sticking correctly

Other Notes:
- Had FKUnitUi's nodes specify that they're passing FKUnitUis, since that's the only thing that should
be passed when emitting those signals
  - And it can help listeners, too
- BlockContainerUi class_name -> FKBlockContainerUi
… own ordered_items list | Used FKCondition duplication func
# Conflicts (resolved):
#	addons/flowkit/editor/editor_globals.gd
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.

1 participant