Skip to content

Commit 05bf897

Browse files
authored
Merge pull request #367 from macosui/dev
release: Version `1.11.1`
2 parents 249cced + e9cc18e commit 05bf897

19 files changed

+894
-667
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77

88
## Pre-launch Checklist
99

10-
- [ ] I have run `dartfmt` on all changed files <!-- THIS IS REQUIRED -->
1110
- [ ] I have incremented the package version as appropriate and updated `CHANGELOG.md` with my changes <!-- THIS IS REQUIRED -->
1211
- [ ] I have added/updated relevant documentation <!-- If relevant -->
1312
- [ ] I have run "optimize/organize imports" on all changed files
14-
- [ ] I have addressed all analyzer warnings as best I could
15-
<!-- - [ ] I have run `flutter pub publish --dry-run` and addressed any warnings --> <!-- MAINTAINER ONLY -->
13+
- [ ] I have addressed all analyzer warnings as best I could

.github/workflows/flutter_analysis.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,22 @@ jobs:
1515
- name: Install dependencies
1616
run: flutter pub get
1717

18+
- uses: actions/checkout@v3
19+
- name: Set up git
20+
run: |
21+
git config user.name "GitHub Actions Bot"
22+
git config user.email "<>"
23+
1824
- name: Format code
19-
run: dart format --set-exit-if-changed .
25+
run: |
26+
dart format .
27+
if [ $? -eq 1 ]; then
28+
git add .
29+
git commit -m "chore: formatting corrections"
30+
git push
31+
echo "Code has been formatted and changes have been committed and pushed."
32+
fi
33+
echo "All code is properly formatted!"
2034
2135
- name: Analyze code
2236
run: flutter analyze --fatal-infos .

.github/workflows/pana_analysis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on: [pull_request, workflow_dispatch]
44
jobs:
55
package-analysis:
66
runs-on: ubuntu-latest
7+
if: github.base_ref != 'customer_testing'
78

89
steps:
910
- uses: actions/checkout@v3

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*.iws
1616
.idea/
1717

18-
.vscode/launch.json
18+
.vscode
1919

2020
# The .vscode folder contains launch configuration and tasks you configure in
2121
# VS Code which you may wish to be included in version control, so this line

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## [1.11.1]
2+
* Fixed an issue where the `MacosSearchField` would not perform an action when an item was selected.
3+
4+
## [1.11.0]
5+
* 🚨 Breaking Changes 🚨
6+
* `ResizablePane` can now be vertically resized
7+
* `ResizablePane.startWidth` has been changed to `ResizablePane.startSize`
8+
* `ResizablePane.minWidth` has been changed to `ResizablePane.minSize`
9+
* `ResizablePane.maxWidth` has been changed to `ResizablePane.maxSize`
10+
111
## [1.10.0]
212
🚨 Breaking Changes 🚨
313
* `MacosScrollbar` has been completely overhauled and now resembles the native macOS scrollbar in appearance and

CONTRIBUTING.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,38 @@
33
Thanks for checking out `macos_ui`! We appreciate your interest in contributing! Here are some
44
basic things you'll need to know to get started.
55

6-
### Branch structure
6+
## Branch structure
77

88
The default branch for this project is `dev`. Your work should take place in a branch checked out
99
from here. `stable` is reserved for releases to pub.dev. All pull requests should therefore
1010
target `dev`.
1111

12-
`dev` and `stable` are protected branches.
12+
`dev`, `stable`, and `customer_testing` are protected branches.
1313

14-
### Commit style
14+
### The `stable` Branch
15+
This branch is solely for pub releases. Only authorized maintainers may make pull requests to this branch.
16+
17+
### The `customer_testing` branch
18+
This branch is the ***only*** branch in this repository based on Flutter's `master` channel; every other branch is based on Flutter's `stable` channel. This is so that `macos_ui` can be included in Flutter's [tests](https://github.com/flutter/tests) repo. It is beneficial for `macos_ui` to be included there so that if any changes are introduced to Flutter that break `macos_ui`, we will be informed and can make the appropriate changes.
19+
20+
Only authorized maintainers may make pull requests to this branch.
21+
22+
## Commit style
1523
This repository uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). Please ensure that you use them!
1624

17-
### Pull Requests
25+
## Pull Requests
1826
As mentioned above, all pull requests should target `dev`.
1927

20-
#### Pre-launch script
21-
Before opening your pull request, run the `pr_prelaunch_tasks.sh` script to ensure that your changes meet the
22-
following requirements:
28+
Before opening your pull request, please ensure that the following
29+
following requirements are met:
30+
* You have run `flutter pub get` at the package level
31+
* You have incremented the version number in `pubspec.yaml` properly
32+
* You have updated the `CHANGELOG.md` file accordingly
2333
* All code is properly formatted
2434
* There are no Dart analysis warnings
2535
* All tests pass
2636

27-
If the format step of the script results in changes, the script will make those change, commit them, and prompt you to push the commit.
28-
29-
If the `dart fix` step results in changes, the script will make those changes, commit them, and prompt you to push the commit.
30-
31-
Pull requests should **always** be merged via GitHub and not via command-line.
37+
A note for authorized maintainers: Pull requests should **always** be merged via GitHub and not via command-line.
3238

3339
### Versioning
3440

README.md

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ Guides, codelabs, and other documentation can be found at https://macosui.dev
1616

1717
<img src="https://imgur.com/5mFQKBU.png" width="75%"/>
1818

19-
## 🚨 Usage notes
19+
## 🚨 Usage notes
20+
### <img src="https://storage.googleapis.com/cms-storage-bucket/0dbfcc7a59cd1cf16282.png" height="14"/> Flutter channel
21+
`macos_ui` is developed against Flutter's `stable` channel. To ensure a smooth development experience with `macos_ui`, you should build your application on Flutter's `stable` channel.
22+
2023
### <img src="https://storage.googleapis.com/cms-storage-bucket/0dbfcc7a59cd1cf16282.png" height="14"/> Platform Compatibility
2124

2225
pub.dev shows that `macos_ui` only supports macOS. This is because `macos_ui` calls some native code, and therefore
@@ -50,6 +53,7 @@ should avoid allowing your application window to be resized below the height of
5053

5154
- [Layout](#layout)
5255
- [MacosWindow](#macoswindow)
56+
- [Sidebar](#sidebar)
5357
- [MacosScaffold](#macosscaffold)
5458
- [Modern Window Look](#modern-window-look)
5559
- [ToolBar](#toolbar)
@@ -148,6 +152,56 @@ your `MacosScaffold` in a `Builder` widget in order for this to work properly.
148152

149153
<img src="https://imgur.com/IBbp5rN.gif" width="75%">
150154

155+
## Sidebar
156+
A sidebar enables app navigation and provides quick access to top-level collections of content in your app.
157+
158+
Sidebars may be placed at the left or right of your app. To place a sidebar on the left, use the `MacosWindow.sidebar` property. To place a sidebar on the right, use the `MacosWindow.endSidebar` property.
159+
160+
<img src="https://imgur.com/sz4VPNR.png" width="75%"/>
161+
162+
Example usage:
163+
164+
```dart
165+
int pageIndex = 0;
166+
167+
...
168+
169+
MacosWindow(
170+
sidebar: Sidebar(
171+
minWidth: 200,
172+
builder: (context, scrollController) {
173+
return SidebarItems(
174+
currentIndex: pageIndex,
175+
scrollController: scrollController,
176+
itemSize: SidebarItemSize.large,
177+
onChanged: (i) {
178+
setState(() => pageIndex = i);
179+
},
180+
items: const [
181+
SidebarItem(
182+
label: Text('Page One'),
183+
),
184+
SidebarItem(
185+
label: Text('Page Two'),
186+
),
187+
],
188+
);
189+
},
190+
),
191+
endSidebar: Sidebar(
192+
startWidth: 200,
193+
minWidth: 200,
194+
maxWidth: 300,
195+
shownByDefault: false,
196+
builder: (context, _) {
197+
return const Center(
198+
child: Text('End Sidebar'),
199+
);
200+
},
201+
),
202+
),
203+
```
204+
151205
## MacosScaffold
152206

153207
The `MacosScaffold` is what you might call a "page".
@@ -355,7 +409,7 @@ CustomToolbarItem(
355409

356410
## MacosListTile
357411

358-
A widget that aims to approximate the [ListTile] widget found in
412+
A widget that aims to approximate the [`ListTile`](https://api.flutter.dev/flutter/material/ListTile-class.html) widget found in
359413
Flutter's material library.
360414

361415
![MacosListTile](https://imgur.com/pQB99M2.png)
@@ -862,10 +916,10 @@ You can set `discrete` to `true` to make it a discrete capacity indicator.
862916

863917
A slider is a control that lets people select a value from a continuous or discrete range of values by moving the slider thumb.
864918

865-
Continuous | Discrete |
866-
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
867-
| ![Continuous Slider Example](https://i.imgur.com/dc4YjoX.png) | ![Discrete Slider Example](https://i.imgur.com/KckOTUf.png) |
868-
| A horizontal slider where any value continuous value between a min and max can be selected | A horizontal slider where only discrete values between a min and max can be selected. Tick marks are often displayed to provide context. |
919+
| Continuous | Discrete |
920+
| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
921+
| ![Continuous Slider Example](https://i.imgur.com/dc4YjoX.png) | ![Discrete Slider Example](https://i.imgur.com/KckOTUf.png) |
922+
| A horizontal slider where any value continuous value between a min and max can be selected | A horizontal slider where only discrete values between a min and max can be selected. Tick marks are often displayed to provide context. |
869923

870924

871925
Here's an example of how to create an interactive continuous slider:

example/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ app.*.map.json
4747
/android/app/release
4848

4949
/windows/
50+
linux/

0 commit comments

Comments
 (0)