feat: add titleSuffix and inlineActions to MagicStarterPageHeader#25
Merged
anilcancakir merged 3 commits intomainfrom Apr 7, 2026
Merged
Conversation
- titleSuffix (Widget?) renders inline after the title column inside the title+leading row — uses if-spread pattern, no SizedBox fallback - inlineActions (bool, default false) forces single-row layout on all screen sizes by switching outer WDiv from flex-col sm:flex-row to flex-row items-center justify-between Closes #24
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds two new customization points to MagicStarterPageHeader to better support detail-view headers (e.g., inline status badges and always-inline actions on mobile), along with tests and documentation updates.
Changes:
- Added
titleSuffix: Widget?to render an inline widget after the title column. - Added
inlineActions: boolto force a single-row header layout across all breakpoints. - Updated docs and CHANGELOG; extended widget tests for the new behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| lib/src/ui/widgets/magic_starter_page_header.dart | Introduces titleSuffix and inlineActions and updates header layout classes accordingly. |
| test/ui/widgets/magic_starter_page_header_test.dart | Adds new widget tests covering titleSuffix and inlineActions behavior. |
| doc/basics/views-and-layouts.md | Documents the new parameters and provides a detail-view usage example. |
| CHANGELOG.md | Notes the new MagicStarterPageHeader features under Unreleased. |
Comments suppressed due to low confidence (1)
lib/src/ui/widgets/magic_starter_page_header.dart:48
- When
inlineActionsis true, the outer container isflex-rowon small screens, but the left (title/leading) row only becomes flexible atsm:(sm:flex-1). On mobile this can prevent the title column from receiving a width constraint (sotruncatewon’t behave) and can cause the actions to overflow off-screen. Consider making the left rowflex-1(not onlysm:flex-1) wheninlineActionsis enabled so the title can shrink/truncate and the actions stay visible.
className: inlineActions
? 'w-full flex flex-row items-center justify-between gap-4 p-2 lg:p-4 border-b border-gray-200 dark:border-gray-700'
: 'w-full flex flex-col sm:flex-row items-start sm:items-center sm:justify-between gap-4 p-2 lg:p-4 border-b border-gray-200 dark:border-gray-700',
children: [
WDiv(
className: 'flex flex-row items-center gap-3 sm:flex-1 min-w-0',
children: [
…est, Wind UI doc example - Wrap titleSuffix in WDiv(className: 'flex-shrink-0') to prevent badge compression in tight layouts - Replace vacuous null test with WDiv count assertion (3 WDivs when no suffix, confirming no wrapper is rendered) - Replace Material IconButton in doc example with WButton/WText per Wind UI convention
Inner title row uses flex-1 (no sm: prefix) when inlineActions is true so the title claims available space at all screen sizes, not just sm+.
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
titleSuffix(Widget?) — renders inline after the title column inside the title+leading row (e.g. status badges)inlineActions(bool, defaultfalse) — forces single-row layout on all screen sizes, no mobile stackingTest plan
flutter analyze: 0 issuesCloses #24