Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.4.0

- **FIX**: Removed excessive whitespace from multi screen form summary.
- **FIX**: Added right padding to multi screen form navigation buttons.
- **FIX**: Removed `FormState.multiScreen` constructor which did not enforce the requirement of `MultiScreenFormState` by `Form.multiScreen`.

## 0.3.0

- **FEAT**: Added multi screen form support.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/form/form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Form extends StatelessComponent {

/// Creates a [Form] configured for multi-screen navigation.
/// Each config is shown on its own screen with Back/Next buttons.
/// Requires [FormState.multiScreen] to be used as the state.
/// Requires [MultiScreenFormState] to be used as the state.
const factory Form.multiScreen({
Key? key,
required MultiScreenFormState state,
Expand Down
8 changes: 2 additions & 6 deletions lib/src/components/form/multi_screen_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class _MultiScreenNavigationButtons extends StatelessComponent {
},
focused: state.focusOnButton && state.focusedButtonIndex == 1,
),
const SizedBox(width: 1),
],
),
);
Expand Down Expand Up @@ -168,13 +169,8 @@ class _SummaryScreen extends StatelessComponent {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 1),
for (final config in configs)
_SummaryItem(
state: state,
config: config,
),
const SizedBox(height: 1),
_SummaryItem(state: state, config: config),
if (description case String description) ...[
const SizedBox(height: 1),
Text(
Expand Down
4 changes: 0 additions & 4 deletions lib/src/form/state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ class FormState {
_updateState();
}

/// Creates a [FormState] configured for a multi-screen `Form`.
factory FormState.multiScreen(List<FormConfig> configValues) =
MultiScreenFormState;

/// Configurations used to initialize this state.
final List<FormConfig> _configValues;

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: serverpod_tui
description: A collection of tools for building terminal user interfaces.
version: 0.3.0
version: 0.4.0
repository: https://github.com/serverpod/serverpod_tui
homepage: https://serverpod.dev
issue_tracker: https://github.com/serverpod/serverpod_tui/issues
Expand Down
Loading