Skip to content

Slider does not show changed label value for keyboard users fix #152886

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

Merged
merged 10 commits into from
Aug 6, 2024

Conversation

DBowen33
Copy link
Contributor

@DBowen33 DBowen33 commented Aug 5, 2024

Fix issue to where keyboard users could not see visual indicator label of changed value in Slider

Before:
Screen recording 2024-08-05 12.16.24 PM.webm

After:
Screen recording 2024-08-05 12.38.20 PM.webm

Fixes #152884
Fixes b/340638215

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Aug 5, 2024
@DBowen33 DBowen33 marked this pull request as ready for review August 5, 2024 19:40
@DBowen33 DBowen33 changed the title Slider semantics fix Slider does not show changed label value for keyboard users fix Aug 5, 2024
@chunhtai chunhtai requested a review from QuncCccccc August 5, 2024 20:22
Copy link
Contributor

@QuncCccccc QuncCccccc left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! Looks good to me, just left one question.

@@ -1818,6 +1818,7 @@ class _RenderSlider extends RenderBox with RelayoutWhenSystemFontsChangeMixin {
final double increase = increaseValue();
onChanged!(increase);
onChangeEnd!(increase);
_state.showValueIndicator();
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we check whether _state is mounted before? Like:

    if (!_state.mounted) {
      return;
    }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed! Added check like code snippet in lines 1493 - 1495.

@QuncCccccc QuncCccccc requested a review from TahaTesser August 5, 2024 23:07
@DBowen33 DBowen33 requested a review from QuncCccccc August 5, 2024 23:50
Copy link
Contributor

@QuncCccccc QuncCccccc left a comment

Choose a reason for hiding this comment

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

LGTM:) Thanks!

Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
Copy link
Contributor

@Renzo-Olivares Renzo-Olivares left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix!

@QuncCccccc QuncCccccc added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 6, 2024
Copy link
Contributor

@MitchellGoodwin MitchellGoodwin left a comment

Choose a reason for hiding this comment

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

Code looks good to me. But should we wait to show the label until they use arrow keys, or should we show it right away once the slider is focused? If somebody using keyboard interaction just wanted to see the label, they'd have to go either up or down first which feels awkward. Also, in the video the label appearing briefly before moving to the next value looks jerky. Showing the label on focus seems like it would be smoother, but not doing so originally seemed intentional.

@auto-submit auto-submit bot merged commit 93b55ed into flutter:master Aug 6, 2024
70 checks passed
@QuncCccccc
Copy link
Contributor

should we wait to show the label until they use arrow keys, or should we show it right away once the slider is focused?

Thanks for catching this! I just checked the Material Design website, seems based on the specs here, we probably should show the label right away once the slider is focused.

@DBowen33
Copy link
Contributor Author

DBowen33 commented Aug 6, 2024

should we wait to show the label until they use arrow keys, or should we show it right away once the slider is focused?

Thanks for catching this! I just checked the Material Design website, seems based on the specs here, we probably should show the label right away once the slider is focused.

Thanks for the catch as well! Created a new issue (#152961) with corresponding PR (#152960) to show label to user on focus

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 7, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 7, 2024
Manual roll requested by tarrinneal@google.com

flutter/flutter@1dd7141...0a7f8af

2024-08-06 rmolivares@renzo-olivares.dev Support clearing selection programmatically through SelectableRegionState (flutter/flutter#152882)
2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from aabd582e9c7e to 206e86ee8a40 (4 revisions) (flutter/flutter#152962)
2024-08-06 49699333+dependabot[bot]@users.noreply.github.com Bump actions/upload-artifact from 4.3.4 to 4.3.6 (flutter/flutter#152964)
2024-08-06 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.15 to 3.26.0 (flutter/flutter#152965)
2024-08-06 andrewrkolos@gmail.com [tool] Guard process writes to frontend server in `ResidentCompiler` (flutter/flutter#152358)
2024-08-06 zanderso@users.noreply.github.com Fix Linux_android_emu tests late initialization errors (flutter/flutter#152932)
2024-08-06 fluttergithubbot@gmail.com Marks Mac integration_ui_test_test_macos to be flaky (flutter/flutter#152213)
2024-08-06 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#152956)
2024-08-06 pateltirth454@gmail.com [API Examples] `scroll_direction.0_test.dart` & `growth_direction.0_test.dart` (flutter/flutter#152941)
2024-08-06 jonahwilliams@google.com [devicelab] opt gallery benchmarks and platform view test into merged thread mode. (flutter/flutter#152940)
2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from e97955bf12ac to aabd582e9c7e (1 revision) (flutter/flutter#152948)
2024-08-06 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#152945)
2024-08-06 59215665+davidhicks980@users.noreply.github.com [material/menu_anchor.dart] MenuAnchor focus refactoring for RawMenuAnchor (flutter/flutter#150950)
2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 99da2cab3f6d to e97955bf12ac (2 revisions) (flutter/flutter#152944)
2024-08-06 gazal.gafoor.k@gmail.com fix: add parameter to maintainState of SearchDelegate (flutter/flutter#152444)
2024-08-06 34465683+rkishan516@users.noreply.github.com Feat: Add fillColor property for cupertinoCheckbox (flutter/flutter#151761)
2024-08-06 42016383+DBowen33@users.noreply.github.com Slider does not show changed label value for keyboard users fix (flutter/flutter#152886)
2024-08-06 nate.w5687@gmail.com Add Nate Wilson to authors (flutter/flutter#152907)
2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 7fc38bef4775 to 99da2cab3f6d (1 revision) (flutter/flutter#152934)
2024-08-06 engine-flutter-autoroll@skia.org Roll Packages from 82e8d1e to 551bde5 (12 revisions) (flutter/flutter#152930)
2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from 84116159ebfc to 7fc38bef4775 (1 revision) (flutter/flutter#152924)
2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from f75ffb65cfe3 to 84116159ebfc (1 revision) (flutter/flutter#152917)
2024-08-06 engine-flutter-autoroll@skia.org Roll Flutter Engine from f5f6e966e7e7 to f75ffb65cfe3 (2 revisions) (flutter/flutter#152915)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC rmistry@google.com,stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TytaniumDev pushed a commit to TytaniumDev/flutter that referenced this pull request Aug 7, 2024
…ter#152886)

Fix issue to where keyboard users could not see visual indicator label of changed value in Slider

Before: 
[Screen recording 2024-08-05 12.16.24 PM.webm](https://github.com/user-attachments/assets/89b99423-7856-4b25-86de-b211b2dbe178)

After:
[Screen recording 2024-08-05 12.38.20 PM.webm](https://github.com/user-attachments/assets/641f9065-8279-4b79-89b1-b5bcd3d691a8)

Fixes flutter#152884
Fixes b/340638215
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…ter#152886)

Fix issue to where keyboard users could not see visual indicator label of changed value in Slider

Before: 
[Screen recording 2024-08-05 12.16.24 PM.webm](https://github.com/user-attachments/assets/89b99423-7856-4b25-86de-b211b2dbe178)

After:
[Screen recording 2024-08-05 12.38.20 PM.webm](https://github.com/user-attachments/assets/641f9065-8279-4b79-89b1-b5bcd3d691a8)

Fixes flutter#152884
Fixes b/340638215
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2024
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: 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.

Slider does not show changed label value for keyboard users
4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy