-
Notifications
You must be signed in to change notification settings - Fork 245
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
Mark as resolved/unresolved prep 1 #1242
base: main
Are you sure you want to change the base?
Changes from all commits
5e8d0a8
b0251d7
e7dee29
64b3116
2525524
1fbe495
61a588f
d8b922f
dd4715e
3ef535f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,20 @@ void _showActionSheet( | |
}); | ||
} | ||
|
||
/// A button in an action sheet. | ||
/// | ||
/// When built from server data, the action sheet ignores changes in that data; | ||
/// we intentionally don't live-update the buttons on events. | ||
/// If a button's label, action, or position changes suddenly, | ||
/// it can be confusing and make the on-tap behavior unexpected. | ||
/// Better to let the user decide to tap | ||
Comment on lines
+69
to
+73
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, yeah. Looking for That one shouldn't cause this problem in practice, though, because it changes by the user's own action. (Or by the message getting deleted, but then it doesn't matter whether the user tries to add a reaction or remove one.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In a quick manual test, I don't even see the
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Right, but then it's still your own action — you know that you just made that change (even though via a different client). So there isn't a risk of confusion. |
||
/// based on information that's comfortably in their working memory, | ||
/// even if we sometimes have to explain (where we handle the tap) | ||
/// that that information has changed and they need to decide again. | ||
Comment on lines
+73
to
+76
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A key point here is that these races are always possible anyway — the change may have happened on the server but not reached us yet. |
||
/// | ||
/// (Even if we did live-update the buttons, it's possible anyway that a user's | ||
/// action can race with a change that's already been applied on the server, | ||
/// because it takes some time for the server to report changes to us.) | ||
abstract class ActionSheetMenuItemButton extends StatelessWidget { | ||
const ActionSheetMenuItemButton({super.key, required this.pageContext}); | ||
|
||
|
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.
And this can move from lib/api/model/events.dart to lib/api/model/model.dart, since it's no longer specific to an event.