Skip to content

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.

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!

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
@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 [email protected]

flutter/flutter@1dd7141...0a7f8af

2024-08-06 [email protected] Support clearing selection programmatically through SelectableRegionState (flutter/flutter#152882)
2024-08-06 [email protected] 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 [email protected] [tool] Guard process writes to frontend server in `ResidentCompiler` (flutter/flutter#152358)
2024-08-06 [email protected] Fix Linux_android_emu tests late initialization errors (flutter/flutter#152932)
2024-08-06 [email protected] Marks Mac integration_ui_test_test_macos to be flaky (flutter/flutter#152213)
2024-08-06 [email protected] Roll pub packages (flutter/flutter#152956)
2024-08-06 [email protected] [API Examples] `scroll_direction.0_test.dart` & `growth_direction.0_test.dart` (flutter/flutter#152941)
2024-08-06 [email protected] [devicelab] opt gallery benchmarks and platform view test into merged thread mode. (flutter/flutter#152940)
2024-08-06 [email protected] Roll Flutter Engine from e97955bf12ac to aabd582e9c7e (1 revision) (flutter/flutter#152948)
2024-08-06 [email protected] Roll pub packages (flutter/flutter#152945)
2024-08-06 [email protected] [material/menu_anchor.dart] MenuAnchor focus refactoring for RawMenuAnchor (flutter/flutter#150950)
2024-08-06 [email protected] Roll Flutter Engine from 99da2cab3f6d to e97955bf12ac (2 revisions) (flutter/flutter#152944)
2024-08-06 [email protected] fix: add parameter to maintainState of SearchDelegate (flutter/flutter#152444)
2024-08-06 [email protected] Feat: Add fillColor property for cupertinoCheckbox (flutter/flutter#151761)
2024-08-06 [email protected] Slider does not show changed label value for keyboard users fix (flutter/flutter#152886)
2024-08-06 [email protected] Add Nate Wilson to authors (flutter/flutter#152907)
2024-08-06 [email protected] Roll Flutter Engine from 7fc38bef4775 to 99da2cab3f6d (1 revision) (flutter/flutter#152934)
2024-08-06 [email protected] Roll Packages from 82e8d1e to 551bde5 (12 revisions) (flutter/flutter#152930)
2024-08-06 [email protected] Roll Flutter Engine from 84116159ebfc to 7fc38bef4775 (1 revision) (flutter/flutter#152924)
2024-08-06 [email protected] Roll Flutter Engine from f75ffb65cfe3 to 84116159ebfc (1 revision) (flutter/flutter#152917)
2024-08-06 [email protected] 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 [email protected],[email protected],[email protected] 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
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
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