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

MacosTabView & MacosTab #206

Closed
wants to merge 27 commits into from
Closed

MacosTabView & MacosTab #206

wants to merge 27 commits into from

Conversation

Andrewngabriel
Copy link
Contributor

@Andrewngabriel Andrewngabriel commented Apr 24, 2022

Add Tabview

Closes #70

Demo:

tabview_demo.mov

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

@codecov
Copy link

codecov bot commented Apr 24, 2022

Codecov Report

Merging #206 (e37f250) into dev (aad57cb) will increase coverage by 5.75%.
The diff coverage is 1.61%.

❗ Current head e37f250 differs from pull request most recent head 1d8f486. Consider uploading reports for the commit 1d8f486 to get more accurate results

@@            Coverage Diff             @@
##              dev     #206      +/-   ##
==========================================
+ Coverage   59.25%   65.00%   +5.75%     
==========================================
  Files          56       47       -9     
  Lines        5016     4324     -692     
==========================================
- Hits         2972     2811     -161     
+ Misses       2044     1513     -531     
Impacted Files Coverage Δ
lib/src/layout/tab.dart 0.00% <0.00%> (ø)
lib/src/layout/tab_view.dart 2.08% <2.08%> (ø)
lib/src/theme/icon_theme.dart 74.57% <0.00%> (-3.39%) ⬇️
lib/src/utils.dart 46.66% <0.00%> (-3.34%) ⬇️
lib/src/buttons/icon_button.dart 93.40% <0.00%> (-2.20%) ⬇️
lib/src/theme/pulldown_button_theme.dart 84.21% <0.00%> (-1.84%) ⬇️
lib/src/layout/window.dart 79.38% <0.00%> (-1.19%) ⬇️
lib/src/selectors/date_picker.dart 88.23% <0.00%> (-0.10%) ⬇️
lib/src/layout/scaffold.dart 100.00% <0.00%> (ø)
lib/src/fields/text_field.dart 45.75% <0.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e19180a...1d8f486. Read the comment docs.

@Andrewngabriel Andrewngabriel marked this pull request as ready for review April 30, 2022 01:54
@Andrewngabriel Andrewngabriel changed the title [WIP] MacosTabView & MacosTab MacosTabView & MacosTab Apr 30, 2022
lib/src/layout/tab.dart Show resolved Hide resolved
lib/src/layout/tab.dart Show resolved Hide resolved
lib/src/layout/tab.dart Show resolved Hide resolved
lib/src/layout/tab.dart Outdated Show resolved Hide resolved
lib/src/layout/tab.dart Show resolved Hide resolved
lib/src/layout/tab_view.dart Show resolved Hide resolved
lib/src/layout/tab_view.dart Outdated Show resolved Hide resolved
lib/src/layout/tab_view.dart Outdated Show resolved Hide resolved
lib/src/layout/tab_view.dart Outdated Show resolved Hide resolved
lib/src/layout/tab_view.dart Outdated Show resolved Hide resolved
@GroovinChip GroovinChip self-requested a review April 30, 2022 18:33
* Minor API updates
* Updated color values
* Ensure Tab dividers get colored in correctly
* Added/updated documentation
* Sample app page fixes
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.

@Andrewngabriel Thanks for your hard work on this feature. If you don't mind, though, I'd like you to rework the API to something that more resembles Flutter's material Tab, TabBarView and TabController. I feel that the current API surface is too cumbersome. Setting the content of the body to a particular widget on each tab click, as well as setting the active index, is too much.

  • MaosTabView should take a List<Widget> children and a controller used for showing the child based on the index of the widget in the list and the current index of the controller
  • MacosTab itself should not be responding to clicks, the controller should be handling that.
  • When implemented an API like the above, don't worry about all the animation stuff - we don't need that here.

@dbsxdbsx
Copy link

dbsxdbsx commented May 7, 2022

So.... Is it ready to use? I can't find example code.

@GroovinChip
Copy link
Collaborator

So.... Is it ready to use? I can't find example code.

@dbsxdbsx No, it is not ready yet. I requested changes to this feature.

Speaking of - @Andrewngabriel are you working on those changes? I could take a crack at it if you're too busy.

@GroovinChip
Copy link
Collaborator

Closing in favor of #273

@GroovinChip GroovinChip closed this Jul 4, 2022
@GroovinChip GroovinChip deleted the feature/tab-view branch July 10, 2022 21:53
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.

MacosTabView & MacosTab
3 participants