BioDrop icon indicating copy to clipboard operation
BioDrop copied to clipboard

[DOCS] Need more information on why user markers not appearing on map in local development mode

Open weilincheng opened this issue 3 years ago • 8 comments

Description

In the current implementation, a user's location information in MongoDB is only updated when they visit their specific profile page. This leads to the map page not displaying any user markers during local development since no user has their location information yet in the database. To display user markers on the map page, developers need to visit multiple user profiles to populate the database with location information.

It would be helpful to update the map page documentation to reflect this behavior and provide clear instructions on how to populate the database with location information.

Screenshots

In the local development environment, the map snapshot will not display any user markers if no profiles have been visited. Therefore, it is necessary to visit at least one user profile to populate the map with user markers.

Initially, no user markers image

After visiting some profiles: image

Additional information

No response

weilincheng avatar Mar 16 '23 03:03 weilincheng

It's great having you contribute to this project

Welcome to the community :nerd_face:

If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our Discord chat and our GitHub Organisation - we help and encourage each other to contribute to open source little and often 🤓 . Any questions let us know.

github-actions[bot] avatar Mar 16 '23 03:03 github-actions[bot]

Seems like it might be a good idea to have a seed script that can be run locally to fill the database with some location data?

naomi-lgbt avatar Mar 16 '23 04:03 naomi-lgbt

Seems like it might be a good idea to have a seed script that can be run locally to fill the database with some location data?

Great idea! However, we should also consider that running a seed script locally could potentially hit the rate limit for location data. Eddie brought up a good point, so we might need to think of an alternative solution to avoid this issue. In the meantime, we can document the current behavior and brainstorm potential solutions to this problem. Thank you for bringing this up!

weilincheng avatar Mar 17 '23 03:03 weilincheng

Could I be assigned to this issue, please? I would really appreciate it. Thank you!

weilincheng avatar Mar 23 '23 09:03 weilincheng

How would we hit a rate limit? Generally a database seed includes all of the data needed for testing locally - that is, we'd hard-code location data into the mock database records, rather than calling any APIs.

naomi-lgbt avatar Mar 23 '23 15:03 naomi-lgbt

How would we hit a rate limit? Generally a database seed includes all of the data needed for testing locally - that is, we'd hard-code location data into the mock database records, rather than calling any APIs.

Thank you for the clarification, Naomi. I initially assumed the script would need to call APIs to obtain location data. However, since it does not involve any API calls, we won't encounter any rate limits. Perhaps we could utilize a library such as Faker to generate hard-coded location data, and then use the seed script to insert it into our local MongoDB instance?

weilincheng avatar Mar 24 '23 23:03 weilincheng

That could certainly be an option, yes!

naomi-lgbt avatar Mar 25 '23 16:03 naomi-lgbt

Could I be assigned to this issue, please? I would really appreciate it. Thank you!

Hello! All yours

amandamartin-dev avatar Mar 27 '23 18:03 amandamartin-dev