Skip to content

Commit bfe44fb

Browse files
committed
Update-all table: keep columns aligned when a row says Go to tab
The wider "Go to tab" button shifted that row's Status and Details columns left. The button now sits in a fixed-width slot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Faq4edqhkSFNm9LMD8KnUP
1 parent ac275f0 commit bfe44fb

1 file changed

Lines changed: 40 additions & 25 deletions

File tree

‎flutter/lib/welcome/folder_update_view.dart‎

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,7 @@ class _FilterBar extends StatelessWidget {
321321
final b = context.branchi;
322322
final statuses = [
323323
for (final status in _statusLabelKeys.keys)
324-
if (controller.countOf(status) > 0 || selected.contains(status))
325-
status,
324+
if (controller.countOf(status) > 0 || selected.contains(status)) status,
326325
];
327326
return Wrap(
328327
spacing: 8,
@@ -340,8 +339,10 @@ class _FilterBar extends StatelessWidget {
340339
isDense: true,
341340
hintText: translate('folder_update_search_hint'),
342341
prefixIcon: const Icon(Icons.search, size: 16),
343-
prefixIconConstraints:
344-
const BoxConstraints(minWidth: 32, minHeight: 32),
342+
prefixIconConstraints: const BoxConstraints(
343+
minWidth: 32,
344+
minHeight: 32,
345+
),
345346
contentPadding: const EdgeInsets.symmetric(vertical: 8),
346347
border: OutlineInputBorder(
347348
borderRadius: BorderRadius.circular(6),
@@ -421,7 +422,7 @@ class _RepoTable extends StatelessWidget {
421422
style: headerStyle,
422423
),
423424
),
424-
const SizedBox(width: 80),
425+
const SizedBox(width: 8 + _actionWidth),
425426
],
426427
),
427428
),
@@ -466,27 +467,38 @@ class _RepoTable extends StatelessWidget {
466467
),
467468
),
468469
const SizedBox(width: 8),
469-
if (isRepositoryOpen(repo.path))
470-
// Already open in a tab: the button switches to it.
471-
FilledButton.tonalIcon(
472-
onPressed: () => onOpenRepository(repo.path),
473-
style: FilledButton.styleFrom(
474-
minimumSize: const Size(0, 30),
475-
padding: const EdgeInsets.symmetric(horizontal: 10),
476-
),
477-
icon: const Icon(Icons.tab, size: 14),
478-
label: Text(translate('folder_update_go_to_tab')),
479-
)
480-
else
481-
OutlinedButton.icon(
482-
onPressed: () => onOpenRepository(repo.path),
483-
style: OutlinedButton.styleFrom(
484-
minimumSize: const Size(0, 30),
485-
padding: const EdgeInsets.symmetric(horizontal: 10),
486-
),
487-
icon: const Icon(Icons.open_in_new, size: 14),
488-
label: Text(translate('folder_update_open')),
470+
// Fixed width, so "Open" and the wider "Go to tab" keep
471+
// the columns lined up.
472+
SizedBox(
473+
width: _actionWidth,
474+
child: Align(
475+
alignment: AlignmentDirectional.centerEnd,
476+
// Already open in a tab: the button switches to it.
477+
child: isRepositoryOpen(repo.path)
478+
? FilledButton.tonalIcon(
479+
onPressed: () => onOpenRepository(repo.path),
480+
style: FilledButton.styleFrom(
481+
minimumSize: const Size(0, 30),
482+
padding: const EdgeInsets.symmetric(
483+
horizontal: 10,
484+
),
485+
),
486+
icon: const Icon(Icons.tab, size: 14),
487+
label: Text(translate('folder_update_go_to_tab')),
488+
)
489+
: OutlinedButton.icon(
490+
onPressed: () => onOpenRepository(repo.path),
491+
style: OutlinedButton.styleFrom(
492+
minimumSize: const Size(0, 30),
493+
padding: const EdgeInsets.symmetric(
494+
horizontal: 10,
495+
),
496+
),
497+
icon: const Icon(Icons.open_in_new, size: 14),
498+
label: Text(translate('folder_update_open')),
499+
),
489500
),
501+
),
490502
],
491503
),
492504
),
@@ -572,3 +584,6 @@ class _StatusLabel extends StatelessWidget {
572584
);
573585
}
574586
}
587+
588+
/// Width of the Open / Go to tab button column in the repository table.
589+
const double _actionWidth = 120;

0 commit comments

Comments
 (0)