feat(appbar): rework LdAppBar with wrapper-based composition (Issue #91)#98
Merged
ElectricCookie merged 11 commits intoMay 15, 2026
Merged
Conversation
…Tree API - Use buildMonkeyRouteTree/MonkeyRouteNode for nested project/file routes - Update repositoryBuilder signatures to accept (context, state) - Remove manual Provider/ShellRoute nesting in AppRouter - Add MonkeyRouteScope and MonkeyRouteTree helpers - Update monkey tests and example app patterns
…(Stage 1) - Create LdAppBarMetrics immutable value object with position, barHeight, edgeMargin, hideOffset, isScrolledUnder, level fields - Add consumedInsets computed getter for 4-directional EdgeInsets - Re-export LdAppBarPosition from appbar_state.dart via index.dart - Add unit tests for value equality, consumedInsets, and copyWith Part of issue #91 — Stage 1 (#92)
- Add wrappedChild and scrollBehavior params to AppBarFrame - Stack-mode: wraps child in Stack with Positioned bar surface, Transform.translate for scroll-hide, NotificationListener for scroll tracking - Provides LdAppBarMetrics via Provider.value to wrapped subtree - Patches MediaQuery.padding additively with consumedInsets - Resolves level from nearest ancestor LdAppBarMetrics context - Legacy-mode preserved for backward compat until Stage 3 - Add 9 widget tests in appbar_frame_test.dart Part of issue #91 — Stage 2 (#93)
…ge 3) - Add child: Widget? parameter to LdAppBar, LdTabNavigation (stack-mode) - Deprecate order parameter (kept as no-op for backward compat) - Remove LdAppBarRegistryEntry and LdAppBarScrollWrapper from stack-mode path - Delegate to AppBarFrame(wrappedChild: child) when child is provided - Add insideDecorationBuilder/outsideDecorationBuilder to AppBarFrame for reactive scroll-under decoration - closeModalButton uses LdAppBarMetrics from context in stack-mode - Legacy-mode (no child) preserved for backward compat until Stage 4 - Update appbar_test.dart and tab_navigation_test.dart to new API - 22/22 appbar tests, 14/14 tab_navigation tests pass Part of issue #91 — Stage 3 (#94)
…ars (Stage 4) - Remove AppBarRegistry widget and bodyPadding ValueListenableBuilder from build() - Remove Stack with appBars.reversed children; body now rendered directly - Remove appbar_registry.dart import from scaffold.dart - Deprecate appBars param (kept as no-op for ~60 call sites awaiting Stage 6) - Body bars now use wrapper pattern: LdAppBar(child: body) - Update scaffold_test.dart: migrate 3 tests to wrapper API, add 3 new tests - 17/17 scaffold tests pass Part of issue #91 — Stage 4 (#95)
…and drawer buttons (Stage 5) - Delete appbar_registry.dart, appbar_scroll_wrapper.dart, scaffold_layout_state.dart - ScrolledUnderBuilder simplified to StatelessWidget reading LdAppBarMetrics? from context - OpenDrawerButton and CloseDrawerButton use LdAppBarMetrics for level/position check - Remove LdDrawerLayout widget-type ancestor check (LdDrawerSlot provider is sufficient) - Remove remaining legacy-mode registry/scroll_wrapper code from appbar.dart and tab_navigation.dart - Export appbar_scroll_behavior.dart from index.dart - 27/27 appbar tests pass, 0 analysis errors Part of issue #91 — Stage 5 (#96)
…ldens (Stage 6) - Migrate LdMonkeyAppBar to accept child parameter, forward to LdAppBar - Migrate all internal library files to wrapper pattern: - exception_dialog.dart, time_picker.dart, date_picker.dart - choose/choose.dart, modal/utils.dart (both usages) - devtools extension main.dart - Migrate all example app files (agent partial work from prior run) - Rewrite appbar_golden_test.dart, scaffold_golden_test.dart, tab_navigation_golden_test.dart, modal_golden_test.dart to new API - Migrate modal_test.dart to new wrapper pattern - Regenerate all golden images with new Stack-based layout - Zero analysis errors; pre-existing test failures (list_test, repository_test, time_picker_test) are unrelated to this change Completes issue #91 — Stage 6 (#97)
…ample formatting - consumedInsets now subtracts edgeMargin from the visible height instead of adding it, so nested bars no longer double-count ancestor insets - Move MeasureSize outside AnimatedContainer so bar height is measured after layout, preventing spurious padding in stacked bars - Update appbar_state_test.dart expectations to match corrected formula - Add regression test: nested same-position bars should not add an extra gap - Fix LdOrb dispose order (super.dispose() before controller.dispose()) - Reformat example files (chemical_screen, component_well, demo_code_dialog, drawer) to correct indentation after LdScaffoldBody child extraction - Remove unused flutter/services and liquid/main.dart imports from drawer.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
melos run analyze— no analysis errorsmelos run test— all tests pass including new nested-bar padding regression testFixes #91
Generated with Claude Code