Skip to content

Commit 29f7d4d

Browse files
committed
Merge branch 'main' into 2091-map-proposal-elements-for-testing
2 parents f86230a + 927f42b commit 29f7d4d

File tree

11 files changed

+74
-54
lines changed

11 files changed

+74
-54
lines changed

catalyst_voices/apps/voices/lib/pages/proposal_builder/proposal_builder_navigation_panel.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class ProposalBuilderNavigationPanel extends StatelessWidget {
1212
Widget build(BuildContext context) {
1313
return SpaceSidePanel(
1414
isLeft: true,
15-
name: context.l10n.workspaceProposalNavigation,
1615
onCollapseTap: () {},
1716
tabs: [
1817
SpaceSidePanelTab(

catalyst_voices/apps/voices/lib/pages/proposal_builder/proposal_builder_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class _ProposalBuilderPageState extends State<ProposalBuilderPage>
181181
void _dontShowCampaignSubmissionClosingDialog(bool value) {
182182
context
183183
.read<SessionCubit>()
184-
.updateShowSubmissionClosingWarning(value: value);
184+
.updateShowSubmissionClosingWarning(value: !value);
185185
}
186186

187187
void _handleSegmentsControllerChange() {

catalyst_voices/apps/voices/lib/pages/proposal_builder/proposal_builder_setup_panel.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ class ProposalBuilderSetupPanel extends StatelessWidget {
1010
Widget build(BuildContext context) {
1111
return SpaceSidePanel(
1212
isLeft: false,
13-
name: context.l10n.workspaceProposalSetup,
1413
onCollapseTap: () {},
1514
tabs: [
1615
SpaceSidePanelTab(

catalyst_voices/apps/voices/lib/pages/registration/create_base_profile/stage/setup_panel.dart

Lines changed: 51 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,11 @@ import 'package:catalyst_voices_shared/catalyst_voices_shared.dart';
88
import 'package:catalyst_voices_view_models/catalyst_voices_view_models.dart';
99
import 'package:flutter/material.dart';
1010

11-
class SetupPanel extends StatelessWidget {
11+
class SetupPanel extends StatefulWidget {
1212
const SetupPanel({super.key});
1313

1414
@override
15-
Widget build(BuildContext context) {
16-
return Column(
17-
crossAxisAlignment: CrossAxisAlignment.start,
18-
children: [
19-
const SizedBox(height: 24),
20-
const _Title(),
21-
Expanded(
22-
child: FocusScope(
23-
child: ListView(
24-
padding: const EdgeInsets.symmetric(vertical: 24),
25-
children: const [
26-
_DisplayNameSelector(),
27-
SizedBox(height: 24),
28-
_EmailSelector(),
29-
],
30-
),
31-
),
32-
),
33-
const SizedBox(height: 24),
34-
const _IdeascaleInfoCard(),
35-
const SizedBox(height: 24),
36-
const _NavigationSelector(),
37-
],
38-
);
39-
}
15+
State<SetupPanel> createState() => _SetupPanelState();
4016
}
4117

4218
class _DisplayNameSelector extends StatelessWidget {
@@ -186,6 +162,55 @@ class _NavigationSelector extends StatelessWidget {
186162
}
187163
}
188164

165+
class _SetupPanelState extends State<SetupPanel> {
166+
late final ScrollController _scrollController;
167+
168+
@override
169+
Widget build(BuildContext context) {
170+
return Column(
171+
crossAxisAlignment: CrossAxisAlignment.start,
172+
children: [
173+
const SizedBox(height: 24),
174+
const _Title(),
175+
Expanded(
176+
child: FocusScope(
177+
child: VoicesScrollbar(
178+
controller: _scrollController,
179+
alwaysVisible: true,
180+
padding: const EdgeInsets.only(left: 10),
181+
child: ListView(
182+
controller: _scrollController,
183+
padding: const EdgeInsets.symmetric(vertical: 24),
184+
children: const [
185+
_DisplayNameSelector(),
186+
SizedBox(height: 24),
187+
_EmailSelector(),
188+
],
189+
),
190+
),
191+
),
192+
),
193+
const SizedBox(height: 24),
194+
const _IdeascaleInfoCard(),
195+
const SizedBox(height: 24),
196+
const _NavigationSelector(),
197+
],
198+
);
199+
}
200+
201+
@override
202+
void dispose() {
203+
_scrollController.dispose();
204+
super.dispose();
205+
}
206+
207+
@override
208+
void initState() {
209+
super.initState();
210+
_scrollController = ScrollController();
211+
}
212+
}
213+
189214
class _Title extends StatelessWidget {
190215
const _Title();
191216

catalyst_voices/apps/voices/lib/pages/registration/widgets/unlock_password_form.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ class _PasswordStrength extends StatelessWidget {
114114
),
115115
);
116116
}
117-
}
117+
}

catalyst_voices/apps/voices/lib/pages/registration/widgets/wallet_summary.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,4 +249,4 @@ class _WalletSummaryName extends StatelessWidget {
249249
),
250250
);
251251
}
252-
}
252+
}

catalyst_voices/apps/voices/lib/pages/treasury/treasury_details_panel.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class TreasuryDetailsPanel extends StatelessWidget {
88
Widget build(BuildContext context) {
99
return SpaceSidePanel(
1010
isLeft: false,
11-
name: 'Campaign comments',
1211
onCollapseTap: () {},
1312
tabs: [
1413
SpaceSidePanelTab(

catalyst_voices/apps/voices/lib/pages/treasury/treasury_navigation_panel.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class TreasuryNavigationPanel extends StatelessWidget {
1111
Widget build(BuildContext context) {
1212
return SpaceSidePanel(
1313
isLeft: true,
14-
name: context.l10n.treasuryCampaignBuilder,
1514
onCollapseTap: () {},
1615
tabs: [
1716
SpaceSidePanelTab(

catalyst_voices/apps/voices/lib/pages/workspace/page/workspace_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class _WorkspacePageState extends State<WorkspacePage>
8888
void _dontShowCampaignSubmissionClosingDialog(bool value) {
8989
context
9090
.read<SessionCubit>()
91-
.updateShowSubmissionClosingWarning(value: value);
91+
.updateShowSubmissionClosingWarning(value: !value);
9292
}
9393

9494
void _showDeleteErrorSnackBar() {

catalyst_voices/apps/voices/lib/widgets/containers/sidebar/space_side_panel.dart

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
import 'package:catalyst_voices/widgets/buttons/voices_buttons.dart';
1+
import 'package:catalyst_voices/widgets/buttons/voices_icon_button.dart';
22
import 'package:catalyst_voices/widgets/common/tab_bar_stack_view.dart';
3-
import 'package:catalyst_voices/widgets/headers/section_header.dart';
43
import 'package:catalyst_voices/widgets/widgets.dart' show SidebarScaffold;
4+
import 'package:catalyst_voices_assets/catalyst_voices_assets.dart';
55
import 'package:catalyst_voices_brands/catalyst_voices_brands.dart';
66
import 'package:flutter/material.dart';
77

88
/// Defines usual space panel. This widget is opinionated and should
99
/// be used together with [SidebarScaffold].
1010
///
11-
/// Always have [name], [tabs] and tabs content [SpaceSidePanelTab.body].
11+
/// Always have [tabs] and tabs content [SpaceSidePanelTab.body].
1212
class SpaceSidePanel extends StatefulWidget {
1313
final bool isLeft;
14-
final String name;
1514
final VoidCallback? onCollapseTap;
1615
final TabController? tabController;
1716
final List<SpaceSidePanelTab> tabs;
@@ -20,7 +19,6 @@ class SpaceSidePanel extends StatefulWidget {
2019
const SpaceSidePanel({
2120
super.key,
2221
required this.isLeft,
23-
required this.name,
2422
this.onCollapseTap,
2523
this.tabController,
2624
required this.tabs,
@@ -75,24 +73,24 @@ class _Container extends StatelessWidget {
7573
}
7674

7775
class _Header extends StatelessWidget {
78-
final String name;
7976
final VoidCallback? onCollapseTap;
8077
final bool isLeft;
8178

8279
const _Header({
83-
required this.name,
8480
this.onCollapseTap,
8581
required this.isLeft,
8682
});
8783

8884
@override
8985
Widget build(BuildContext context) {
90-
return SectionHeader(
91-
leading: isLeft ? LeftArrowButton(onTap: onCollapseTap) : null,
92-
title: Text(name),
93-
trailing: [
94-
if (!isLeft) RightArrowButton(onTap: onCollapseTap),
95-
],
86+
return Align(
87+
alignment: isLeft ? Alignment.centerLeft : Alignment.centerRight,
88+
child: VoicesIconButton(
89+
onTap: onCollapseTap,
90+
child: isLeft
91+
? VoicesAssets.icons.leftRailToggle.buildIcon()
92+
: VoicesAssets.icons.rightRailToggle.buildIcon(),
93+
),
9694
);
9795
}
9896
}
@@ -109,19 +107,21 @@ class _SpaceSidePanelState extends State<SpaceSidePanel>
109107
children: [
110108
if (widget.isLeft)
111109
Positioned(
112-
top: 28,
113-
left: 24,
114-
child: RightArrowButton(
110+
top: 24,
111+
left: 16,
112+
child: VoicesIconButton(
113+
child: VoicesAssets.icons.leftRailToggle.buildIcon(),
115114
onTap: () {
116115
_controller.reverse();
117116
},
118117
),
119118
)
120119
else
121120
Positioned(
122-
top: 28,
121+
top: 24,
123122
right: 16,
124-
child: LeftArrowButton(
123+
child: VoicesIconButton(
124+
child: VoicesAssets.icons.rightRailToggle.buildIcon(),
125125
onTap: () {
126126
_controller.reverse();
127127
},
@@ -140,7 +140,6 @@ class _SpaceSidePanelState extends State<SpaceSidePanel>
140140
mainAxisSize: MainAxisSize.max,
141141
children: [
142142
_Header(
143-
name: widget.name,
144143
onCollapseTap: () {
145144
_controller.forward();
146145
widget.onCollapseTap?.call();

0 commit comments

Comments
 (0)