-
Notifications
You must be signed in to change notification settings - Fork 333
Fixes #1808: Added UI Feedback on Poll Delay #1830
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
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for the PR @MritunjayTiwari14,
Let's fix up the commit message by following the commit style guidelines.
Something like:
poll: Display UI feedback on poll delay.
<description>
Fixes: #1808
Might be a better way to write this.
Feel free to add details and helpful info in the commit description.
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.
Starting a thread in the #mobile-design channel might be useful to gain initial feedback on this.
b87d1bb
to
3ddc690
Compare
Thank you very much for Reviewing! @apoorvapendse |
Okay, I will look forward into this Channel for further feedback. |
Cool, let's line wrap the description to <= 70 characters per line. |
If we show a spinner, I'd expect it to appear on the poll, not blocking the user from reading their other messages. |
I will make sure to use line wrap in the Description from Now, thank you. |
Okay, I’ll work on implementing a spinner similar to the Zulip web poll system. |
Improve Poll Vote Handling: Optimistic Updates with Store SynchronizationVideo Testing of Solutionrecord.mp4BackgroundWhile working on poll vote handling, we wanted the UI to feel responsive but also stay consistent with server-confirmed data. The requirement was:
Difficulties Faced
ResolutionAfter carefully studying the structure of the Poll model, the Model layer, and the API contract, we realized that a clean and reliable solution could be achieved by adopting optimistic updates with store synchronization:
Outcome
|
Extremely sorry for not removing the import that i used in my previous commit but then refactored my code so that it was not required which caused CI error. I have fixed that in the latest commit. |
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.
We don't want to keep merge commits in the PR branch.
Can you rebase this branch with upstream/main?
Sure! |
880bc90
to
536cbb7
Compare
@apoorvapendse Extremely Sorry for the inconvenience caused, when i tried to clean my commit history to start a fresh rebase. Git automatically closed this issue because it didn't found any commit from my origin/main. I have reopen the PR after rebasing upstream/main. |
5ad755c
to
af40234
Compare
af40234
to
3730c90
Compare
In this commit, we added Material, InkWell and Ink Widget to account for the Ink Splash effect for UI feedback. Fixes: zulip#1808
@gnprice It will be really helpful if I could get your feedback on the Updated Description of the Pull Request. |
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.
Thanks @MritunjayTiwari14, and thanks @apoorvapendse for the previous reviews! A couple of comments below.
Linking also the #mobile-design thread here: #mobile-design > loading indicator on voting in poll
child: Padding( | ||
// For accessibility, the touch target is padded to be larger | ||
// than the vote count box. Still, we avoid padding at the | ||
// start because we want to align all the poll options to the | ||
// surrounding messages. | ||
padding: const EdgeInsetsDirectional.only( |
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.
What's the reason for deleting this comment? Seems like it's still equally relevant.
color: Colors.transparent, | ||
child: InkWell( | ||
onTap: () => _toggleVote(option), | ||
child: Ink( |
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.
What's the effect of this Ink widget? Does the UI behave any differently if you take it out?
This catches my eye because we don't currently use an Ink widget anywhere else in the app (while we use Material and InkWell all the time).
Pull Request: [Ink Splash Poll Vote Indicator Implementation](polls: Add UI feedback on vote button while request pending #1808)
Hello Moderators of Zulip Flutter,
This is Mritunjay Tiwari.
This is my first ever contribution to Zulip.
📌 My Solution
Implementation Video and Images
test_video.mp4
After looking at the Suggestion for the issue made by the moderators, implementation of a Ink Splash upon Tap on Poll Vote is successfully done.
So, the implementation of the Ink Splash Widget is done by replacing the container of the Poll Vote button with a Ink Widget and introducing InkWell and Material Widgets as its ancestors. Making the Material as its Ancestors allows the Splash on of the Ink on the Button which eliminate the risk of leaking of the Splash outside the Poll Vote Button.
Thank you for reviewing my contribution!
💻 Code Snippet
(Added Comments here only to explain the changes, Review the diff for the changes without the addition of the comments)