Skip to content

Commit f2b71f9

Browse files
LynxLynxxemiridedt-iohk
authored
chore(cat-voices): revert firefox input workaround (#3300)
* chore: revert firefox input workaround * fix: account page * fix: layout --------- Co-authored-by: Emir Hodzic <[email protected]> Co-authored-by: Dominik Toton <[email protected]>
1 parent bd704cd commit f2b71f9

File tree

4 files changed

+104
-120
lines changed

4 files changed

+104
-120
lines changed

catalyst_voices/apps/voices/lib/pages/account/account_page.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class _AccountPageState extends State<AccountPage>
6161
key: ValueKey('AccountOverviewGrid'),
6262
children: [
6363
AccountHeaderTile(),
64-
Spacer(),
6564
],
6665
),
6766
ResponsiveChild(
@@ -72,8 +71,8 @@ class _AccountPageState extends State<AccountPage>
7271
key: const ValueKey('AccountDetailsGrid'),
7372
children: [
7473
const AccountUsernameTile(),
75-
const AccountRolesTile(),
7674
const AccountEmailTile(),
75+
const AccountRolesTile(),
7776
AccountKeychainTile(
7877
key: const Key('AccountKeychainTile'),
7978
onRemoveTap: _removeActiveKeychain,

catalyst_voices/apps/voices/lib/widgets/modals/voices_alert_dialog.dart

Lines changed: 57 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -58,72 +58,67 @@ class VoicesAlertDialog extends StatelessWidget {
5858
xs: const BoxConstraints(),
5959
sm: const BoxConstraints(maxWidth: 360),
6060
builder: (context, constraints) {
61-
// TODO(dt-iohk): remove SelectionArea when https://github.com/flutter/flutter/pull/167275
62-
// is released and we're using this flutter version
63-
// Note: fix scheduled for 3.34.x / 3.35.x flutter version
64-
return SelectionArea(
65-
child: Dialog(
66-
alignment: Alignment.center,
67-
constraints: constraints,
68-
child: Column(
69-
key: const Key('VoicesAlertDialog'),
70-
mainAxisSize: MainAxisSize.min,
71-
crossAxisAlignment: CrossAxisAlignment.stretch,
72-
children: [
73-
const SizedBox(height: 10),
74-
if (title != null || isDismissible)
75-
_Title(title: title, isDismissible: isDismissible),
76-
if (icon != null)
77-
Padding(
78-
padding: EdgeInsets.only(
79-
top: title != null ? 24 : 0,
80-
left: 20,
81-
right: 20,
82-
),
83-
child: Center(child: icon),
61+
return Dialog(
62+
alignment: Alignment.center,
63+
constraints: constraints,
64+
child: Column(
65+
key: const Key('VoicesAlertDialog'),
66+
mainAxisSize: MainAxisSize.min,
67+
crossAxisAlignment: CrossAxisAlignment.stretch,
68+
children: [
69+
const SizedBox(height: 10),
70+
if (title != null || isDismissible)
71+
_Title(title: title, isDismissible: isDismissible),
72+
if (icon != null)
73+
Padding(
74+
padding: EdgeInsets.only(
75+
top: title != null ? 24 : 0,
76+
left: 20,
77+
right: 20,
8478
),
85-
if (subtitle != null)
86-
Padding(
87-
padding: const EdgeInsets.only(
88-
top: 16,
89-
left: 20,
90-
right: 20,
91-
),
92-
child: DefaultTextStyle(
93-
key: const Key('VoicesAlertDialogSubtitle'),
94-
style: Theme.of(context).textTheme.titleSmall!,
95-
textAlign: TextAlign.center,
96-
child: subtitle,
97-
),
79+
child: Center(child: icon),
80+
),
81+
if (subtitle != null)
82+
Padding(
83+
padding: const EdgeInsets.only(
84+
top: 16,
85+
left: 20,
86+
right: 20,
9887
),
99-
if (content != null)
100-
Padding(
101-
padding: const EdgeInsets.only(
102-
top: 16,
103-
left: 20,
104-
right: 20,
105-
),
106-
child: DefaultTextStyle(
107-
style: Theme.of(context).textTheme.bodyMedium!,
108-
textAlign: TextAlign.center,
109-
child: content,
110-
),
88+
child: DefaultTextStyle(
89+
key: const Key('VoicesAlertDialogSubtitle'),
90+
style: Theme.of(context).textTheme.titleSmall!,
91+
textAlign: TextAlign.center,
92+
child: subtitle,
11193
),
112-
if (buttons.isNotEmpty)
113-
Padding(
114-
padding: const EdgeInsets.symmetric(horizontal: 20),
115-
child: Column(
116-
mainAxisSize: MainAxisSize.min,
117-
crossAxisAlignment: CrossAxisAlignment.stretch,
118-
children: [
119-
const SizedBox(height: 24),
120-
...buttons.separatedBy(const SizedBox(height: 8)),
121-
],
122-
),
94+
),
95+
if (content != null)
96+
Padding(
97+
padding: const EdgeInsets.only(
98+
top: 16,
99+
left: 20,
100+
right: 20,
123101
),
124-
const SizedBox(height: 16),
125-
],
126-
),
102+
child: DefaultTextStyle(
103+
style: Theme.of(context).textTheme.bodyMedium!,
104+
textAlign: TextAlign.center,
105+
child: content,
106+
),
107+
),
108+
if (buttons.isNotEmpty)
109+
Padding(
110+
padding: const EdgeInsets.symmetric(horizontal: 20),
111+
child: Column(
112+
mainAxisSize: MainAxisSize.min,
113+
crossAxisAlignment: CrossAxisAlignment.stretch,
114+
children: [
115+
const SizedBox(height: 24),
116+
...buttons.separatedBy(const SizedBox(height: 8)),
117+
],
118+
),
119+
),
120+
const SizedBox(height: 16),
121+
],
127122
),
128123
);
129124
},

catalyst_voices/apps/voices/lib/widgets/modals/voices_panel_dialog.dart

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -31,43 +31,38 @@ class VoicesPanelDialog extends StatelessWidget {
3131

3232
@override
3333
Widget build(BuildContext context) {
34-
// TODO(dt-iohk): remove SelectionArea when https://github.com/flutter/flutter/pull/167275
35-
// is released and we're using this flutter version
36-
// Note: fix scheduled for 3.34.x / 3.35.x flutter version
37-
return SelectionArea(
38-
child: ResponsiveBuilder.fromResponsive(
39-
responsive: constraints,
40-
builder: (context, constraints) {
41-
return Dialog(
42-
shape: showBorder
43-
? RoundedRectangleBorder(
44-
borderRadius: BorderRadius.circular(12),
45-
side: BorderSide(
46-
color: Theme.of(context).colors.outlineBorderVariant,
47-
),
48-
)
49-
: Theme.of(context).dialogTheme.shape,
50-
backgroundColor: backgroundColor,
51-
alignment: Alignment.center,
52-
insetPadding: insetPadding,
53-
constraints: constraints,
54-
child: Stack(
55-
fit: StackFit.passthrough,
56-
children: [
57-
child,
58-
Positioned(
59-
top: 0,
60-
right: 0,
61-
child: Offstage(
62-
offstage: !showClose,
63-
child: const _CloseButton(),
34+
return ResponsiveBuilder.fromResponsive(
35+
responsive: constraints,
36+
builder: (context, constraints) {
37+
return Dialog(
38+
shape: showBorder
39+
? RoundedRectangleBorder(
40+
borderRadius: BorderRadius.circular(12),
41+
side: BorderSide(
42+
color: Theme.of(context).colors.outlineBorderVariant,
6443
),
44+
)
45+
: Theme.of(context).dialogTheme.shape,
46+
backgroundColor: backgroundColor,
47+
alignment: Alignment.center,
48+
insetPadding: insetPadding,
49+
constraints: constraints,
50+
child: Stack(
51+
fit: StackFit.passthrough,
52+
children: [
53+
child,
54+
Positioned(
55+
top: 0,
56+
right: 0,
57+
child: Offstage(
58+
offstage: !showClose,
59+
child: const _CloseButton(),
6560
),
66-
],
67-
),
68-
);
69-
},
70-
),
61+
),
62+
],
63+
),
64+
);
65+
},
7166
);
7267
}
7368
}

catalyst_voices/utilities/poc_local_storage/lib/protected_screen.dart

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -181,28 +181,23 @@ class _ProtectedScreenState extends State<ProtectedScreen> {
181181
return showDialog<String>(
182182
context: context,
183183
builder: (context) {
184-
// TODO(dt-iohk): remove SelectionArea when https://github.com/flutter/flutter/pull/167275
185-
// is released and we're using this flutter version
186-
// Note: fix scheduled for 3.34.x / 3.35.x flutter version
187-
return SelectionArea(
188-
child: AlertDialog(
189-
title: Text(message),
190-
content: TextField(
191-
controller: _passwordController,
192-
obscureText: true,
193-
decoration: const InputDecoration(hintText: 'Enter password'),
194-
),
195-
actions: [
196-
TextButton(
197-
child: const Text('Cancel'),
198-
onPressed: () => Navigator.of(context).pop(),
199-
),
200-
TextButton(
201-
child: const Text('OK'),
202-
onPressed: () => Navigator.of(context).pop(_passwordController.text),
203-
),
204-
],
184+
return AlertDialog(
185+
title: Text(message),
186+
content: TextField(
187+
controller: _passwordController,
188+
obscureText: true,
189+
decoration: const InputDecoration(hintText: 'Enter password'),
205190
),
191+
actions: [
192+
TextButton(
193+
child: const Text('Cancel'),
194+
onPressed: () => Navigator.of(context).pop(),
195+
),
196+
TextButton(
197+
child: const Text('OK'),
198+
onPressed: () => Navigator.of(context).pop(_passwordController.text),
199+
),
200+
],
206201
);
207202
},
208203
);

0 commit comments

Comments
 (0)