fix(studio): centre Welcome page content on wide windows
Some checks failed
Security / Security check (push) Failing after 2s
Some checks failed
Security / Security check (push) Failing after 2s
Welcome page used ConstrainedBox(maxWidth: 960) inside a left-aligned Column, so on the 1440x900 default window the content hugged the left edge and left ~370 px of empty space on the right. With Stefan's M4 sidebar collapsed to 72 px the asymmetry was the dominant visual in the first thing every operator sees. Wrap the ConstrainedBox in a Center widget. 960 px stays an opinionated reading width — long-form prose gets uncomfortable past ~1100 px — but the slack now splits evenly so the content sits with ~190 px breathing room on both sides instead of all on one. Bumps the editor-package lock pointer to ad2e5b5 (same 0.2.2 version, picks up the extract-with-approval test commit on top of f8138f3) as a side-effect of the flutter pub upgrade run during verification. Version 0.52.2 -> 0.52.3. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
36ddac2017
commit
f1b0f65c86
4 changed files with 51 additions and 56 deletions
|
|
@ -26,7 +26,7 @@ import 'widgets/widgets.dart';
|
||||||
/// Studio's own build version. Bump on every UI commit so the
|
/// Studio's own build version. Bump on every UI commit so the
|
||||||
/// running app self-identifies — visible in the sidebar header
|
/// running app self-identifies — visible in the sidebar header
|
||||||
/// and quick-glance proof that you're seeing the current build.
|
/// and quick-glance proof that you're seeing the current build.
|
||||||
const String kStudioVersion = '0.52.2';
|
const String kStudioVersion = '0.52.3';
|
||||||
|
|
||||||
Future<void> main() async {
|
Future<void> main() async {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,7 @@ class WelcomePage extends StatelessWidget {
|
||||||
final l = AppLocalizations.of(context)!;
|
final l = AppLocalizations.of(context)!;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: theme.scaffoldBackgroundColor,
|
backgroundColor: theme.scaffoldBackgroundColor,
|
||||||
appBar: AppBar(
|
appBar: AppBar(titleSpacing: FaiSpace.xl, title: Text(l.navWelcome)),
|
||||||
titleSpacing: FaiSpace.xl,
|
|
||||||
title: Text(l.navWelcome),
|
|
||||||
),
|
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(
|
padding: const EdgeInsets.fromLTRB(
|
||||||
|
|
@ -41,6 +38,15 @@ class WelcomePage extends StatelessWidget {
|
||||||
FaiSpace.xl,
|
FaiSpace.xl,
|
||||||
FaiSpace.xxl,
|
FaiSpace.xxl,
|
||||||
),
|
),
|
||||||
|
// Center the 960-px content column on wide windows
|
||||||
|
// so the right margin matches the left rather than
|
||||||
|
// dumping all the slack onto one side. 960 px stays
|
||||||
|
// an opinionated reading width — long-form prose
|
||||||
|
// gets uncomfortable past ~1100 px — but on Stefan's
|
||||||
|
// 1440-px default it now sits with ~190 px of
|
||||||
|
// breathing room on both sides instead of 380 px
|
||||||
|
// on the right and 20 px on the left.
|
||||||
|
child: Center(
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: const BoxConstraints(maxWidth: 960),
|
constraints: const BoxConstraints(maxWidth: 960),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
@ -66,6 +72,7 @@ class WelcomePage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -175,11 +182,7 @@ class _PillarRow extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final l = AppLocalizations.of(context)!;
|
final l = AppLocalizations.of(context)!;
|
||||||
final pillars = <(IconData, String, String)>[
|
final pillars = <(IconData, String, String)>[
|
||||||
(
|
(Icons.hub_outlined, l.welcomePillarHubTitle, l.welcomePillarHubBody),
|
||||||
Icons.hub_outlined,
|
|
||||||
l.welcomePillarHubTitle,
|
|
||||||
l.welcomePillarHubBody,
|
|
||||||
),
|
|
||||||
(
|
(
|
||||||
Icons.extension_outlined,
|
Icons.extension_outlined,
|
||||||
l.welcomePillarModuleTitle,
|
l.welcomePillarModuleTitle,
|
||||||
|
|
@ -240,11 +243,7 @@ class _Pillar extends StatelessWidget {
|
||||||
final String title;
|
final String title;
|
||||||
final String body;
|
final String body;
|
||||||
|
|
||||||
const _Pillar({
|
const _Pillar({required this.icon, required this.title, required this.body});
|
||||||
required this.icon,
|
|
||||||
required this.title,
|
|
||||||
required this.body,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
@ -441,7 +440,9 @@ class _OnboardingChecklistState extends State<_OnboardingChecklist> {
|
||||||
// Vorher haben wir den Modul-Namen geprüft und damit
|
// Vorher haben wir den Modul-Namen geprüft und damit
|
||||||
// nie gematcht, obwohl text-extract / text-summarize /
|
// nie gematcht, obwohl text-extract / text-summarize /
|
||||||
// text-translate installiert waren.
|
// text-translate installiert waren.
|
||||||
.then((m) => m.any((x) => x.capabilities.any((c) => c.startsWith('text.'))))
|
.then(
|
||||||
|
(m) => m.any((x) => x.capabilities.any((c) => c.startsWith('text.'))),
|
||||||
|
)
|
||||||
.catchError((_) => false);
|
.catchError((_) => false);
|
||||||
final flow = hub
|
final flow = hub
|
||||||
.recentEvents(limit: 100)
|
.recentEvents(limit: 100)
|
||||||
|
|
@ -527,10 +528,7 @@ class _OnboardingChecklistState extends State<_OnboardingChecklist> {
|
||||||
children: [
|
children: [
|
||||||
for (var i = 0; i < items.length; i++) ...[
|
for (var i = 0; i < items.length; i++) ...[
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
Divider(
|
Divider(height: 1, color: theme.colorScheme.outlineVariant),
|
||||||
height: 1,
|
|
||||||
color: theme.colorScheme.outlineVariant,
|
|
||||||
),
|
|
||||||
_ChecklistRow(
|
_ChecklistRow(
|
||||||
done: items[i].$1,
|
done: items[i].$1,
|
||||||
title: items[i].$2,
|
title: items[i].$2,
|
||||||
|
|
@ -568,9 +566,7 @@ class _AllDoneCelebration extends StatelessWidget {
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: FaiColors.success.withValues(alpha: 0.08),
|
color: FaiColors.success.withValues(alpha: 0.08),
|
||||||
borderRadius: BorderRadius.circular(FaiRadius.md),
|
borderRadius: BorderRadius.circular(FaiRadius.md),
|
||||||
border: Border.all(
|
border: Border.all(color: FaiColors.success.withValues(alpha: 0.35)),
|
||||||
color: FaiColors.success.withValues(alpha: 0.35),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
|
@ -1033,7 +1029,11 @@ class _DocReaderSheetState extends State<_DocReaderSheet> {
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(widget.entry.icon, size: 20, color: theme.colorScheme.primary),
|
Icon(
|
||||||
|
widget.entry.icon,
|
||||||
|
size: 20,
|
||||||
|
color: theme.colorScheme.primary,
|
||||||
|
),
|
||||||
const SizedBox(width: FaiSpace.sm),
|
const SizedBox(width: FaiSpace.sm),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|
@ -1065,8 +1065,7 @@ class _DocReaderSheetState extends State<_DocReaderSheet> {
|
||||||
}
|
}
|
||||||
if (snap.hasError) {
|
if (snap.hasError) {
|
||||||
final err = snap.error;
|
final err = snap.error;
|
||||||
final structured =
|
final structured = err is _DocReaderError ? err : null;
|
||||||
err is _DocReaderError ? err : null;
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(FaiSpace.xxl),
|
padding: const EdgeInsets.all(FaiSpace.xxl),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
@ -1079,11 +1078,7 @@ class _DocReaderSheetState extends State<_DocReaderSheet> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: FaiSpace.sm),
|
const SizedBox(height: FaiSpace.sm),
|
||||||
FaiErrorBox(
|
FaiErrorBox(error: err, isError: true, maxHeight: 200),
|
||||||
error: err,
|
|
||||||
isError: true,
|
|
||||||
maxHeight: 200,
|
|
||||||
),
|
|
||||||
if (structured != null) ...[
|
if (structured != null) ...[
|
||||||
const SizedBox(height: FaiSpace.md),
|
const SizedBox(height: FaiSpace.md),
|
||||||
TextButton.icon(
|
TextButton.icon(
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ packages:
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: main
|
ref: main
|
||||||
resolved-ref: f8138f3516098dc03e65fdfa52916885e7e7aeff
|
resolved-ref: ad2e5b50d5201c9b97329b02e2223d6e599545f1
|
||||||
url: "https://git.flemming.ai/fai/studio-flow-editor"
|
url: "https://git.flemming.ai/fai/studio-flow-editor"
|
||||||
source: git
|
source: git
|
||||||
version: "0.2.2"
|
version: "0.2.2"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
name: fai_studio
|
name: fai_studio
|
||||||
description: "F∆I Studio — desktop GUI for the F∆I hub"
|
description: "F∆I Studio — desktop GUI for the F∆I hub"
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
version: 0.52.2
|
version: 0.52.3
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.11.0-200.1.beta
|
sdk: ^3.11.0-200.1.beta
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue