Skip to content

Conversation

@gspencergoog
Copy link
Contributor

@gspencergoog gspencergoog commented Aug 15, 2022

Description

These are some collected miscellaneous changes to other classes, either just things I noticed while working on it, or some small changes that made the implementation easier.

Related Issues

Tests

  • Various new tests

@flutter-dashboard flutter-dashboard bot added f: focus Focus traversal, gaining or losing focus f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Aug 15, 2022
@gspencergoog gspencergoog force-pushed the menu_bar_misc branch 4 times, most recently from ac5f17c to 7fbb076 Compare August 15, 2022 23:42
@gspencergoog gspencergoog marked this pull request as ready for review August 15, 2022 23:42
Comment on lines 287 to 293
Copy link
Member

Choose a reason for hiding this comment

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

This is odd. Why does OutlinedBorder need special casing? Is the side just dropped on the floor if shape is not an OutlineBorder?

Copy link
Contributor Author

@gspencergoog gspencergoog Aug 16, 2022

Choose a reason for hiding this comment

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

This is because ShapeBorder doesn't have a BorderSide. Really, we should probably move the side up to ShapeBorder and just eliminate OutlinedBorder. The problem with that is that Border (a ShapeBorder that isn't an OutlinedBorder) wants four sides, not just one.

The reason I made this change is that I wanted to allow the shape of a menu to be a ShapeBorder, not just OutlinedBorder, but buttons weren't allowed to use ShapeBorder because of this code here, and it just seemed like people would look at that and go "Why can I give a shape border to a menu but not a menu button?". It also seems like in the limit that non-OutlinedBorder borders will just become second class citizens, and not be usable anywhere.

One thing I should probably be doing here was also checking to see if the shape is a Border or BorderDirectional, and applying the resolvedSide to all four sides.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, when I look at supporting Border and BorderDirectional, it doesn't really make sense, because basically all they are is a way to specify different border sides for each side, and if you specified one, and then the button's side overwrites them all, then it isn't much use, you might as well use a RoundedRectangleBorder instead. So for Border and BorderDirectional, I say yes, the side just gets dropped on the floor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I'm just going to revert this. It's too weird.

It means that people will wonder about why menu panels can use a Border, but menu buttons cannot, but that's not as weird as this was getting.

@gspencergoog gspencergoog force-pushed the menu_bar_misc branch 3 times, most recently from 9c602ca to f81d9ca Compare August 16, 2022 23:21
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

@gspencergoog gspencergoog added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 17, 2022
@auto-submit auto-submit bot merged commit 7a8c84f into flutter:master Aug 17, 2022
@gspencergoog gspencergoog deleted the menu_bar_misc branch August 17, 2022 20:43
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 18, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App f: focus Focus traversal, gaining or losing focus f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants