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
Add Material 3 support for Slider
- Part 2
#114624
Conversation
fb456fa
to
4c555f6
Compare
@TahaTesser it looks like this triple digit one has clipping along the bottom of the digits, can you take a look? |
4c555f6
to
130528c
Compare
Great catch! Just fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks great! I am checking in with @darrenaustin about the question on the drop name.
@Piinks it was just first name that popped in my head as I was expecting something more official from team. Another name idea is 'PinValueIndicatorShape' as it looks like map pin (naming is difficult |
I hear that! Always a struggle for me. :) |
In my Android testing, I notice this particular shape in Slider is called TooltipDrawable but it sounds very generic and might be confused with tooltip widget shape. |
130528c
to
964bb91
Compare
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Added golden tests, this is ready for review. |
There aren't any images showing up, I wonder if it is because all of the commits here are forced pushed. Can you create a second commit and push it? I see there are 60 images on the backend, but they are all attributed to the same patchset, which may be causing the issue. I will be able to follow up with the Gold team tomorrow. https://flutter-gold.skia.org/json/v1/changelist_summary/github/114624 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// * [Slider], which includes a value indicator defined by this shape. | ||
/// * [SliderTheme], which can be used to configure the slider value indicator | ||
/// of all sliders in a widget subtree. | ||
class DropSliderValueIndicatorShape extends SliderComponentShape { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was going to say that the theme file is an odd place for this, but given that all the other shapes are defined in this file it would be good to keep them together. I think the name is fine. I checked with the Material team and they didn't seem to have a canonical name that we could find, so DropSliderValueIndicatorShape
it is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appreciate it!
); | ||
|
||
} finally { | ||
debugDisableShadows = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
Sure! just pushed an empty commit. |
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
That worked! Thanks! Can you take a peek and see if they look as expected? https://flutter-gold.skia.org/search?issue=114624&crs=github&patchsets=2&corpus=flutter Any text is swapped out for little boxes, that is expected |
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* 70b7445cb Reland Added Badge.count constructor (flutter/flutter#115566) * 31f863162 fa7e1965e [Impeller] Fix glyph atlas uploads and renders (flutter/engine#37691) (flutter/flutter#115556) * a1ea383fa Label should always be aligned with text in filled input decoration (flutter/flutter#115540) * c2b29501f Add selection feedback for both selection area and text field (flutter/flutter#115373) * 034440761 Rev package:pub_semver to the latest version (flutter/flutter#115570) * ac06523b7 Add Material 3 support for `Slider` - Part 2 (flutter/flutter#114624) * b181d07e0 a2fa4e9 cirrus to luci (flutter/plugins#6711) (flutter/flutter#115573) * e1efd0d39 b241e69fd [ui] reland add docs to FragmentShader (flutter/engine#37699) (flutter/flutter#115578) * efb069474 Remove unused flutter_attach_test_fuchsia (flutter/flutter#115515) * a5a368cbf 487ee66f6 [macOS] Merge FlutterRenderer and implementation (flutter/engine#37696) (flutter/flutter#115581) * 4ff7fc641 Fixes a bug where dragging a collapsed handle in TextField does not vibrate (flutter/flutter#115586) * 20be280cc da9534ea6 [macOS] Consolidate external texture classes (flutter/engine#37703) (flutter/flutter#115585) * 8a7102e7e Roll Flutter Engine from da9534ea6534 to d955a72c5604 (3 revisions) (flutter/flutter#115589) * e1903a2ad Roll Flutter Engine from d955a72c5604 to 1e1a4ab3c993 (4 revisions) (flutter/flutter#115592) * 78390a086 Roll Flutter Engine from 1e1a4ab3c993 to b65c24ce621a (2 revisions) (flutter/flutter#115598) * 75a0a7255 [devicelab] measure entire release folder size, zipped (flutter/flutter#115597) * 59a01b64f Roll Flutter Engine from b65c24ce621a to 49b52db603cc (3 revisions) (flutter/flutter#115606) * ec03f1c8c Revert "[devicelab] measure entire release folder size, zipped (#115597)" (flutter/flutter#115609) * 710e708cc Improve showSnackBar documentation (flutter/flutter#114612) * 915c3deb6 Roll Flutter Engine from 49b52db603cc to 80b25a302b4c (2 revisions) (flutter/flutter#115608) * 450f16245 Roll Flutter Engine from 80b25a302b4c to e812122e4060 (2 revisions) (flutter/flutter#115614) * 0b33b8592 [devicelab] measure entire release folder size, zipped (flutter/flutter#115612) * 9379c3233 Revert "[devicelab] measure entire release folder size, zipped (#115612)" (flutter/flutter#115617) * b746557a3 f27666d2f [macOS] Merge FlutterBackingStore implementations (flutter/engine#37730) (flutter/flutter#115616) * 5487a7deb Roll Flutter Engine from f27666d2f4da to 39f546585b0b (2 revisions) (flutter/flutter#115618) * f261c2f71 update comments (flutter/flutter#115603) * 9c9f7818a 04aea3c47 iOS PlatformView only sets a maskView when necessary (flutter/engine#37434) (flutter/flutter#115621) * 69269602e 4ca2c1d78 Roll Skia from 55f654bf5cff to 9d56e506b4df (13 revisions) (flutter/engine#37739) (flutter/flutter#115625) * de4c0b19a Use `double.isNaN` instead of `... == double.nan` (which is always false) (flutter/flutter#115424) * a655f8542 a62736769 Roll Skia from 9d56e506b4df to d693b4b9fe5e (5 revisions) (flutter/engine#37741) (flutter/flutter#115640) * 18c87274c f092cd826 Roll Fuchsia Mac SDK from SVtX810D2U_ZgBcpx... to tklUfTsSOVKk49tYq... (flutter/engine#37742) (flutter/flutter#115643)
* Add Material 3 support for Slider - Part 2 * Kick tests * Update drawing order to fix html renderer bug * Update test
* Add Material 3 support for Slider - Part 2 * Kick tests * Update drawing order to fix html renderer bug * Update test
Closes #111451
Description
This PR adds Material 3 value indicator shape to
Slider
.There is no official name that I could find for the M3 value indicator so I decided to call it
DropSliderValueIndicatorShape
as it resembles a water drop. (M2 value indicator isRectangularSliderValueIndicatorShape
and it looks like a rectangular box).DropSliderValueIndicatorShape
is based on existing code fromRectangularSliderValueIndicatorShape
.Added tests to check the default value indicator.
code sample
Preview
Flutter
Android
Filing as a draft to confirm the implementation and the name.Once confirmed I will add golden tests undertest/material/value_indicating_slider_test.dart
.Done.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.