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

FEATURE - implement realtime alert functionality #177

Merged

Conversation

OmarHegazy93
Copy link
Contributor

What it Does

Wire the implemented UI for realtime alert system with the server so that it gets updated each time new alert is arrived

  1. listening to the server for newly added alerts
  2. Add a query to get only ONE alert with isOn: true, and if there are viewed alerts previously, append to the query to exclude all alerts that ids match the persisted ids
  3. if the alert is new, present it and save its id locally so that it gets filtered next time when new alerts are received

How I Tested

  • Install the app and run it for the first time
  • An alert should appear on the screen
  • Dismiss it
  • Reopen the app
  • Notice the behavior

Notes

  • When running the app for the second time, there will be an error from the firebase in the console as shown in the screenshot below, as per the answer here, @mikaelacaron should open that link so that it gets created automatically afterwards. (please let me know if there is something else I should do about it)
Screenshot 2023-10-15 at 20 33 46

Screenshot

  • Add a screenshot of your new feature! OR show a screen recording of it in action. (On the simulator press Cmd + R to record, and the stop button when done). This video should be no longer than 30 seconds.

Copy link
Owner

@mikaelacaron mikaelacaron left a comment

Choose a reason for hiding this comment

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

I haven't fully looked at it functionality wise, if it works (and testing with Firebase, so I'm not sure yet on the question you had about that error)

But here's several suggestions to please fix, and I'll take a look again
Great work again!! You're doing awesome!

@OmarHegazy93 OmarHegazy93 force-pushed the 107-implement-alert-functionality branch 4 times, most recently from 944aff4 to 2e4d6cd Compare October 23, 2023 09:51
@OmarHegazy93 OmarHegazy93 force-pushed the 107-implement-alert-functionality branch from 2e4d6cd to 8790dce Compare October 24, 2023 08:37
This isn't necessary because it makes it incompatible with dark mode, it's fine that it's blue
Copy link
Owner

@mikaelacaron mikaelacaron left a comment

Choose a reason for hiding this comment

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

Great work!! Note I pushed several changes (so you'll need to do git pull on your branch)
Mainly just formatting changes here and there.

Added those indexes for alerts

I have a few questions. Otherwise this will be good to merge soon!

And can you make sure that the title doesn't get clipped when it's longer (see screenshot) and make sure in the message when I add \n for a line break, that it shows up as a line break

@mikaelacaron
Copy link
Owner

showing \n\n rather than as line breaks
Simulator Screenshot - iPhone 15 Pro - 2023-10-25 at 01 49 15

the title is clipped
Simulator Screenshot - iPhone 15 Pro - 2023-10-25 at 02 07 35

@OmarHegazy93 OmarHegazy93 force-pushed the 107-implement-alert-functionality branch from da673fd to 73b62ac Compare October 25, 2023 22:20
Copy link
Owner

@mikaelacaron mikaelacaron left a comment

Choose a reason for hiding this comment

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

The code looks good but I haven't been able to test it successfully with the functionality that I'm wanting.

I'm going to accept it, and look at it again after Hacktoberfest, or put it behind a feature flag for now, thanks for all your work on this!

@mikaelacaron mikaelacaron merged commit 3d5f891 into mikaelacaron:dev Oct 29, 2023
2 checks passed
@OmarHegazy93 OmarHegazy93 deleted the 107-implement-alert-functionality branch October 29, 2023 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FEATURE - Create a Real Time Alert System
2 participants