[openstreetmap/openstreetmap-website] User activity queries (PR #5761)

Emin Kocan notifications at github.com
Fri Mar 7 07:18:52 UTC 2025


### Description

Adds a new UserActivities module that provides structured access to a user's activity history as part of #5298. The module fetches and organizes activities (changesets, diary entries, comments, GPX uploads) by day and type using SQL queries.

Key features:
- Groups activities hierarchically by day and type
- Supports pagination
- Handles visibility flags

This provides a foundation for displaying user activity history in a structured timeline view.

### How has this been tested?

Added test suite in `test/lib/user_activities_test.rb`
   
For the context this is the UI which integrates this changes later and which is planned as part of the next PR:
   
<img width="782" alt="Screenshot 2025-03-07 at 08 11 22" src="https://github.com/user-attachments/assets/b631b2c1-6380-448b-a60e-1ae2cf2130a9" />

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5761

-- Commit Summary --

  * Add UserActivities module for structured user activity history
  * Add tests for UserActivities module

-- File Changes --

    A lib/user_activities.rb (194)
    A test/lib/user_activities_test.rb (112)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5761.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5761.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5761
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5761 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250306/9aa89356/attachment-0001.htm>


More information about the rails-dev mailing list