srujanr40 / dogfish

CPSC 455 Project
3 stars 0 forks source link

sports filter new #60

Closed Taqdeer closed 1 year ago

rkelly123 commented 1 year ago

Since it sounds like you're busy and didn't really want to address the concerns, I went ahead and made a few changes directly.

It makes more sense to me for the "All" section to be over the other sections, so I did that. I also merged the updated project 6 into your branch to handle a merge conflict. In doing so, I also fixed a bug you had with the google maps api (it doesn't like being loaded in two different places at the same time with an additional param, I ran into it when adding the location recommendations on the joined session page). Removed some imports that were no longer necessary. Also made it so that sport queries are now completely case insensitive!

There is also a significant bug with the way that we are getting sessions. We are using the same API endpoint for getting all of the sessions as we are for getting the filtered sessions. As a result, when we get filtered sessions, we are setting the global "sessions" redux store array to the filtered sessions, which causes the different api calls to fight over the sessions array. When you navigate between different pages/refresh/etc. you can see the "all sessions" section rapidly change between different filters. I've gone ahead and fixed this by differentiating between a "getAllSessions" endpoint, and a "getSessions" endpoint for the filtered sessions.

Lastly, the "all sessions" section successfully updates automatically without need for reload when creating a new session, however, the new sections do not display the new session until a hard page reload. I've also fixed this issue.

All in all, I think that it is now ready to go

edvinkeskin commented 1 year ago

How does Activity near me work exactly, I entered Bulgaria as event location it was visible to me. I also noticed a page refresh was necesarry for filtered sessions to show a new session. Also from Rory's previous concerns, the bug with 'the way that we are getting sessions' seems something to lookout for

Taqdeer commented 1 year ago

How does Activity near me work exactly, I entered Bulgaria as event location it was visible to me. I also noticed a page refresh was necesarry for filtered sessions to show a new session. Also from Rory's previous concerns, the bug with 'the way that we are getting sessions' seems something to lookout for

This is only sports filter. The activities nearby me is here: https://github.com/srujanr40/dogfish/pull/61

Taqdeer commented 1 year ago

How does Activity near me work exactly, I entered Bulgaria as event location it was visible to me. I also noticed a page refresh was necesarry for filtered sessions to show a new session. Also from Rory's previous concerns, the bug with 'the way that we are getting sessions' seems something to lookout for

Rory was mentioning to remove the filter completely and creating a completely different end point for getAllSessions - I did not understand why. This is just going to increase our code too long unnecessarily. Because the way we are getting sessions right now is also pretty decent as when the filter is empty, i.e. filter='', mongodb automatically returns all sessions. It is the first method in sessionService.js Am I missing something important other than this?

Taqdeer commented 1 year ago

How does Activity near me work exactly, I entered Bulgaria as event location it was visible to me. I also noticed a page refresh was necesarry for filtered sessions to show a new session. Also from Rory's previous concerns, the bug with 'the way that we are getting sessions' seems something to lookout for

Updating the sessions upon creating a new session without refresh is also resolved: c7bef67