fix(settings): stabilize Settings search header height and alignment (#19241)
Merged
DR
2d ago+135+135+012345678901234567890123456789-25-25-01234567890123456789
Summary
Fixes #19241.
Fixes header height instability and alignment discrepancy when opening/closing search in Settings (SettingsDrawer).
Root Cause
Previously, _buildHeader in lib/pages/settings/settings_drawer.dart swapped between a 44 pt normal header and a 56 pt search header inside an AnimatedSwitcher. When opening search, the list beneath jumped down by 12 pt (and jumped back up when cancelled). Additionally, the search row padding was fromLTRB(OmiSpacing.md, 0, OmiSpacing.xs, OmiSpacing.xs) (16 pt left padding), sitting 4 pt off the settings cards which have 20 pt left padding (OmiSpacing.lg).
Fix Details
- Fixed both normal and search headers to a consistent
height: 48pt (SizedBox), ensuring the content below never jumps or shifts when toggling search. - Updated search header padding to
fromLTRB(OmiSpacing.lg, 0, OmiSpacing.xs, 0)so theOmiSearchFieldaligns flush at 20 pt with the settings cards.
Verification
- Added hermetic widget test in
app/test/widgets/settings/settings_search_header_stability_test.dartverifying that toggling search keeps header height strictly at 48 pt, maintains list vertical position identically, and aligns search field at 20 pt. - Added unreleased changelog fragment
app/changelog/unreleased/20261012-settings-search-header-height-fixed.json.