fix(studio): Welcome layout exception, drop awkward header, Store at slot 2 (v0.39.1)
Three fixes against the v0.39.0 user feedback. - Layout exception "BoxConstraints forces an infinite height". `_PillarRow`'s wide-window path used `Row(crossAxisAlignment: CrossAxisAlignment.stretch)` inside a `Column` inside a `SingleChildScrollView` — Row inherits unbounded height, can't stretch to anything, Flutter throws. Wrapped the Row in `IntrinsicHeight` so the Row's height is bounded to the tallest child first. Same shape `_DocsRow`'s narrow-window path was triggering with `Wrap` + `SizedBox(width: double.infinity)` — replaced with a plain `Column` for that path; the wide path keeps the Wrap with the proper finite cardWidth. - Dropped the "WIE ES ZUSAMMENPASST" / "HOW IT FITS TOGETHER" section header. Operator-feedback was that the label sounded like a question without an answer. The hero already establishes the page; the three Hub/Module/Flow cards are self-explaining beneath it. Header was visual clutter and the underlying ARB keys are gone. - Reordered the sidebar: Welcome, **Store**, Doctor, Flows, Audit, Approvals. Store is the operator's daily-use surface and belongs above Doctor (which is a diagnostics page). Welcome stays slot 0 as the first-launch landing. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
930e246649
commit
eb447c6ec0
8 changed files with 47 additions and 40 deletions
|
|
@ -52,8 +52,6 @@ class WelcomePage extends StatelessWidget {
|
|||
// path beats educational content. Auto-hides
|
||||
// once the operator dismisses it.
|
||||
_OnboardingChecklist(),
|
||||
_SectionLabel(textKey: _SectionLabelKey.pillars),
|
||||
SizedBox(height: FaiSpace.md),
|
||||
_PillarRow(),
|
||||
SizedBox(height: FaiSpace.xxl),
|
||||
_SectionLabel(textKey: _SectionLabelKey.trust),
|
||||
|
|
@ -143,7 +141,7 @@ class _Hero extends StatelessWidget {
|
|||
}
|
||||
}
|
||||
|
||||
enum _SectionLabelKey { pillars, trust, docs }
|
||||
enum _SectionLabelKey { trust, docs }
|
||||
|
||||
class _SectionLabel extends StatelessWidget {
|
||||
final _SectionLabelKey textKey;
|
||||
|
|
@ -154,7 +152,6 @@ class _SectionLabel extends StatelessWidget {
|
|||
final theme = Theme.of(context);
|
||||
final l = AppLocalizations.of(context)!;
|
||||
final text = switch (textKey) {
|
||||
_SectionLabelKey.pillars => l.welcomePillarsHeader,
|
||||
_SectionLabelKey.trust => l.welcomeTrustHeader,
|
||||
_SectionLabelKey.docs => l.welcomeDocsHeader,
|
||||
};
|
||||
|
|
@ -210,20 +207,28 @@ class _PillarRow extends StatelessWidget {
|
|||
],
|
||||
);
|
||||
}
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
for (var i = 0; i < pillars.length; i++) ...[
|
||||
if (i > 0) const SizedBox(width: FaiSpace.md),
|
||||
Expanded(
|
||||
child: _Pillar(
|
||||
icon: pillars[i].$1,
|
||||
title: pillars[i].$2,
|
||||
body: pillars[i].$3,
|
||||
// IntrinsicHeight bounds the Row's height so
|
||||
// `crossAxisAlignment: stretch` has something to
|
||||
// stretch against. Without it the Row inherits the
|
||||
// unbounded height of the surrounding
|
||||
// `SingleChildScrollView` and Flutter throws
|
||||
// "BoxConstraints forces an infinite height".
|
||||
return IntrinsicHeight(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
for (var i = 0; i < pillars.length; i++) ...[
|
||||
if (i > 0) const SizedBox(width: FaiSpace.md),
|
||||
Expanded(
|
||||
child: _Pillar(
|
||||
icon: pillars[i].$1,
|
||||
title: pillars[i].$2,
|
||||
body: pillars[i].$3,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
@ -683,8 +688,21 @@ class _DocsRow extends StatelessWidget {
|
|||
LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
final twoCols = constraints.maxWidth >= 640;
|
||||
final cardWidth =
|
||||
twoCols ? (constraints.maxWidth - FaiSpace.md) / 2 : double.infinity;
|
||||
// Narrow windows stack to a single column. Putting
|
||||
// `width: double.infinity` SizedBoxes into a Wrap
|
||||
// breaks Wrap's intrinsic-width math; a Column with
|
||||
// unconstrained child widths is the correct fit.
|
||||
if (!twoCols) {
|
||||
return Column(
|
||||
children: [
|
||||
for (var i = 0; i < _kDocs.length; i++) ...[
|
||||
if (i > 0) const SizedBox(height: FaiSpace.md),
|
||||
_DocCard(entry: _kDocs[i]),
|
||||
],
|
||||
],
|
||||
);
|
||||
}
|
||||
final cardWidth = (constraints.maxWidth - FaiSpace.md) / 2;
|
||||
return Wrap(
|
||||
spacing: FaiSpace.md,
|
||||
runSpacing: FaiSpace.md,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue