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

Add a radius to the Recent Activity feed #292

Closed
RyanTG opened this issue Feb 12, 2020 · 7 comments
Closed

Add a radius to the Recent Activity feed #292

RyanTG opened this issue Feb 12, 2020 · 7 comments

Comments

@RyanTG
Copy link
Collaborator

RyanTG commented Feb 12, 2020

User feedback:

  • Ability to expand range of activity feed.

Similar to how you can change the radius to the Events feed.

This makes sense in areas like Japan, but less sense in areas like Southern California. Thoughts?

This is the last open item from the 5.0.0 feedback issue.

@bpoore
Copy link
Collaborator

bpoore commented Feb 12, 2020

From the app, we don't have an ability currently to allow the user to expand the radius due to a maximum being imposed by the API of 30 miles https://github.com/scottwainstock/pbm/blob/2106c90f6d8be428830ea63efbd4eb6b506ed7bb/app/controllers/api/v1/user_submissions_controller.rb#L20.

We could easily make the radius selectable as it is in the events feed if the API would support such behavior. Personally, I'm not sure how people are using this feature... the 30 mile radius is being applied to the lat/lon of the current map extant. If it would enhance some people's experience to be able to select a different radius value, that seems cool. I don't really use this feature in a way where I find myself wishing this was available personally.

@RyanTG
Copy link
Collaborator Author

RyanTG commented Feb 12, 2020

The users that have requested this live in places like Japan and Finland, where stuff is sparse and far apart!

I'm not super into this idea, but they keep requesting it! So yeah, we should start with a pbm issue to... add an endpoint for this value, instead of baking it in.

@bpoore
Copy link
Collaborator

bpoore commented Feb 13, 2020

We could potentially not show the options for a larger radius if there are greater than X entries in the list for the current map extant. That way the feature would only be available in sparse areas.

@RyanTG
Copy link
Collaborator Author

RyanTG commented Sep 27, 2022

I just looked into this and this doesn't actually need API work!

It's true that we have MAX_MILES_TO_SEARCH_FOR_USER_SUBMISSIONS in the API controller. However, that is a default and can be overwritten using the max_distance param.

Example:
https://pinballmap.com/api/v1/user_submissions/list_within_range.json?lat=34.11959605969743;lon=-118.21801350171755;max_distance=50

@RyanTG RyanTG added the 5.2.13 label Oct 28, 2022
@RyanTG RyanTG added 5.2.15 and removed 5.2.14 labels Nov 22, 2022
@RyanTG RyanTG added 5.2.16 and removed 5.2.15 labels Dec 6, 2022
@RyanTG RyanTG added 5.2.17 and removed 5.2.16 labels Jan 4, 2023
@RyanTG RyanTG added 5.2.20 and removed 5.2.18 labels Jan 17, 2023
@RyanTG RyanTG added 5.2.18 and removed 5.2.20 labels Feb 3, 2023
@RyanTG
Copy link
Collaborator Author

RyanTG commented Feb 3, 2023

For the record: I took one stab at this, then Beth did it better. Branch here. https://github.com/pinballmap/pbm-react/tree/recent-activity

Currently merged into master and will be included in 5.2.18 release.

@RyanTG
Copy link
Collaborator Author

RyanTG commented Feb 19, 2023

Really annoying how github doesn't show exact dates for all commits. "two weeks ago" "last month" etc. Anyway, I added the new submission fields on Mon Jan 23, 2023 - which means that by the time our next app release is out, it will be 30 days and so we can potentially use the new fields for this radius. So I'll think about how we can do that, and will comment here with it.

@RyanTG
Copy link
Collaborator Author

RyanTG commented Feb 20, 2023

New user_submission fields:

"comment",
"user_name",
"location_name",
"machine_name",
"high_score"
"city_name"

submission_types:

NEW_LMX

${machine_name} added to ${location_name} in ${city_name}
${created_at} by ${user_name}

NEW_CONDITION

"${comment}"
- ${machine_name} at ${location_name} in ${city_name}
${created_at} by ${user_name}

REMOVE_MACHINE

${machine_name} removed from ${location_name} in ${city_name}
${created_at} by ${user_name}

NEW_SCORE

${high_score} on ${machine_name} at ${location_name} in ${city_name}
${created_at} by ${user_name}

CONFIRM_LOCATION

${user_name} confirmed the line-up at ${location_name} in ${city_name}
- ${created_at}

@RyanTG RyanTG closed this as completed Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants