Skip to content
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

Add show unread notifications filter button #6356

Merged
merged 4 commits into from
Oct 4, 2023

Conversation

Pranshu1902
Copy link
Contributor

@Pranshu1902 Pranshu1902 commented Sep 27, 2023

WHAT

🤖 Generated by Copilot at ae264dc

Added a feature to filter notifications by unread status in the NotificationsList component. This involved adding a state variable, a button, and some conditional rendering logic in src/Components/Notifications/NotificationsList.tsx, as well as some translation keys in src/Locale/en/Notifications.json.

Proposed Changes

Screencast from 27-09-23 02:09:03 PM IST.webm
@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖 Generated by Copilot at ae264dc

  • Add a new state variable showUnread to the NotificationsList component to toggle between showing all notifications or only unread ones (link)
  • Filter the notifications data based on the showUnread state before rendering the NotificationTile component (link)
  • Hide the load more button if the showUnread state is true, since there is no pagination for unread notifications (link)
  • Add a new button to the NotificationsList component that allows the user to switch the showUnread state and display different icons and labels using the CareIcon component and the t function (link)
  • Add two new translation keys to the Notifications.json file for the button labels (link)

@Pranshu1902 Pranshu1902 requested a review from a team September 27, 2023 08:39
@Pranshu1902 Pranshu1902 requested a review from a team as a code owner September 27, 2023 08:39
@Pranshu1902 Pranshu1902 requested a review from gigincg September 27, 2023 08:39
@vercel
Copy link

vercel bot commented Sep 27, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 4, 2023 2:00pm

@netlify
Copy link

netlify bot commented Sep 27, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 9f49323
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/651d6fca07c4e3000829f6c4
😎 Deploy Preview https://deploy-preview-6356--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@khavinshankar khavinshankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pranshu1902 just a suggestion

@Pranshu1902
Copy link
Contributor Author

@khavinshankar @nihal467 merged the suggestions, please check again

@khavinshankar khavinshankar merged commit 7df0f13 into ohcnetwork:develop Oct 4, 2023
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add button to filter Unread notifications
3 participants