[Feature] Split export_dialog.dart before it breaks the file-size gate #514

Closed
opened 2026-07-22 09:28:23 +00:00 by brenno · 0 comments
Owner

lib/widgets/dialogs/export_dialog.dart is at 999 lines. tool/check_conventions.dart caps files in lib/ at 1000 with an empty baseline, so the next addition to this dialog fails make check — and whoever makes that addition will be tempted to raise the baseline instead of splitting.

Do not raise the baseline. The established pattern here is a part extension; see how deck_provider.dart and markdown_service_parse.dart were split (use currentState rather than state in the part where that applies).

Natural seams, each self-contained:

  • the selectors (_depthSelector, _profileSelector)
  • the notices (_manifestNotice, _privacyCaveat, _aiDraftNotice)
  • the readiness/quality banners

A plausible home is lib/widgets/dialogs/parts/export_dialog_sections.dart, as a part of the same library.

Verify with make check-conventions, test/export_dialog_test.dart and test/export_dialog_smoke_test.dart. No behaviour change.

`lib/widgets/dialogs/export_dialog.dart` is at **999 lines**. `tool/check_conventions.dart` caps files in `lib/` at 1000 with an empty baseline, so the next addition to this dialog fails `make check` — and whoever makes that addition will be tempted to raise the baseline instead of splitting. **Do not raise the baseline.** The established pattern here is a `part` extension; see how `deck_provider.dart` and `markdown_service_parse.dart` were split (use `currentState` rather than `state` in the part where that applies). Natural seams, each self-contained: - the selectors (`_depthSelector`, `_profileSelector`) - the notices (`_manifestNotice`, `_privacyCaveat`, `_aiDraftNotice`) - the readiness/quality banners A plausible home is `lib/widgets/dialogs/parts/export_dialog_sections.dart`, as a part of the same library. Verify with `make check-conventions`, `test/export_dialog_test.dart` and `test/export_dialog_smoke_test.dart`. No behaviour change.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
LibreKAT/Ocideck#514
No description provided.