Explain why the rating filter is disabled#3032
Merged
veloce merged 1 commit intoApr 25, 2026
Merged
Conversation
The rating filter is disabled whenever the user's rating for the selected perf is provisional. Previously the UI showed the filter as greyed-out with no explanation, leaving users confused about why they couldn't use it. Tapping the disabled rating filter now opens an adaptive dialog with the existing localized message `ratingRangeIsDisabledBecauseYourRatingIsProvisional` explaining the cause. Applied in both places the filter is rendered: - The real-time lobby sheet (`create_game_widget.dart`) — the `OutlinedButton` now has an `onPressed` that shows the dialog when the filter is unavailable, with `foregroundColor` set to the theme's disabled color to preserve the greyed-out look. - The inline `PlayRatingRange` widget (`common_play_widgets.dart`) used by the correspondence sheet — the disabled `ListTile` is wrapped in `IgnorePointer` + `GestureDetector(HitTestBehavior.opaque)` so the inner `NonLinearSlider` widgets cannot swallow the tap in the gesture arena. A `SnackBar` was tried first but is invisible behind modal bottom sheets (it anchors to the root `ScaffoldMessenger`), so a dialog route is used instead — it pushes on top of the sheet. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
14d5992 to
ae2778b
Compare
Contributor
|
Thanks for this. I've added a small improvement: an info icon next to the "rating filter" label when the button is disabled. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a user's rating for the selected perf is provisional, the rating filter in the lobby game creator is disabled. Previously the UI just showed it greyed-out with no explanation — users were left wondering why they couldn't use it (see e.g. #3011 where the reporter asked why the filter is "always blocked out").
Now tapping the disabled rating filter opens an adaptive dialog with the existing localized string
ratingRangeIsDisabledBecauseYourRatingIsProvisional:Changes are in two places, since the filter is rendered twice:
create_game_widget.dart) — theOutlinedButtongets anonPressedthat shows the dialog when unavailable;foregroundColoris set to the theme's disabled color to keep the greyed-out appearance.PlayRatingRange(common_play_widgets.dart) used by the correspondence sheet — the disabledListTileis wrapped inIgnorePointer+GestureDetector(HitTestBehavior.opaque)so the innerNonLinearSliderwidgets don't swallow the tap in the gesture arena.A
SnackBarwas tried first but renders behind modal bottom sheets (it anchors to the rootScaffoldMessenger), so a dialog route is used instead.Test plan
flutter analyzeclean on both filesdart formatcleanAndroid.alert.for.rating.filter.mp4
🤖 Generated with Claude Code