Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.9.0 #339

Merged
merged 49 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6e3aa4c
Sidebar top (#244)
GroovinChip May 11, 2022
41c56a2
chore: update issue templates
GroovinChip May 11, 2022
de258e5
chore: update pr_prelaunch script
GroovinChip May 11, 2022
4bb29a8
Merge branch 'stable' into dev
GroovinChip May 11, 2022
e4c37d6
Flutter 3 upgrade & MacosColor update (#248)
GroovinChip May 13, 2022
ac6870c
Merge branch 'stable' into dev
GroovinChip May 13, 2022
ab47743
Starter app (#251)
GroovinChip May 13, 2022
880c308
Full screen opaque toolbar issue (closes #249) (#252)
whiplashoo May 16, 2022
eb06cc4
Merge branch 'stable' into dev
GroovinChip May 16, 2022
77778ed
Version 1.4.1 (#255)
GroovinChip May 16, 2022
ee2297f
Merge branch 'stable' into dev
GroovinChip May 16, 2022
ba99684
Merge branch 'stable' into dev
GroovinChip May 16, 2022
3f0d09e
chore: repository, homepage fields
GroovinChip May 16, 2022
3f6d9ac
Merge branch 'stable' into dev
GroovinChip May 16, 2022
1857b58
chore: update readme
GroovinChip May 16, 2022
1dbab59
feat(starter_app): Version 1.1.0
GroovinChip May 16, 2022
99cce50
feat(starter_app): multi-window support
GroovinChip May 17, 2022
a7b34dd
feat: starter_app 1.2.1
GroovinChip May 21, 2022
f6cb9cd
chore: move brick to its own repo & go back to old pana action
GroovinChip May 23, 2022
a4e85c3
Expand remaining part of row in MacosListTile (#265)
jonsaw Jun 24, 2022
6d89861
End sidebar (#267)
GroovinChip Jun 26, 2022
9b8f75d
Merge branch 'stable' into dev
GroovinChip Jun 30, 2022
098c22f
fix: Correct the placement of the leading widget in disclosure sideba…
GroovinChip Jul 1, 2022
c7719c2
chore: Update changelog
GroovinChip Jul 2, 2022
5687498
test: fix issues with date_picker_test
GroovinChip Jul 7, 2022
f09843c
Update Actions (#279)
GroovinChip Jul 7, 2022
d534f79
Version 1.6.0 - `MacosTabView` & `MacosSegmentedControl` (#273)
GroovinChip Jul 9, 2022
4f13234
Version 1.7.0: `MacosImageIcon` & sidebar updates (#274)
GroovinChip Jul 10, 2022
fa1deed
Merge branch 'stable' into dev
GroovinChip Jul 10, 2022
1d33004
chore: fix typo in pr template
GroovinChip Jul 10, 2022
7487f97
feat: gh action to auto-generate releases on push to stable
GroovinChip Jul 10, 2022
91de6b7
Merge branch 'stable' into dev
GroovinChip Jul 10, 2022
85eaed4
chore: update release action with latest from stable
GroovinChip Jul 10, 2022
285c398
feat: add action to publish to pub
GroovinChip Jul 10, 2022
6c90a36
docs: update readme
GroovinChip Jul 9, 2022
eae4c3d
fix: 1.7.1
GroovinChip Jul 27, 2022
085c44c
Merge branch 'stable' into dev
GroovinChip Jul 27, 2022
92f0b00
Tab view padding (#285)
stMerlHin Aug 14, 2022
4f538ef
fix: use prepared title wrapped with a DefaultTextStyle instead of th…
jtdLab Aug 15, 2022
53c1d24
chore: fix typo
GroovinChip Aug 17, 2022
1bd9180
feat: add `backgroundColor` to `MacosSheet` (#291)
GroovinChip Aug 17, 2022
b0efefa
chore: fix Flutter 3.3 warnings
GroovinChip Sep 5, 2022
d6d4a27
fix: address ScrollController bug in MacosPopupButton (#300)
GroovinChip Sep 10, 2022
6e17403
fix(tests): account for Jan -> Dec & Dec -> Jan
GroovinChip Jan 14, 2023
79b89c5
fix(plugin): Ensure the native color panel releases when closed
GroovinChip Jan 25, 2023
13fdb43
Update flutter_analysis.yml
GroovinChip Jan 27, 2023
9894aba
Various bug fixes & minor updates (#338)
GroovinChip Feb 2, 2023
ced5193
Macos slider (#337)
Norbert515 Feb 3, 2023
89cba56
Merge branch 'stable' into 1.9.0-conflicts
GroovinChip Feb 3, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/flutter_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: flutter pub get

- name: Format code
run: flutter format --set-exit-if-changed .
run: dart format --set-exit-if-changed .

- name: Analyze code
run: flutter analyze --fatal-infos .
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
## [1.9.0]
* Implement `MacosSlider`

## [1.8.0]
🚨 Breaking Changes 🚨
* `ContentArea.builder` has been changed from a `ScrollableWidgetBuilder` to a `WidgetBuilder` due to
changes in Flutter 3.7. The `MacosScrollBar` widget needs to undergo radical changes in order to achieve the
native macOS scrollbar look and feel in the future, so this will be revisited at that time.

Other changes
* Per Flutter 3.7.0: Replace deprecated `MacosTextField.toolbarOptions` with `MacosTextField.contextMenuBuilder`
* Ensure the color panel releases when it is closed
* Avoid render overflows in the `Sidebar` when the window height is resized below a certain threshold ([#325](https://github.com/GroovinChip/macos_ui/issues/325))
* Update `MacosScrollBar.thumbVisibility` with the latest change introduced in Flutter 3.7
* Update `README.md` to address issues [#325](https://github.com/GroovinChip/macos_ui/issues/325) & [#332](https://github.com/GroovinChip/macos_ui/issues/332)

## [1.7.6]
* Fixed a bug where `MacosPopupButton` would report that a `ScrollController` was not attached to any views

Expand Down
36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ Guides, codelabs, and other documentation can be found at https://macosui.dev

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

## 🚨 Usage notes
## 🚨 Usage notes
### <img src="https://storage.googleapis.com/cms-storage-bucket/0dbfcc7a59cd1cf16282.png" height="14"/> Platform Compatibility

pub.dev shows that `macos_ui` only supports macOS. This is because `macos_ui` calls some native code, and therefore
specifies macOS as a plugin platform in the `pubspec.yaml` file. `macos_ui` _will_ work on any platform that
Flutter supports, **but you will get best results on macOS**.
Expand All @@ -25,6 +27,14 @@ The features of `macos_ui` that will _not_ work on platforms other than macOS du
* The `MacosColors.controlAccentColor()` function
* The `MacosColorWell` widget

### <img src="https://imgur.com/TIP0V7H.png" height="14"/> Popups & window resizing

Since at this time Flutter does not allow UI elements to overflow the bounds of the window, popups are constrained to
the available space.

Therefore, if you are using widgets that create popups in your toolbar, like `ToolBarPopupButton`, you
should avoid allowing your application window to be resized below the height of your tallest popup.

## Contents

<details>
Expand Down Expand Up @@ -196,6 +206,7 @@ class BlurryContainerViewController: NSViewController {
self.addChild(flutterViewController)

flutterViewController.view.frame = self.view.bounds
+ flutterViewController.backgroundColor = .clear // **Required post-Flutter 3.7.0**
flutterViewController.view.autoresizingMask = [.width, .height]
self.view.addSubview(flutterViewController.view)
}
Expand Down Expand Up @@ -847,6 +858,29 @@ CapacityIndicator(

You can set `discrete` to `true` to make it a discrete capacity indicator.

### MacosSlider

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

Continuous | Discrete |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ![Continuous Slider Example](https://i.imgur.com/dc4YjoX.png) | ![Discrete Slider Example](https://i.imgur.com/KckOTUf.png) |
| 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. |


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

```dart
double value = 0.5;

MacosSlider(
value: value,
onChanged: (v) {
setState(() => value = v);
},
),
```

### RatingIndicator

A rating indicator uses a series of horizontally arranged graphical symbols to communicate a ranking level. The default
Expand Down
6 changes: 3 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ class _WidgetGalleryState extends State<WidgetGallery> {
],
),
minWidth: 200,
builder: (context, controller) {
builder: (context, _) {
return SidebarItems(
currentIndex: pageIndex,
onChanged: (i) => setState(() => pageIndex = i),
scrollController: controller,
scrollController: ScrollController(),
itemSize: SidebarItemSize.large,
items: [
const SidebarItem(
Expand Down Expand Up @@ -263,7 +263,7 @@ class _WidgetGalleryState extends State<WidgetGallery> {
minWidth: 200,
maxWidth: 300,
shownByDefault: false,
builder: (context, scrollController) {
builder: (context, _) {
return const Center(
child: Text('End Sidebar'),
);
Expand Down
12 changes: 6 additions & 6 deletions example/lib/pages/buttons_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ class _ButtonsPageState extends State<ButtonsPage> {
},
),
ContentArea(
builder: (context, scrollController) {
builder: (context) {
return SingleChildScrollView(
// controller: _,
padding: const EdgeInsets.all(20),
child: Column(
children: [
Expand Down Expand Up @@ -140,23 +141,22 @@ class _ButtonsPageState extends State<ButtonsPage> {
buttonSize: ButtonSize.small,
child: const Text('Small'),
onPressed: () {
Navigator.push(
context,
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) {
return MacosScaffold(
toolBar: const ToolBar(
title: Text("New page"),
title: Text('New page'),
),
children: [
ContentArea(
builder: (context, scrollController) {
builder: (context) {
return Center(
child: PushButton(
buttonSize: ButtonSize.large,
child: const Text('Go Back'),
onPressed: () {
Navigator.maybePop(context);
Navigator.of(context).maybePop();
},
),
);
Expand Down
Loading