Skip to content

Commit 0e80daf

Browse files
PanteCopilot
andauthored
Add motion-related fields (#693)
* Refactor dialog motion * Update sidebar item * Update slider * Update tabs * Update toast * Update sheet * Prepare Forui for review * Apply suggestions from code review Co-authored-by: Copilot <[email protected]> * Fix PR issues * Update windows-latest goldens --------- Co-authored-by: Pante <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 021e8ba commit 0e80daf

File tree

238 files changed

+839
-384
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+839
-384
lines changed

.github/workflows/forui_nightly.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
workflow_dispatch: {}
55
push:
66
branches: [ main ]
7-
paths:
8-
- forui_nightly.yaml
9-
- forui/**
107

118
concurrency:
129
group: ${{ github.workflow }}-${{ github.ref }}

docs/app/docs/overlay/dialog/page.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ showFDialog<T>(
6161
context: context,
6262
builder: (context, style, animation) => FDialog(...),
6363
useRootNavigator: false,
64+
routeStyle: FDialogRouteStyle(...),
6465
style: FDialogStyle(...),
6566
barrierLabel: 'Label',
6667
barrierDismissible: true,
@@ -201,7 +202,7 @@ We recommend using the vertical layout on mobile devices.
201202
child: FButton(
202203
child: const Text('Show Dialog'),
203204
onPress: () => showFDialog(
204-
style: context.theme.dialogStyle.copyWith(
205+
routeStyle: context.theme.dialogRouteStyle.copyWith(
205206
barrierFilter: (animation) => ImageFilter.compose(
206207
outer: ImageFilter.blur(sigmaX: animation * 5, sigmaY: animation * 5),
207208
inner: ColorFilter.mode(context.theme.colors.barrier, BlendMode.srcOver),

docs/app/docs/overlay/persistent-sheet/page.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ It is part of [FScaffold](/docs/layout/scaffold), which should be preferred in m
167167
To generate and customize this style:
168168

169169
```shell copy
170-
dart run forui style create sheet
170+
dart run forui style create persistent-sheet
171171
```
172172

173173
## Usage
@@ -177,7 +177,7 @@ dart run forui style create sheet
177177
```dart copy
178178
showFPersistentSheet(
179179
context: context,
180-
style: FSheetStyle(...),
180+
style: FPersistentSheetStyle(...),
181181
side: FLayout.ltr,
182182
useSafeArea: false,
183183
keepAliveOffstage: true,

docs/app/docs/overlay/sheet/page.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ It navigates to a new page each time.
142142
To generate and customize this style:
143143

144144
```shell copy
145-
dart run forui style create sheet
145+
dart run forui style create modal-sheet
146146
```
147147

148148
## Usage
@@ -152,7 +152,7 @@ dart run forui style create sheet
152152
```dart copy
153153
showFSheet(
154154
context: context,
155-
style: FSheetStyle(...),
155+
style: FModalSheetStyle(...),
156156
side: FLayout.ltr,
157157
useRootNavigator: true,
158158
useSafeArea: false,
@@ -161,6 +161,7 @@ showFSheet(
161161
barrierDismissible: true,
162162
draggable: true,
163163
builder: (context) => const Placeholder(),
164+
onClosing: () {},
164165
);
165166
```
166167

@@ -180,7 +181,7 @@ showFSheet(
180181
child: FButton(
181182
child: const Text('Open'),
182183
onPress: () => showFSheet(
183-
style: context.theme.sheetStyle.copyWith(
184+
style: context.theme.modalSheetStyle.copyWith(
184185
barrierFilter: (animation) => ImageFilter.compose(
185186
outer: ImageFilter.blur(sigmaX: animation * 5, sigmaY: animation * 5),
186187
inner: ColorFilter.mode(context.theme.colors.barrier, BlendMode.srcOver),

forui/CHANGELOG.md

Lines changed: 61 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ We've improved the styles' generated documentation. They should be much easier t
1313

1414
### `FAutocomplete`
1515

16+
* Add `FAutocompletController(popoverMotion: ...)`.
1617
* **Breaking** Change `FAutocompleteContentStyle.loadingIndicatorStyle` to `FAutocompleteContentStyle.progressStyle`.
1718

1819

@@ -21,6 +22,16 @@ We've improved the styles' generated documentation. They should be much easier t
2122
* **Breaking** Replace `FDateFieldController(animationDuration: ...)` with `FDateFieldController(popoverMotion: ...)`.
2223

2324

25+
### `FDialog`
26+
* Add `FDialogRouteStyle`.
27+
* Add `FDialogRouteMotion`.
28+
* Add `showFDialog(routeStyle: ...)`.
29+
* Add `FDialogMotion`.
30+
31+
* **Breaking** Move barrier related fields from `FDialogStyle` to `FDialogRouteStyle`.
32+
* **Breaking** Move animation related fields from `FDialogStyle` to `FDialogMotion`.
33+
34+
2435
### `FPopover` & `FPopoverMenu`
2536

2637
* Add `FPopoverMotion`.
@@ -48,29 +59,72 @@ We've reworked `FProgress` to be more customizable and easier to use.
4859
* **Breaking** Replace `FMultiSelectController(animationDuration: ...)` with `FMultiSelectController(popoverMotion: ...)`.
4960

5061

62+
### `FSheet`
63+
64+
* Add `FModalSheetStyle`.
65+
* Add `FPersistentSheetStyle`.
66+
* Add `FSheetMotion`.
67+
* Add `FModalSheetMotion`.
68+
* Add `FPersistentSheetMotion`.
69+
* Add `FModalSheet(onClosing: ...)`.
70+
* Add `FPersistentSheet(onClosing: ...)`.
71+
72+
* **Breaking** Split `FSheetStyle` into `FModalSheetStyle` and `FPersistentSheetStyle`.
73+
* **Breaking** Move animation related fields from `FSheetStyle` to `FSheetMotion`.
74+
75+
76+
### `FSidebar`
77+
78+
* Add `FSidebarItemMotion`.
79+
* **Breaking** Move animation related fields from `FSiderbarItemStyle` to `FSiderbarItemMotion`.
80+
81+
82+
### `FSlider`
83+
84+
* Add `FSliderStyle.tooltipMotion`.
85+
86+
87+
### `FTab`
88+
89+
* Add `FTabMotion`.
90+
* **Breaking** Replace `FTabController(animationDuration: ...)` with `FTabController(motion: ...)`.
91+
92+
5193
### `FTappable`
5294

5395
* Add `FTappableMotion`.
5496
* **Breaking** Move animation related fields from `FTappableStyle` to `FTappableMotion`.
5597

5698

99+
### `FTextField` & `FTextFormField`
100+
We've added a password visibility toggle to password fields.
101+
102+
* Add password visibility toggle to `FTextField.password(...)`.
103+
* Add password visibility toggle to `FTextFormField.password(...)`.
104+
105+
57106
### `FThemeData`
58107
We've added support for animated theme transitions. This should make transitions between themes gradual instead of abrupt.
59108

60109
* Add `FThemeData.lerp(...)`.
61110
* Change `FThemeData.copyWith(...)` to accept style builder functions.
62111

63112

64-
### `FTextField` & `FTextFormField`
65-
We've added a password visibility toggle to password fields.
113+
### `FTimeField`
66114

67-
* Add password visibility toggle to `FTextField.password(...)`.
68-
* Add password visibility toggle to `FTextFormField.password(...)`.
115+
* **Breaking** Replace `FTimeFieldController(animationDuration: ...)` with `FTimeFieldController(popoverMotion: ...)`.
69116

70117

71-
### `FTimeField`
118+
### `FToast`
72119

73-
* **Breaking** Replace `FTimeFieldController(animationDuration: ...)` with `FTimeFieldController(popoverMotion: ...)`.
120+
* Add `FToastMotion`.
121+
* Add `FToasterMotion`.
122+
123+
* Change animation to be more subtle.
124+
* **Breaking** Move animation related fields from `FToastStyle` to `FToastMotion`.
125+
* **Breaking** Move animation related fields from `FToasterStyle` to `FToasterMotion`.
126+
127+
* Remove no-op `FToast.onDismiss` parameter that was accidentally included.
74128

75129

76130
### `FTooltip`
@@ -86,6 +140,7 @@ We've added a password visibility toggle to password fields.
86140
* Add `FWidgetStateMap.lerpTextStyle(...)`.
87141
* Add `FWidgetStateMap.lerpWhere(...)`.
88142

143+
89144
### `FToaster`
90145
* Add `FToaster.of(...)`.
91146
* Make `FToasterState.show(context: ...)` optional.

forui/bin/commands/snippet/snippet.dart

Lines changed: 15 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)