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 recent activity page #496

Open
Tracked by #246
ezwelty opened this issue Oct 11, 2024 · 8 comments · May be fixed by #537
Open
Tracked by #246

Add recent activity page #496

ezwelty opened this issue Oct 11, 2024 · 8 comments · May be fixed by #537
Assignees
Labels
design enhancement New feature request
Milestone

Comments

@ezwelty
Copy link
Collaborator

ezwelty commented Oct 11, 2024

The current website has an "Activity" page (https://fallingfruit.org/changes) showing the latest activity.

(user # shown only in admin view)

It would be nice to include something similar, but with user name (author) instead of the User #user_id and without the ("# location_id"). This could be done with the data returned by the API's GET /locations/changes. Currently the API only returns type_ids, so names need to be rendered from the result of GET /types as done elsewhere.

As a starting point, the text should reuse the existing website locale keys (#488 (comment)) changes.type.* and changes.change_in_city.

@ezwelty ezwelty mentioned this issue Oct 11, 2024
35 tasks
@ezwelty ezwelty added enhancement New feature request good first issue Good for newcomers design labels Oct 11, 2024
@ezwelty ezwelty changed the title /changes – Location changes : Create an equivalent view from GET api/locations/changes Add recent activity page Oct 11, 2024
@ezwelty ezwelty added this to the Beta release milestone Oct 11, 2024
@ezwelty ezwelty removed the good first issue Good for newcomers label Oct 11, 2024
@wbazant
Copy link
Collaborator

wbazant commented Oct 14, 2024

I think this should go next to About section - in the top ribbon on desktop, and into the settings on mobile. Skip the 'range' parameter and the related feature for now - instead of the per-user activity list, we could instead provide activity information related to an area much better, see #506

@paskal98
Copy link
Contributor

Hi, can you please asign to me 😊

@paskal98
Copy link
Contributor

paskal98 commented Oct 20, 2024

@ezwelty @wbazant
At this stage, I have implemented an activity page that displays changes both for the area zoomed in on the map and for global changes. I noticed that related issues discuss the possibility of sorting data by modification date and matching it with the current map bounds. My question is: can we use theGET /locations/nearby endpoint, which is available on the old version of the site and is possibly used for the "foraging range" functionality, to improve activity ranking and match it with the modification date? If not, is it possible to add functionality to sort recent changes according to the current map bounds? Additionally, would it be useful to consider migrating this endpoint? If anything is unclear, please feel free to ask

image

Design is not final!

@wbazant
Copy link
Collaborator

wbazant commented Oct 20, 2024

Looks like good progress!

When I've earlier imagined how this would work, I thought the activity page would be for global changes, and activity information related to the area could be used differently (I don't know how exactly, but #506 tracks it). I didn't think you could get the data for the zoomed in area - I remember the foraging range version lets you get it for one particular place that the user has set - and think it's a better design, since the other parts of the top ribbon are not tied to the map choice. It's also practical to just do the global activity page now - although obviously we can work on whatever inspires us here - since that's part of the beta release milestone.

What's your thinking behind the 'Show 3 more activities' feature, as opposed to one long list that the user will scroll through? I think the targeted UX here is a user lazily looking through the changes and being persuaded that the site is active and lively, or maybe clicking through towards something interesting, and hiding some of the content behind this feature works against it - gives the user a job and introduces toil - and I'm not sure about the benefits. Also, we want to render gizmos that change things on the page as buttons, and use the link elements for taking the user elsewhere on the side.

There's also a Chesterton's Fence at work here, I bet @ezwelty has really good reasons for showing the activity as:

Common hazel (#1066839) edited in Milano, Lombardia, Italy
Loquat (#1996171) added in Santa Iria de Azoia, Lisboa, Portugal

I don't mind the changes you propose - to skip the ID and add the user - but let's first understand why the data is being displayed how it currently is, and I would maybe tone down the styling of the user link from primary color + bold to just bold.

@paskal98
Copy link
Contributor

paskal98 commented Oct 20, 2024

Thank you! 😊

Feature idea #506
I got a bit carried away with the implementation and decided to explore how we could retrieve changes with area filtering, or in my case, based on map bounds during scaling. Since there were no specific ideas suggested in #506, I thought it would be useful to investigate how this could work.

I believe the best solution would be to create a separate endpoint or extend the current one, so that we could retrieve changes based on the current bounds over a specific period. For example:
GET /locations/changes?bounds=38.23,39.45|65.56,2.78&date_from=2024-01-01&date_to=2024-02-01&limit=20&offset=0.
This could help display activity in a region and assist with sorting activity data.

Issue solution progress
Regarding the "Show more" function and infinite scrolling — I agree that infinite scrolling would make the interface more user-friendly and help keep users engaged. However, I suggested the current approach of showing a limited number of activities for a specific time period because I thought it would be more informative for users and help them better understand how frequently changes are happening on the site.

Also, I’m not entirely sure how the activity date should be displayed. From what I understood in the issue description, we need to remove the location ID and replace the user ID with the username. Or perhaps I missed something? 😅

I’ve attached an image with the updated design using infinite scrolling. I will send other design ideas later when I finish working on them.

image

image

@wbazant
Copy link
Collaborator

wbazant commented Oct 21, 2024

Or perhaps I missed something?

It was me who did! I've just re-read the issue description, and you've implemented it as requested.

User names in bold look good, thanks for making the change! BTW we'll be able to link the user profiles to user pages - issue #504 - and we can then try to show links to the user names consistently on the location pages and here, but I think the bold will work on location pages too.

Thanks for the idea for the epic, I agree it will involve adding or changing the endpoint and the URL schema you propose. Do you want to add it? I've not changed anything in the API yet, but I'm sure Ethan will be able to review PRs there.

infinite scrolling
A long list with a fixed size should satisty the user's curiosity and solve the issue, and also be a bit simpler, so I was thinking about that, but an auto-loading list would be an extra feature.

@paskal98
Copy link
Contributor

paskal98 commented Oct 22, 2024

I've implemented infinite scrolling with a limit of 1000 records to reduce server and client load. This solution helps optimize requests and improve performance

As for the endpoint, I'm open to adding it, but I suggest gathering some ideas on how to extend the functionality of the page first 😊

I experimented with different designs: a table took up too much space, and a stylized card list looked overloaded. In the end, I opted for the current design.

Below is the final design. If it and the functionality suit your needs, please provide feedback!

Functionality:

  • Infinite scrolling
  • Navigation to location
  • Limit of 1000 records
  • Records grouped by date.
image 1 image 2 image 3 image 4

paskal98 pushed a commit to paskal98/falling-fruit-web that referenced this issue Oct 22, 2024
@wbazant
Copy link
Collaborator

wbazant commented Oct 23, 2024

Again, thanks for working on this! I think infinite scrolling is an enhancement - if currently some users get a bit disappointed after only being able to scroll through just a limited amount of activity, well, never again :).

Instead of the text telling the user what the activity list is, can we make sure we show it to them, and omit the text itself, or if it is necessary, make it as short as possible? Text needs to be proofread, translated, etc. and when we can get away with not having it, that's preferred for the project. We're okay to not put all the words we're using in the i8n files just yet, but we're planning to do that for the 'beta release' milestone, i.e. before starting to send main traffic to the beta site instead of the live site, see e.g. #531.

Similarly I'd omit the 'you've reached the end of the infinite list' message.

I'd also keep the headers the same as on the live site, and then start showing them as dates in the dd-mm-yyyy format.

I'm not sure how much a 1000 changes is, but I'd also limit it in time - maybe to last month - so it's a consistent experience, but that's a tiny suggestion and I'm not sure how worthwhile. Similarly, can we make sure we're showing the last day on the page completely - so, once a bit more data has been loaded from n+1 days ago, the n days ago can be loaded on to the screen?

Proposal for a small enhancement: when the same user added multiple types at the same location on the same day, show them in one line as "Loquat, banana added in {location} - {user}". If the user added and then edited, don't aggregate. This might make the styling harder on mobile - maybe you'll sometimes need three lines instead of two to show an entry.

On desktop, would it be practical to reduce the gaps between the lines a bit, to show a bit more data on the screen? Let's keep the gaps in the mobile layout as they are though.

For linking to the activity page on mobile, let's move the activity link under the social buttons, which visually separates the map settings from 'other stuff at the bottom' that we keep there.

Also, I see you're trying to replicate the desktop layout - Activity having a header styling on par with Map or About, but being clickable - and hitting a problem where the link layout only really facilitates header text -> subheader links. The solution of showing the Activity header and "Last Activity" link under it results in a header that doesn't group anything, so I'd try two alternatives:

  • show activity link between the social buttons and the About section
  • put activity at the bottom of the About section

Would you like me to give you comments on the implementation? Feel free to open a PR.

paskal98 pushed a commit to paskal98/falling-fruit-web that referenced this issue Oct 23, 2024
@paskal98 paskal98 linked a pull request Oct 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design enhancement New feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants