refactor: Export-Dialoge als eigenes Panel (erster Node-Schnitt)

Neunter Schritt der Controller-Zerlegung und der erste mit Signalen statt
reiner Funktionen. `ExportPanel` (src/whiteboard/view/export_panel.gd) besitzt
die Dialoge "Kür exportieren" und "Export abgeschlossen" und meldet nur die
Auswahl:

    export_requested(pfad, format, abschnitt, danach öffnen)

Der Controller prüft, ob die Datei existiert, fragt über den bestehenden
`confirm_dialog` nach dem Überschreiben, schreibt über `ExportService` und
ruft `panel.show_done()`. Das Panel fasst kein Dateisystem an — so bleibt die
Überschreib-Bestätigung an einer Stelle statt in zwei Dialogen.

- Szene: neuer Knoten `ExportPanel` mit Skript, beide Dialoge und ihre
  Kindknoten darunter umgehängt (parent-Pfade sind absolut).
- Tests greifen jetzt über `controller.export_panel.*` zu.

Controller: 8.304 -> 8.245 Zeilen. Suite grün.
This commit is contained in:
torsten 2026-11-13 14:39:13 +01:00
parent c9fb6ebed6
commit 27b7fd0907
8 changed files with 213 additions and 121 deletions

View file

@ -295,12 +295,12 @@ func _run() -> void:
return
_check(
controller.export_format_option.item_count == 3
and controller.export_format_option.get_item_text(2).contains("PDF"),
controller.export_panel.format_option.item_count == 3
and controller.export_panel.format_option.get_item_text(2).contains("PDF"),
"export dialog offers the PDF format"
)
_check(
controller.export_open_after_check.button_pressed,
controller.export_panel.open_after_check.button_pressed,
"export dialog opens the result by default"
)
@ -310,7 +310,7 @@ func _run() -> void:
await process_frame
controller._open_export_dialog()
await process_frame
var export_dialog := controller.export_dialog
var export_dialog := controller.export_panel.dialog
var scroll := export_dialog.get_node("ExportScroll") as ScrollContainer
var ok_button := export_dialog.get_ok_button()
_check(
@ -373,21 +373,21 @@ func _run() -> void:
controller._last_export_path = ProjectSettings.globalize_path(pdf_path)
controller._show_export_done()
_check(
controller.export_done_dialog.visible,
controller.export_panel.done_dialog.visible,
"export completion dialog opens"
)
_check(
controller.export_done_label.text.contains(
controller.export_panel.done_label.text.contains(
ProjectSettings.globalize_path(pdf_path)
),
"export completion dialog shows the absolute path"
)
_check(
not controller.export_open_button.disabled
and not controller.export_folder_button.disabled,
not controller.export_panel.open_button.disabled
and not controller.export_panel.folder_button.disabled,
"export completion dialog enables open and folder buttons"
)
controller.export_done_dialog.hide()
controller.export_panel.done_dialog.hide()
DirAccess.remove_absolute(pdf_path)
_check(

View file

@ -1803,7 +1803,7 @@ func _run() -> void:
FileAccess.file_exists(controller._last_export_path),
"the comparison PDF was written"
)
controller.export_done_dialog.hide()
controller.export_panel.done_dialog.hide()
controller._on_upgrade_apply_pressed()
_check(
controller.get_season() == "2025/26",