-
Notifications
You must be signed in to change notification settings - Fork 19
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
A probable fix to the snackbar issue #86
base: main
Are you sure you want to change the base?
Conversation
Reviewer's Guide by SourceryThis pull request addresses a bug in the snackbar functionality related to network connection status. The fix involves modifying the NetworkController class to store the state of the Snackbar and implement a conditional check before toggling its visibility. Updated class diagram for NetworkControllerclassDiagram
class NetworkController {
+bool isSnackBarOpen
+void checkNetworkStatus()
+void toggleSnackBar()
}
NetworkController : +bool isSnackBarOpen
NetworkController : +void checkNetworkStatus()
NetworkController : +void toggleSnackBar()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @himeshps - I've reviewed your changes and found some issues that need to be addressed.
Blocking issues:
- Closing curly brace for the NetworkController class has been removed (link)
Overall Comments:
- The description mentions changes that are not reflected in the diff. Please ensure all intended changes are committed and included in the pull request.
- For a timing-related bug fix, it's crucial to include tests that verify the solution. Please add appropriate tests to cover your changes.
- Could you provide more details on how you've tested this fix, given the time-sensitive nature of the issue?
Here's what I looked at during the review
- 🔴 General issues: 1 blocking issue
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@bmerchant22 @yashlm can you please review this and merge? |
I think we need to change the way we check connectivity, you can have a look on this question |
Description
It turns out that the issue was due to the time sensitivity of Get.isSnackBarOpen , which made it ocassionally miss the rapid toggling of the network connection and hence, persisting with the wrong pop-up even when connected to a network. I've tried fixing the issue by storing the state of the Snack Bar and a conditional check before sending the next command to close or open the pop-up again which avoids any such bug.
Related Issue
I believe it is a very specific issue and there are not any related issues as such.
(#69)
Motivation and Context
I have explained this above briefly. It solves the problem arising due to the time sensitivity of the previous function used.
Types of changes
Checklist:
Summary by Sourcery
Fix the snackbar issue by implementing a state management solution to handle rapid network connection toggling, ensuring the correct snackbar state is displayed.
Bug Fixes: