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

Latest Incidents Bottom Sheet #18

Open
yaswant2403 opened this issue Nov 21, 2024 · 2 comments
Open

Latest Incidents Bottom Sheet #18

yaswant2403 opened this issue Nov 21, 2024 · 2 comments
Assignees
Labels

Comments

@yaswant2403
Copy link
Collaborator

yaswant2403 commented Nov 21, 2024

Latest Incidents Bottom Sheet that displays latest incidents near user

Bottom Sheets: https://m3.material.io/components/bottom-sheets/overview

Ones used for React Native: https://github.com/gorhom/react-native-bottom-sheet

@yaswant2403
Copy link
Collaborator Author

yaswant2403 commented Dec 3, 2024

Great! 9d5d5aa implements the Bottom Sheet properly and is able to display incidents.

image

A couple more fixes:

  • Incidents don't seem to be exactly the 5 most recent incidents. Looking at firebase, the last 5 incidents should be from the last 2 weeks. It might be because of the way the 5 incidents are being grabbed incidents.slice(0, 5) is just grabbing the first 5 incidents in the incidents list and if the incidents list is ordered from creation date in ascending order, this would just grab the first 5 incidents every time
  • Ensure this list is updated every time a new incident is added
  • First incident at the top should be the most recent incident. Currently, it seems to display the oldest incidents instead.
  • Use the incident and severity labels from import { INCIDENT_TYPE_LABELS, SEVERITY_LEVEL_LABELS, PIN_COLORS } from '@/constants/Incidents' rather than displaying the raw severity and incident type fields. This just ensures we're using the same labels throughout all the screens

@PrachodK
Copy link
Collaborator

PrachodK commented Dec 4, 2024

done and pushed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants