Skip to content

Commit

Permalink
merge fork
Browse files Browse the repository at this point in the history
  • Loading branch information
vumanhsn97 committed Nov 20, 2023
2 parents 1b43b74 + b3a8e53 commit b17546a
Show file tree
Hide file tree
Showing 149 changed files with 11,862 additions and 3,550 deletions.
4 changes: 1 addition & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

## Pre-launch Checklist

- [ ] I have run `dartfmt` on all changed files <!-- THIS IS REQUIRED -->
- [ ] I have incremented the package version as appropriate and updated `CHANGELOG.md` with my changes <!-- THIS IS REQUIRED -->
- [ ] I have added/updated relevant documentation <!-- If relevant -->
- [ ] I have run "optimize/organize imports" on all changed files
- [ ] I have addressed all analyzer warnings as best I could
<!-- - [ ] I have run `flutter pub publish --dry-run` and addressed any warnings --> <!-- MAINTAINER ONLY -->
- [ ] I have addressed all analyzer warnings as best I could
16 changes: 10 additions & 6 deletions .github/workflows/dart_code_metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Run Dart Code Metrics
uses: dart-code-checker/dart-code-metrics-action@v2
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: Set Up DCM
run: flutter pub get
- uses: CQLabs/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pull_request_comment: true
fatal_warnings: true
fatal_performance: true
fatal_style: true

- run: dcm analyze --ci-key="${{ secrets.DCM_CI_KEY }}" --email="${{ secrets.DCM_EMAIL }}" lib
20 changes: 15 additions & 5 deletions .github/workflows/flutter_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,22 @@ jobs:
- name: Install dependencies
run: flutter pub get

- uses: actions/checkout@v3
- name: Set up git
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Format code
run: dart format --set-exit-if-changed .
run: |
dart format .
if [ $? -eq 1 ]; then
git add .
git commit -m "chore: formatting corrections"
git push
echo "Code has been formatted and changes have been committed and pushed."
fi
echo "All code is properly formatted!"
- name: Analyze code
run: flutter analyze --fatal-infos .

- name: Test code
run: flutter test

1 change: 1 addition & 0 deletions .github/workflows/pana_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [pull_request, workflow_dispatch]
jobs:
package-analysis:
runs-on: ubuntu-latest
if: github.base_ref != 'customer_testing'

steps:
- uses: actions/checkout@v3
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Flutter Analysis
on: [pull_request, workflow_dispatch]

jobs:
package-analysis:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: Install dependencies
run: flutter pub get

- name: Test code
run: flutter test
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*.iws
.idea/

.vscode/launch.json
.vscode

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
Expand All @@ -31,6 +31,8 @@
.pub-cache/
.pub/
build/
.fvm/
metrics

# Android related
**/android/**/gradle-wrapper.jar
Expand Down
157 changes: 138 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,124 @@
## [1.7.6+1]
## [2.0.2]
### 🛠️ Fixed 🛠️
* Fixed images in generated documentation.

## [2.0.1]
### 🔄 Updated 🔄
* `PushButton` has received a facelift. It now mimics the look and feel of native macOS buttons more closely.
* **Note:** As a result, its `pressedOpacity` property and the `PushButtonTheme` class have been deprecated.

## [2.0.0]
### 🚨 Breaking Changes 🚨
* `macos_ui` has been migrated to utilize [macos_window_utils](https://pub.dev/packages/macos_window_utils) under the hood, which provides the following benefits:
* Window animation smoothness is drastically improved, particularly when miniaturizing and deminiaturizing the application window.
* Some visual artifacts that occurred while the window was being (de)miniaturized (such as the application's shadow going missing) no longer occur.
* The sidebar remains transparent when the app's brightness setting mismatches the OS setting.
* Wallpaper tinting is now supported.
* To migrate an existing application, please refer to the “Modern window look” section in the README.

* Support for Flutter 3.10 and Dart 3
* `PushButton` has been updated to support the `ControlSize` enum.
* The `buttonSize` property has been changed to `controlSize`.
* Buttons can now be any of the following sizes: mini, small, regular, or large.
* `PushButton.isSecondary` is now `PushButton.secondary`.
* `MacosAlertDialog`: `primaryButton` and `secondaryButton` are now declared to be of type `PushButton`.
* `RelevanceIndicator` has been deprecated
* `MacosTypography` white and black are now factory constructors called `darkOpaque()` and `lightOpaque()` to reflect
Apple's naming conventions.

### ✨ New ✨
* `MacosSwitch` has been completely rewritten and now matches the native macOS switch in appearance and behavior.
* A `ControlSize` enum has been introduced, which will allow widgets to more closely match their native counterparts.
* `MacosTypography`
* You can now call `MacosTypography.of(context)` as a shorthand for retrieving the typography used in your `MacosTheme`.
* `MacosFontWeight` allows using Apple-specific font weights like `w510`, `w590`, and `w860`.
* Localization
* Added support for `weekdayAbbreviations` and `monthAbbreviations` to `MacosDatePicker`.
* Added support for `dateFormat` to `MacosDatePicker`.
* Added support for `startWeekOnMonday` to `MacosDatePicker`.

### 🔄 Updated 🔄
* `MacosColor` has been updated with some previously missing elements.
* `PushButton`
* Now uses the correct `body` text style instead of the incorrect `headline`
* `PushButton`'s secondary and disabled colors more closely match their native counterparts.
* `MacosCheckbox` appearance more closely matches its native counterpart.
* `MacosAlertDialog`
* `primaryButton` and `secondaryButton` are now required to have `controlSize`s of `ControlSize.large`.
* Docs now suggest that `appIcon` should be of size 64x64.
* `Toolbar` now uses the correct `title3` text style instead of the incorrect `headline`
* `MacosTheme` sets the global typography more efficiently
* `HelpButton` now sizes itself according to specification
* `ResizablePane` can now disallow the usage of its internal scrollbar via the `ReziablePane.noScrollBar` constructor.

### 🛠️ Fixed 🛠️
* Clicking on the calendar elements in `MacosDatePicker` has better UX
* `ToolBar`s in use where a `SideBar` is not present will now have their title's avoid the traffic lights (native window controls).
* `MacosTypography.darkOpaque()` and `MacosTypography.lightOpaque()` now conform to specification by using `MacosColors.labelColor`
* Ensure builds targeting web do not utilize any `macos_window_utils` code
* Ensure builds targeting web are themed correctly

## [1.12.5]
* Fixed a bug where the `Sidebar.key` parameter wasn't used, which caused certain layouts to be unachievable.

## [1.12.4]
* Default the `_selectedDay` state variable to be 1 when selecting the previous/next month from widget to ensure new date is valid for `_formatAsDateTime()` method (https://github.com/flutter/flutter/issues/123669 & https://github.com/macosui/macos_ui/pull/402)

## [1.12.3]
* Added support for `routerConfig` to `MacosApp.router`. ([#388](https://github.com/macosui/macos_ui/issues/388))

## [1.12.2]
* Fixed a bug where clicking on a overflowed toolbar item with a navigation callback wouldn't work ([#346](https://github.com/GroovinChip/macos_ui/issues/346)).

## [1.12.1+1]
* Fixed a typo in the December abbreviation displayed in the `MacosDatePicker`.

## [1.12.1]
* Fix SidebarItem's leading icons not respecting the theme's primary color

## [1.12.0]
✨ New widget: `SliverToolBar`

## [1.11.1]
* Fixed an issue where the `MacosSearchField` would not perform an action when an item was selected.

## [1.11.0]
* 🚨 Breaking Changes 🚨
* `ResizablePane` can now be vertically resized
* `ResizablePane.startWidth` has been changed to `ResizablePane.startSize`
* `ResizablePane.minWidth` has been changed to `ResizablePane.minSize`
* `ResizablePane.maxWidth` has been changed to `ResizablePane.maxSize`

## [1.10.0]
🚨 Breaking Changes 🚨
* `MacosScrollbar` has been completely overhauled and now resembles the native macOS scrollbar in appearance and
behavior. Previously, it wrapped the material scrollbar, and now creates a custom scrollbar that extends
`RawScrollbar`. This resulted in the removal of several material-based properties for the scrollbar, and
`ContentArea.builder` is once again a `ScrollableWidgetBuilder`! 🎉
* Removed material-based scrollbar properties from `MacosScrollbarThemeData`

Other changes:
* Added implementation of `MacosDisclosureButton`
* Fixed a bug where `CapacityIndicator` only worked correctly for splits = 10

## [1.9.1]
* Adds optional `initialDate` to `MacosDatePicker`

## [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 All @@ -21,20 +140,20 @@

## [1.7.0]
* ✨ New
* `MacosImageIcon` widget. Identical to the `ImageIcon` from `flutter/widgets.dart` except it will obey a
* `MacosImageIcon` widget. Identical to the `ImageIcon` from `flutter/widgets.dart` except it will obey a
`MacosIconThemeData` instead of an `IconThemeData`
* `SidebarItemSize` enum, which determines the height of sidebar items and the maximum size their `leading` widgets.
* `SidebarItem` now accepts an optional `trailing` widget.
* 🔄 Updated
* `SidebarItems` now supports `SidebarItemSize` via the `itemSize` property, which defaults to
`SidebarItemSize.medium`. The widget has been updated to manage the item's height, the maximum size of the item's
* `SidebarItems` now supports `SidebarItemSize` via the `itemSize` property, which defaults to
`SidebarItemSize.medium`. The widget has been updated to manage the item's height, the maximum size of the item's
leading widget, and the font size of the item's label widget according to the given `SidebarItemSize`.
* The example app has been tweaked to use some icons from the SF Symbols 4 Beta via the new `MacosImageIcon` widget.

## [1.6.0]
* New widgets: `MacosTabView` and `MacosTabView`
* BREAKING CHANGE: `Label.yAxis` has been renamed to `Label.crossAxisAlignment`
* BREAKING CHANGE: `TooltipTheme` and `TooltipThemeData` have been renamed to `MacosTooltipTheme` and
* BREAKING CHANGE: `TooltipTheme` and `TooltipThemeData` have been renamed to `MacosTooltipTheme` and
`MacosTooltipThemeData`

## [1.5.1]
Expand All @@ -51,14 +170,14 @@ leading widget, and the font size of the item's label widget according to the gi
* Update `pubspec.yaml` with `repository` and new `homepage` field.

## [1.4.1]
* Fixes an issue where if the app was displayed in full screen mode, an opaque empty toolbar would appear at the top [#249](https://github.com/GroovinChip/macos_ui/issues/249)
* Fixes an issue where if the app was displayed in full screen mode, an opaque empty toolbar would appear at the top [#249](https://github.com/GroovinChip/macos_ui/issues/249)

## [1.4.0]
* Migration to Flutter 3.0
* Minimum dart sdk version is now 2.17.0
* Use new super parameters feature
* Update to `flutter_lints: ^2.0.1` with subsequent fixes
* `MacosScrollbar` API more closely matches its material counterpart
* `MacosScrollbar` API more closely matches its material counterpart
* Update `MacosColor` to more closely match the `Color` class
* Adds `MacosColor.fromARGB` constructor
* Adds `MacosColor.fromRGBO` constructor
Expand All @@ -73,7 +192,7 @@ leading widget, and the font size of the item's label widget according to the gi
* Fix `MacosApp` documentation

## [1.2.1]
* Fixes issue with error thrown when toolbar actions are modified programmatically [#239](https://github.com/GroovinChip/macos_ui/issues/239)
* Fixes issue with error thrown when toolbar actions are modified programmatically [#239](https://github.com/GroovinChip/macos_ui/issues/239)

## [1.2.0]
* Improved styling for `MacosTooltip`:
Expand Down Expand Up @@ -131,7 +250,7 @@ leading widget, and the font size of the item's label widget according to the gi
* Switch over to `flutter_lints`

## [0.12.4+1]
* Improve visual design of `MacosPopupButton` and `MacosPulldownButton`, to better match the styling and translucency effect of Apple design.
* Improve visual design of `MacosPopupButton` and `MacosPulldownButton`, to better match the styling and translucency effect of Apple design.
* Remove unnecessary properties of `MacosPopupButton`

## [0.12.4]
Expand Down Expand Up @@ -181,7 +300,7 @@ leading widget, and the font size of the item's label widget according to the gi

## [0.10.0]
* New widget - `MacosIcon`! `MacosIcon` is identical to regular icons, with the exception that it respects a `MacosTheme`. Also includes corresponding theme classes
* `MacosThemeData` now sets a global, configurable `iconTheme` for `MacosIcon`s
* `MacosThemeData` now sets a global, configurable `iconTheme` for `MacosIcon`s

## [0.9.3]
* Update to `PushButton`:
Expand Down Expand Up @@ -222,7 +341,7 @@ leading widget, and the font size of the item's label widget according to the gi
* Added `==` and `hashCode` to various classes

## [0.7.1]
* Add generics support to `MacosRadioButton` - Thank you [Sacha Arbonel](https://github.com/sachaarbonel)!
* Add generics support to `MacosRadioButton` - Thank you, [Sacha Arbonel](https://github.com/sachaarbonel)!

## [0.7.0+2]
* Add note in docs that a `Builder` is required for manual sidebar toggling to work.
Expand All @@ -244,7 +363,7 @@ leading widget, and the font size of the item's label widget according to the gi
## [0.6.0]
* Improved `MacosAlertDialog` design
* Added `showMacosAlertDialog` to display a `MacosAlertDialog` with standard macOS animations and behaviour.

## [0.5.2]
* Fixes maximum height issue with `MacosAlertDialog`

Expand Down Expand Up @@ -279,7 +398,7 @@ leading widget, and the font size of the item's label widget according to the gi
* `Switch` -> `MacosSwitch`

## [0.2.4]
* Fix textfield prefix icon alignment
* Fix text field prefix icon alignment

## [0.2.3]
* Add `canvasColor` to `MacosThemeData`. `Scaffold` now uses this as its default background color.
Expand Down Expand Up @@ -311,7 +430,7 @@ leading widget, and the font size of the item's label widget according to the gi
* Updated the theme api
* Properties in `MacosThemeData` and in `Typography` can't be null
* Renamed `DynamicColorX` to `MacosDynamicColor`
* Added the method `lerp` on all theme datas.
* Added the method `lerp` on all theme data classes.

## [0.1.1]
* Implemented `Label` ([#61](https://github.com/GroovinChip/macos_ui/issues/61))
Expand Down Expand Up @@ -359,11 +478,11 @@ leading widget, and the font size of the item's label widget according to the gi
## [0.0.4]
* Major theme refactor that more closely resembles flutter/material and flutter/cupertino
* The `Style` class is now `MacosThemeData`
* `MacosTheme` is now a `StatelessWidget` that returns a private `_InheritedMacosTheme`.
* `MacosTheme` is now a `StatelessWidget` that returns a private `_InheritedMacosTheme`.
The static `MacosTheme.of(context)` is now defined here.
* `MacosApp` now takes a `theme` and `darkTheme` rather than `style` and `darkStyle`.
Additionally, there are minor changes to the way `MacosApp` is built that more closely
resemble how `MaterialApp` is built.
* `MacosApp` now takes a `theme` and `darkTheme` rather than `style` and `darkStyle`.
Additionally, there are minor changes to the way `MacosApp` is built that more closely
resemble how `MaterialApp` is built.

## [0.0.3]

Expand Down
Loading

0 comments on commit b17546a

Please sign in to comment.