Skip to content
Paras Gupta

April 9 - Daily Programming Diary

Diary, Programming2 min read

5:40

Okay, I have to make some changes to the anonymous messaging system. The people who haven't got any reply to them have to be given a reply by the Admin. So that needs some brain storming. First I need to review the code I wrote at that time and see where the changes have to be made.

6:20

I reviewed the code and fixed some things before I think about getting started on the feature. I added Redux selector in the Anonymous portal so that it loads faster depending on whether the user is admin or not. I also made the admin checking more concise on other parts of the app with the ?. selector. Nice! Finally, I'll just be getting all the messages as soon as they are being typed and then as soon as a message gets a reply, I'll gray it out / move to the bottom I guess / remove from the list? Let's see.

7:40

Okay, I'm done So I changed the implementation on the replies page.

  • The admin by default sees the people that haven't received a reply.
  • The admin can select a person from the list and their worry gets displayed.
  • Admin can reply to them using the same mechanism as the user reply.

Though I cleaned up the code a lot, there is still some scope of improvement on the user side. The subscriptions can be done at one place so if the user is far behind in the process, the session gets disconnected, otherwise I think it can create problems like one person extra in the queue which is not desirable.

Break

20:00

Okay, cross browser integration for multiple admins. That might be cool. How would I go about accomplishing that??

  • Create a button to join an existing room
  • Depending on the room status, show the desired panel
  • The original admin may get out of sync due to the actions taken by the other one, so will need database listeners on each side to listen for changes.
21:40

later that night

So I decided to get started with the UI for talking to MHP. I have no idea where to get started, since there is just one MHP on server.

22:20

Okay, there was an issue with the new component where the prop was not being read :/
I wanna bang my head on the wall for that, but I forgot to destructure the props, uff my thinking capacity is gone :facepalm

EOD Checklist

  • Raahee
  • Leetcode April Challenge
  • This blog
© 2022 by Paras Gupta. All rights reserved.
Theme by LekoArts