Automated changelog | Aug 08 - Aug 17 | 28 hours (3 active days)
This changelog summarizes significant changes made between August 8th and August 17th, encompassing approximately 28 hours of development spread across three active days. The updates span multiple application layers and features, primarily focusing on enhancing the script breakdown and shot list functionalities.
I. UI Enhancements:
- Script Analytics Sidebar: A new sidebar widget was implemented to display real-time script analytics. This includes counts for scenes, words, typographical characters, and unique characters along with page estimation. The implementation leverages the
ScriptAnalyticsServiceandScriptAnalyticsmodel for data retrieval and display usingStreamBuilder. Styling is consistent with the existing application theme. - Populate Shot List Button: A new “Populate Shot List” button was added to the menu. This button triggers the
PopulateShotListActionwhich displays a confirmation dialog (PopulateShotListDialog). The dialog shows a preview of changes, with options for population modes (“Replace” or “Merge”) and the type of population (scenes only or scenes with shots using the Scene Shot Estimator (SSE)). The button’s enabled state dynamically reflects the availability of analytics data and loading status (PopulateShotListButtonStateProvider). - Populate Shot List Dialog: A confirmation dialog now presents a preview of the shot list population process. It displays how many scenes will be created or skipped, new locations added, and estimated shot counts. This dialog allows users to select between “Replace” and “Merge” modes, and also allows the selection of “scenes only” or “scenes with shots” as the population type. The dialog returns a choice (
PopulationModeandPopulationType) to the action handler (PopulateShotListAction).
II. Data Model Changes:
- ScriptAnalytics: The
ScriptAnalyticsmodel was extended to includewordCountandtypographicalCharacterCountfields to support the new analytics sidebar requirements. ThetoJson()andfromJson()methods were updated accordingly. - PopulationOptions: A new
PopulationOptionsmodel was introduced to encapsulate the choices from the population dialog. It includes fields formode(PopulationMode.replaceorPopulationMode.merge),type(PopulationType.scenesOnlyorPopulationType.scenesWithShots),createMissingLocations, andassignProductionDays.toJson()andfromJson()methods were added for serialization purposes. - PopulationPreview: A
PopulationPreviewmodel was created to represent the preview data in the confirmation dialog. It contains information about the number of scenes to create or skip, estimated shots to be created, and new locations that need to be created.toJson()andfromJson()were added for persistence. - SceneShotEstimation: This model is utilized by the
SceneShotEstimatorand now contains ashotDetailsfield as a List ofShotEstimationDetailobjects. The model also contains fields for the scene’s location, location type, and time of day, extracted from the scene heading. - ShotEstimationDetail: This model details each shot estimated by the
SceneShotEstimator. It includes a shot number, type, description, estimation reason, weight, and relevant keywords. - ScriptShotEstimation: This model represents the overall estimations for the entire script. It includes the total scenes and shots, and a list of
SceneShotEstimationfor each scene.
III. Service Layer Updates:
- ScriptAnalyticsService: The
ScriptAnalyticsServicewas enhanced to calculate and providewordCountandtypographicalCharacterCountalong with existing analytics. The implementation includes the methods_countWordsand_countTypographicalCharactersfor accurate counting, while maintaining sub-50ms update performance. - ShotListPopulationService: A new
ShotListPopulationServicewas created to handle the logic for populating the shot list. This service integrates with the existing shot list repositories (ShotListRepositoryContext) to create or update scenes and shots. The service uses the newPopulationOptionsto determine the population mode and type, and interacts with theSceneShotEstimatorfor shot generation. - Scene Shot Estimator (SSE) Enhancement and Extraction: The SSE algorithm (
SceneShotEstimator) was significantly improved to:- Generate more descriptive shot descriptions that include context from the script (action lines, dialogue, parentheticals).
- Strategically interleave coverage shots within the scene’s shot list instead of dumping them at the end.
- Differentiate coverage shot types based on the script element type that needs coverage. The logic for this improvement is detailed in
SCRIPT_EDITOR_COVERAGE_SHOTS_IMPROVEMENT_PLAN.md. - The entire SSE algorithm was extracted from
script_analyzer.dartinto its own dedicated file (scene_shot_estimator.dart).
- ScriptElementExtractor: A new utility class,
ScriptElementExtractor, was added to extractScriptElementobjects from a SuperEditorMutableDocument. This class is essential for converting the SuperEditor document data into a format usable by theShotListPopulationService.
IV. Architectural Changes:
- Improved Fountain Editor Integration: The
FountainRealtimeControllerwas modified to add smooth uppercase transformation to scene headings. This uses word boundary detection to prevent jitter during typing.