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

feat: add a stack option to YaruChoiceChipBar #714

Merged
merged 5 commits into from Jun 22, 2023

Conversation

Feichtmeier
Copy link
Member

@Feichtmeier Feichtmeier commented Jun 22, 2023

This introduces a third option "stack" for the choice chip bar.

Bildschirmaufnahme.2023-06-22.um.11.34.18.mov

Since it changes the parameters of the widget I thought "feat!" was correct ❓

@Jupi007
Copy link
Member

Jupi007 commented Jun 22, 2023

Is it normal that the listView is visible below the nextButton but not below the previousButton in stacked mode?

@Feichtmeier Feichtmeier marked this pull request as draft June 22, 2023 09:45
@jpnurmi
Copy link
Member

jpnurmi commented Jun 22, 2023

I guess feat: is fine without an exclamation mark because the widget hasn't been released yet so the change is not breaking compared to a previous release

@Feichtmeier
Copy link
Member Author

ah! ok :)
will change this when I finalized the design. I have a better idea for the stack

@Feichtmeier
Copy link
Member Author

@Jupi007 @jpnurmi

I thought, why show them at all if they are disable in the stack?

My questions would be just:

  1. with or without a border
  2. if they are round, make the chips here round as well (not everywhere)?
Bildschirmaufnahme.2023-06-22.um.12.11.17.mov

@Jupi007
Copy link
Member

Jupi007 commented Jun 22, 2023

This look better 👍

I just have a few note:

  • What about add a fade in/out on buttons?
  • Maybe add a radius clip on the listView with the same radius as buttons, so chips border don't leak at corners.

@Feichtmeier
Copy link
Member Author

Bildschirmaufnahme.2023-06-22.um.12.40.40.mov

Clip was a good idea!
AnimatedContainer does not work, any other idea?

@Jupi007
Copy link
Member

Jupi007 commented Jun 22, 2023

AnimatedContainer does not work, any other idea?

Why is it not working? 🤔

@Feichtmeier
Copy link
Member Author

Feichtmeier commented Jun 22, 2023

No idea 🤷

if (_enableGoPreviousButton)
              AnimatedContainer(
                duration: const Duration(seconds: 5),
                curve: Curves.bounceInOut,
                child: Positioned(
                  left: 0,
                  child: goPreviousButton,
                ),
              ),

no animation 🤷
is it the wrong place?

@Jupi007
Copy link
Member

Jupi007 commented Jun 22, 2023

You need to use AnimatedOpacity, and always include the widget in the tree (drop if (_enableGoPreviousButton)):

              AnimatedOpacity(
                opacity: _enableGoPreviousButton ? 1.0 : 0.0,
                duration: const Duration(seconds: 5),
                curve: Curves.bounceInOut,
                child: Positioned(
                  left: 0,
                  child: goPreviousButton,
                ),
              ),

@Feichtmeier
Copy link
Member Author

Feichtmeier commented Jun 22, 2023

the other way round but now it works thanks!

Bildschirmaufnahme.2023-06-22.um.13.07.17.mov

@Feichtmeier Feichtmeier marked this pull request as ready for review June 22, 2023 11:08
@Feichtmeier Feichtmeier changed the title feat!: add a stack option to YaruChoiceChipBar feat: add a stack option to YaruChoiceChipBar Jun 22, 2023
Copy link
Member

@Jupi007 Jupi007 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Feichtmeier
Copy link
Member Author

Eventually I could add the option to parameterize the radius of the buttons and the chips because this may look better if everything was completely round

@Feichtmeier
Copy link
Member Author

@jpnurmi okay if I merge or anything you want to see changed in the design or code?

@jpnurmi
Copy link
Member

jpnurmi commented Jun 22, 2023

please go ahead, no need to wait for me

@Feichtmeier Feichtmeier merged commit efd764b into main Jun 22, 2023
5 checks passed
@Feichtmeier Feichtmeier deleted the yaru_choice_chip_bar_stack branch June 22, 2023 15:17
@github-actions github-actions bot mentioned this pull request Jun 29, 2023
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.

None yet

3 participants