-
Notifications
You must be signed in to change notification settings - Fork 515
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
Fix (NotificationsList): made the Notifications sidebar responsive #4441
Conversation
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
The notification bar should be opening from the right edge of the screen.
Made the sidebar open from the right edge of the screen. Updated the video in the PR description showing the same |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
LGTM |
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.
I'm not too fond of the notification logic being handled inside the sidebar.
What do you think @khavinshankar?
How would you handle it? @rithviknishad |
@naman114 I would ideally prefer using redux here. This way there's no need to keep on passing the props, and the sidebar handles the logic of the sidebar only. |
A component: The open/close state may also be handled with redux. |
@rithviknishad Here, we just have the Also, even if Redux is used, the Sidebar will have to update the opening/closing state of the Notifications Modal so it's still not really like - the sidebar handling the logic of sidebar only |
@naman114 Yes I agree using redux is overkill 😅 Can you checkout this deploy preview? https://deploy-preview-3996--care-net.netlify.app I and shivank had solved this issue in an earlier PR. @khavinshankar can you put this on hold, I'll get the slideover implementation refactored out from that PR in a separate PR by today PR: #3996 |
@naman114 @khavinshankar fixed in #4487 by using the new |
Should I close this PR? @rithviknishad @khavinshankar |
Proposed Changes
NotificationsList
component was part of theSidebar
component. This caused the notification bar to open as part of the Sidebar (smaller width) in mobile view. In this PR, theNotificationsList
component is moved higher up to theAppRouter
component along with its state (handling its opening/closing). The state and setState for the the same have been passed down to theSidebar
andNotificationsList
componentsAwesomeScreenshot-1_3_2023.3.02.38AM.mp4
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers