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

Improve MacosTooltip, add tooltip property to toolbar items, and implement ToolbarDivider (closes #231, #232) #234

Merged
merged 10 commits into from
May 8, 2022

Conversation

whiplashoo
Copy link
Collaborator

This PR includes:

Improved MacosTooltip

While working on the rest of the PR's items, I found that the current MacosTooltip was a bit different than the one used in Apple design, so I decided to work on this as well.

Before:

Screenshot 2022-05-08 at 10 22 24 PM

After:

Screenshot 2022-05-08 at 4 56 05 PM

Screenshot 2022-05-08 at 4 56 55 PM

Apple design (Finder app):

Screenshot 2022-05-08 at 10 23 06 PM

To sum up the changes:

  • Different color, padding and shadows.
  • The tooltip now appears left-aligned, below the mouse cursor.

In implementing the above, I also noticed that the way that theme values were passed to the widget was different from how we do it for other components. So, I refactored some of its methods and got rid of some that weren't used at all, to have it work similarly to the rest of the widgets. To sum up:

  • Added a TooltipTheme (previously it was derived straight from the MacosTheme's TooltipThemeData).
  • Tooltip's styling can now be controlled fully via the current TooltipTheme, with the standard one being the Apple design default.

Tooltip property for Toolbar items

Can now use an optional tooltipMessage property for all ToolBar items, to have a MacosTooltip shown below on hover. Closes #232 .

ToolbarDivider widget

A simple utility widget to display a divider between toolbar items. Below screen from the example app and the Notes app for comparison:

Screenshot 2022-05-07 at 10 58 48 PM

Closes #231.

Pre-launch Checklist

  • [👍 ] I have run dartfmt on all changed files
  • [ 👍 ] I have incremented the package version as appropriate and updated CHANGELOG.md with my changes
  • [👍 ] I have added/updated relevant documentation
  • [👍 ] I have run "optimize/organize imports" on all changed files
  • [👍 ] I have addressed all analyzer warnings as best I could

@whiplashoo whiplashoo requested a review from GroovinChip May 8, 2022 19:35
Copy link
Collaborator

@GroovinChip GroovinChip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you as always for your hard work and dedication! I appreciate you immensely!

@GroovinChip GroovinChip merged commit cc87bb8 into dev May 8, 2022
@GroovinChip GroovinChip deleted the toolbar_tooltip_divider branch May 8, 2022 19:48
GroovinChip added a commit that referenced this pull request May 8, 2022
* `MacosColorWell` docfix (#219)

* docs: fix color well docs

* chore: bump version & changelog

* Version 1.0.1 (#222)

* Display search results when searching from a `MacosSearchField` (closes #216) (#224)

* feat: implement showing suggestions below/above MacosSearchField

* refactor: set and clean up MacosSearchField properties

* chore: make offset method private

* refactor: remove expanded suggestions mode

* refactor: clean up and remove unnecessary properties

* refactor: add ability to supply onSelected callback to individual search suggestion items, extend example

* fix: show overlay at proper vertical offset

* chore: minor clean up of the fields page

* refactor: use MacosOverlayFilter for all frosted glass effects of menus and dropdowns

* chore: remove unnecessary imports

* docs: document MacosSearchField

* chore: explain how to retrieve searchKey property via onSuggestionSelected

* docs: document onChanged property

* feat: add MacosSearchFieldTheme

* chore: clean up MacosSearchFieldTheme

* test: add test for MacosSearchField

* test: add test for MacosSearchFieldTheme

* refactor: improve emptyWidget and fields example

* refactor: use results instead of suggestions

* docs: update README

* chore: update changelog and pubspec

* test: fix textual date picker test

* refactor: rename suggestionHeight to resultHeight

* Update CHANGELOG.md

* Update lib/src/fields/search_field.dart

* Update lib/src/fields/search_field.dart

* Update lib/src/fields/search_field.dart

* Update lib/src/fields/search_field.dart

* Update lib/src/fields/search_field.dart

* Update lib/src/theme/overlay_filter.dart

* Update lib/src/theme/overlay_filter.dart

* Update lib/src/theme/search_field_theme.dart

* Update lib/src/theme/search_field_theme.dart

* Update lib/src/theme/search_field_theme.dart

* Update lib/src/theme/search_field_theme.dart

* Update pubspec.yaml

* chore: run pub get

* chore: run flutter format lib

* refactor: remove height property from MacosOverlayFilter and add documentation

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

* `CustomToolbarItem` widget  (#228)

* implement CustomToolbarItem widget

* chore: update README, changelog and pubspec

* test: fix date picker test

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

* Version `1.1.0+1` - Readme updates (#233)

* Improve `MacosTooltip`, add tooltip property to toolbar items, and implement `ToolbarDivider` (closes #231, #232) (#234)

Co-authored-by: Minas Giannekas <whiplashoo@users.noreply.github.com>
GroovinChip added a commit that referenced this pull request May 9, 2022
* `MacosColorWell` docfix (#219)

* docs: fix color well docs

* chore: bump version & changelog

* Version 1.0.1 (#222)

* Display search results when searching from a `MacosSearchField` (closes #216) (#224)

* feat: implement showing suggestions below/above MacosSearchField

* refactor: set and clean up MacosSearchField properties

* chore: make offset method private

* refactor: remove expanded suggestions mode

* refactor: clean up and remove unnecessary properties

* refactor: add ability to supply onSelected callback to individual search suggestion items, extend example

* fix: show overlay at proper vertical offset

* chore: minor clean up of the fields page

* refactor: use MacosOverlayFilter for all frosted glass effects of menus and dropdowns

* chore: remove unnecessary imports

* docs: document MacosSearchField

* chore: explain how to retrieve searchKey property via onSuggestionSelected

* docs: document onChanged property

* feat: add MacosSearchFieldTheme

* chore: clean up MacosSearchFieldTheme

* test: add test for MacosSearchField

* test: add test for MacosSearchFieldTheme

* refactor: improve emptyWidget and fields example

* refactor: use results instead of suggestions

* docs: update README

* chore: update changelog and pubspec

* test: fix textual date picker test

* refactor: rename suggestionHeight to resultHeight

* Update CHANGELOG.md

* Update lib/src/fields/search_field.dart

* Update lib/src/fields/search_field.dart

* Update lib/src/fields/search_field.dart

* Update lib/src/fields/search_field.dart

* Update lib/src/fields/search_field.dart

* Update lib/src/theme/overlay_filter.dart

* Update lib/src/theme/overlay_filter.dart

* Update lib/src/theme/search_field_theme.dart

* Update lib/src/theme/search_field_theme.dart

* Update lib/src/theme/search_field_theme.dart

* Update lib/src/theme/search_field_theme.dart

* Update pubspec.yaml

* chore: run pub get

* chore: run flutter format lib

* refactor: remove height property from MacosOverlayFilter and add documentation

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

* `CustomToolbarItem` widget  (#228)

* implement CustomToolbarItem widget

* chore: update README, changelog and pubspec

* test: fix date picker test

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

* Version `1.1.0+1` - Readme updates (#233)

* Improve `MacosTooltip`, add tooltip property to toolbar items, and implement `ToolbarDivider` (closes #231, #232) (#234)

* Fix toolbar `actions` RangeError (closes #239) (#240)

Co-authored-by: Minas Giannekas <whiplashoo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💡 Tooltip property for all toolbar items 💡 ToolBarDivider widget
2 participants