Skip to content

Commit

Permalink
Version 1.9.0 (#339)
Browse files Browse the repository at this point in the history
* Sidebar top (#244)

* chore: refactor dir structure

* feat: Sidebar top & updated default control color

* feat(example): search results in top

* chore: bump version, changelog

* chore: run flutter pub upgrade

* Update CHANGELOG.md

* Update lib/src/layout/sidebar/sidebar.dart

Co-authored-by: Minas Giannekas <whiplashoo@users.noreply.github.com>

* chore: update issue templates

* chore: update pr_prelaunch script

* Flutter 3 upgrade & MacosColor update (#248)

* chore: Update pubspec.yaml files to support Flutter 3

* chore: run dart fix --apply

* chore: migrate Scrollbar to Flutter 3

* chore: update flutter_lints & subsequent fixes

* feat: add missing functions to MacosColor

the Color class has a number of functions that MacosColor had not implemented

* chore: use super parameters

* chore: update changelog

* chore: tweak example app

Uses the new PlatformMenuBar. Also update product name.

* chore: small changelog tweak

* chore: run flutter format .

* chore: run dart fix --apply

* chore: run flutter format .

* chore: remove unused code in example

* chore: remove unused import

* chore: remove unused code

* Starter app (#251)

* chore: Update pubspec.yaml files to support Flutter 3

* chore: run dart fix --apply

* chore: migrate Scrollbar to Flutter 3

* chore: update flutter_lints & subsequent fixes

* feat: add missing functions to MacosColor

the Color class has a number of functions that MacosColor had not implemented

* chore: use super parameters

* chore: update changelog

* chore: tweak example app

Uses the new PlatformMenuBar. Also update product name.

* chore: small changelog tweak

* chore: run flutter format .

* chore: run dart fix --apply

* chore: run flutter format .

* chore: remove unused code in example

* chore: remove unused import

* feat: first pass at starter app brick

* chore: improve starter app brick

* chore: fix widget test in starter app

* feat: conditional prompts & running pub get

* chore: finalize brick

* chore: run flutter format

* chore: exclude starter app from analyzer

* Full screen opaque toolbar issue (closes #249) (#252)

* fix: don't show app window toolbar when in full screen

* chore: update README

* chore: update brick app window code

* chore: update pubspec and changelog

* chore: update actions

Co-authored-by: Reuben Turner <groovinchip@gmail.com>

* Version 1.4.1 (#255)

* Sidebar top (#244)

* chore: refactor dir structure

* feat: Sidebar top & updated default control color

* feat(example): search results in top

* chore: bump version, changelog

* chore: run flutter pub upgrade

* Update CHANGELOG.md

* Update lib/src/layout/sidebar/sidebar.dart

Co-authored-by: Minas Giannekas <whiplashoo@users.noreply.github.com>

* chore: update issue templates

* chore: update pr_prelaunch script

* Flutter 3 upgrade & MacosColor update (#248)

* chore: Update pubspec.yaml files to support Flutter 3

* chore: run dart fix --apply

* chore: migrate Scrollbar to Flutter 3

* chore: update flutter_lints & subsequent fixes

* feat: add missing functions to MacosColor

the Color class has a number of functions that MacosColor had not implemented

* chore: use super parameters

* chore: update changelog

* chore: tweak example app

Uses the new PlatformMenuBar. Also update product name.

* chore: small changelog tweak

* chore: run flutter format .

* chore: run dart fix --apply

* chore: run flutter format .

* chore: remove unused code in example

* chore: remove unused import

* chore: remove unused code

* Starter app (#251)

* chore: Update pubspec.yaml files to support Flutter 3

* chore: run dart fix --apply

* chore: migrate Scrollbar to Flutter 3

* chore: update flutter_lints & subsequent fixes

* feat: add missing functions to MacosColor

the Color class has a number of functions that MacosColor had not implemented

* chore: use super parameters

* chore: update changelog

* chore: tweak example app

Uses the new PlatformMenuBar. Also update product name.

* chore: small changelog tweak

* chore: run flutter format .

* chore: run dart fix --apply

* chore: run flutter format .

* chore: remove unused code in example

* chore: remove unused import

* feat: first pass at starter app brick

* chore: improve starter app brick

* chore: fix widget test in starter app

* feat: conditional prompts & running pub get

* chore: finalize brick

* chore: run flutter format

* chore: exclude starter app from analyzer

* Full screen opaque toolbar issue (closes #249) (#252)

* fix: don't show app window toolbar when in full screen

* chore: update README

* chore: update brick app window code

* chore: update pubspec and changelog

* chore: update actions

Co-authored-by: Reuben Turner <groovinchip@gmail.com>

Co-authored-by: Minas Giannekas <whiplashoo@users.noreply.github.com>

* chore: repository, homepage fields

* chore: update readme

* feat(starter_app): Version 1.1.0

* feat(starter_app): multi-window support

* feat: starter_app 1.2.1

* chore: move brick to its own repo & go back to old pana action

* Expand remaining part of row in MacosListTile (#265)

* Expand remaining part of row #264

* Increment to version 1.4.2

* End sidebar (#267)

* chore: add missing trailing comma

* chore: improve MacosIconButton animation curve

* chore: remove false_secrets from pubspec.yaml

* feat: end sidebar

Also fixes the tests portion of the pr_prelaunch_tasks script

* feat: add "isEndSidebarShown" to MacosWindowScope

* fix: Correct the placement of the leading widget in disclosure sidebar items (#272)

* chore: Update changelog

* test: fix issues with date_picker_test

* Account for cases where the month and the day are the same
* Fix offstage warnings by removing tester taps that disabled the caret controls

* Update Actions (#279)

* Update flutter_analysis.yml

* Update dart_code_metrics.yaml

* Update gh_pages.yml

* Update pana_analysis.yml

* Update codecov.yaml

* fix syntax issue

* Version 1.6.0 - `MacosTabView` & `MacosSegmentedControl` (#273)

* feat: MacosTabView & MacosSegmentedControl

* chore: fixup scripts

* test: tests for segmented control & tab view

* chore: remove unused code

* chore: run flutter format .

* chore: bump code metrics

* docs: dartdoc updates

* docs: fix a documentation error

* chore: run flutter format .

* refactor: make active property of MacosTab optional, since it is handled via MacosSegmentedControl

* chore: fix import change

* refactor: change colors to match default native app design

* docs: update tab view screenshot in readme

* chore: update README example for MacosTabView

* chore: fix typo in MacosSegmentedControl

* chore: fix typo in MacosSegmentedControl docstring

* test: remove explicitly setting active property of MacosTabs

Co-authored-by: Minas Giannekas <whiplashoo721@gmail.com>

* Version 1.7.0: `MacosImageIcon` & sidebar updates (#274)

* feat: MacosTabView & MacosSegmentedControl

* chore: fixup scripts

* test: tests for segmented control & tab view

* chore: remove unused code

* chore: run flutter format .

* chore: bump code metrics

* docs: dartdoc updates

* docs: fix a documentation error

* chore: run flutter format .

* feat: MacosImageIcon & sidebar updates

* test: fix issues with date_picker_test

* Account for cases where the month and the day are the same
* Fix offstage warnings by removing tester taps that disabled the caret controls

* refactor: make active property of MacosTab optional, since it is handled via MacosSegmentedControl

* chore: fix import change

* refactor: change colors to match default native app design

* docs: update tab view screenshot in readme

* chore: fix README

* test: fix date picker test

Co-authored-by: Minas Giannekas <whiplashoo721@gmail.com>

* chore: fix typo in pr template

* feat: gh action to auto-generate releases on push to stable

* chore: update release action with latest from stable

* feat: add action to publish to pub

* docs: update readme

* Addresses #237
* Adds MacosColorWell to selectors section
* Adds code snippets for date & time pickers

* fix: 1.7.1

Fixes issue where end sidebar window breakpoint wasn’t being respected

* Tab view padding (#285)

* fix: use prepared title wrapped with a DefaultTextStyle instead of the raw title (#289)

* chore: fix typo

Closes #290

* feat: add `backgroundColor` to `MacosSheet` (#291)

* chore: fix Flutter 3.3 warnings

* fix: address ScrollController bug in MacosPopupButton (#300)

* fix(tests): account for Jan -> Dec & Dec -> Jan

date_picker_test.dart was failing due to not accounting for going from January to December and vice-versa.

* fix(plugin): Ensure the native color panel releases when closed

* Update flutter_analysis.yml

Closes #334

* Various bug fixes & minor updates (#338)

* Macos slider (#337)

* chore: run flutter format .

* chore: fix analysis

* chore: Bump version and update CHANGELOG.md

* chore: Update images to self taken ones as MacOS images are outdated

* fix: fix position offset by a small value

* fix: PR review feedback

* Update lib/src/indicators/slider.dart

---------

Co-authored-by: Reuben Turner <groovinchip@gmail.com>

---------

Co-authored-by: Minas Giannekas <whiplashoo@users.noreply.github.com>
Co-authored-by: Jon Saw <jon.saw@gmail.com>
Co-authored-by: Minas Giannekas <whiplashoo721@gmail.com>
Co-authored-by: st merlhin <77164238+stMerlHin@users.noreply.github.com>
Co-authored-by: jtdLab <72231111+jtdLab@users.noreply.github.com>
Co-authored-by: Norbert Kozsir <norbertkozsir@gmail.com>
  • Loading branch information
7 people authored Feb 3, 2023
1 parent ae5dc52 commit b55c500
Show file tree
Hide file tree
Showing 55 changed files with 1,526 additions and 834 deletions.
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

0 comments on commit b55c500

Please sign in to comment.