ui(desktop shopinbit): clean up look and feel
What changed, and why it matters
This commit is a purely cosmetic user-interface update for the desktop ShopInBit setup screen. It swaps some visual widgets, removes an unused focus highlight, adjusts padding and layout, and makes the dialog height adapt to the window size. There is no security-relevant change.
No security action needed; this is a routine UI polish commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies a single Flutter Dart file for the desktop ShopInBit view. Changes include: replacing Expanded with Flexible, adding RoundedContainer/AdaptiveTextField imports, removing a FocusNode listener, switching from TextField to AdaptiveTextField, restyling labels, and making the dialog maxHeight depend on MediaQuery size. No logic affecting cryptography, key handling, network calls, authentication, input validation, or data storage is changed.
Changed components
lib/pages_desktop_specific/more_view/sub_widgets/desktop_shopinbit_view.dartInspect captured patch +50 / −33
diff --git a/lib/pages_desktop_specific/more_view/sub_widgets/desktop_shopinbit_view.dart b/lib/pages_desktop_specific/more_view/sub_widgets/desktop_shopinbit_view.dart
index d698379..e5c9e59 100644
--- a/lib/pages_desktop_specific/more_view/sub_widgets/desktop_shopinbit_view.dart
+++ b/lib/pages_desktop_specific/more_view/sub_widgets/desktop_shopinbit_view.dart
@@ -21,7 +21,9 @@ import '../../../widgets/desktop/desktop_dialog.dart';
import '../../../widgets/desktop/desktop_dialog_close_button.dart';
import '../../../widgets/desktop/primary_button.dart';
import '../../../widgets/desktop/secondary_button.dart';
+import '../../../widgets/rounded_container.dart';
import '../../../widgets/rounded_white_container.dart';
+import '../../../widgets/textfields/adaptive_text_field.dart';
import '../../desktop_menu.dart';
import '../../settings/settings_menu.dart';
@@ -383,7 +385,6 @@ class _ShopInBitDesktopSetupDialogState
extends State<_ShopInBitDesktopSetupDialog> {
late final Future<String> _keyFuture;
late final TextEditingController _nameController;
- late final FocusNode _nameFocusNode;
bool get _canContinue => _nameController.text.trim().isNotEmpty;
@@ -393,17 +394,11 @@ class _ShopInBitDesktopSetupDialogState
_keyFuture = ShopInBitService.instance.ensureCustomerKey();
final existingName = ShopInBitService.instance.loadDisplayName();
_nameController = TextEditingController(text: existingName ?? '');
- _nameFocusNode = FocusNode();
-
- _nameFocusNode.addListener(() {
- setState(() {});
- });
}
@override
void dispose() {
_nameController.dispose();
- _nameFocusNode.dispose();
super.dispose();
}
@@ -419,10 +414,13 @@ class _ShopInBitDesktopSetupDialogState
@override
Widget build(BuildContext context) {
+ final maxDialogHeight = MediaQuery.sizeOf(context).height - 64;
return DesktopDialog(
maxWidth: 580,
- maxHeight: 500,
+ maxHeight: maxDialogHeight,
child: Column(
+ mainAxisSize: .min,
+ crossAxisAlignment: .stretch,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -437,17 +435,17 @@ class _ShopInBitDesktopSetupDialogState
const DesktopDialogCloseButton(),
],
),
- Expanded(
+ Flexible(
child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16),
+ padding: const EdgeInsets.symmetric(horizontal: 32),
child: Column(
- crossAxisAlignment: CrossAxisAlignment.stretch,
+ mainAxisSize: .min,
+ crossAxisAlignment: .stretch,
children: [
+ const SizedBox(height: 16),
Text(
"Your Customer Key",
- style: STextStyles.desktopTextSmall(
- context,
- ).copyWith(fontWeight: FontWeight.bold),
+ style: STextStyles.w600_20(context),
),
const SizedBox(height: 8),
Text(
@@ -464,19 +462,29 @@ class _ShopInBitDesktopSetupDialogState
return const Center(child: CircularProgressIndicator());
}
if (snapshot.hasError) {
- return Text(
- "Failed to generate key. Please try again.",
- style: STextStyles.desktopTextSmall(context).copyWith(
- color: Theme.of(
- context,
- ).extension<StackColors>()!.textError,
+ return RoundedContainer(
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.warningBackground,
+ child: Text(
+ "Failed to generate key. Please try again.",
+ style: STextStyles.label700(context).copyWith(
+ color: Theme.of(
+ context,
+ ).extension<StackColors>()!.warningForeground,
+ fontSize: 14,
+ ),
),
);
}
final key = snapshot.data!;
return RoundedWhiteContainer(
+ borderColor: Theme.of(
+ context,
+ ).extension<StackColors>()!.textSubtitle6,
child: Row(
children: [
+ const SizedBox(width: 10),
Expanded(
child: SelectableText(
key,
@@ -504,24 +512,33 @@ class _ShopInBitDesktopSetupDialogState
const SizedBox(height: 24),
Text(
"Display Name",
- style: STextStyles.desktopTextSmall(
- context,
- ).copyWith(fontWeight: FontWeight.bold),
+ style: STextStyles.desktopTextExtraExtraSmall(context)
+ .copyWith(
+ color: Theme.of(context)
+ .extension<StackColors>()!
+ .textFieldActiveSearchIconRight,
+ ),
),
const SizedBox(height: 8),
- TextField(
+ AdaptiveTextField(
controller: _nameController,
- focusNode: _nameFocusNode,
- onChanged: (_) => setState(() {}),
- style: STextStyles.desktopTextSmall(context),
- decoration: const InputDecoration(hintText: "Display name"),
+ showPasteClearButton: true,
+ maxLines: 1,
+ onChangedComprehensive: (_) => setState(() {}),
),
- const Spacer(),
- PrimaryButton(
- label: "Complete Setup",
- enabled: _canContinue,
- onPressed: _canContinue ? _completeSetup : null,
+ const SizedBox(height: 40),
+ Row(
+ mainAxisAlignment: .end,
+ children: [
+ PrimaryButton(
+ label: "Complete Setup",
+ enabled: _canContinue,
+ onPressed: _canContinue ? _completeSetup : null,
+ horizontalContentPadding: 20,
+ ),
+ ],
),
+ const SizedBox(height: 32),
],
),
),
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.