[openstreetmap/openstreetmap-website] Add recent diaries partial to profile page (PR #6010)
Emin Kocan
notifications at github.com
Tue May 13 07:05:10 UTC 2025
<!--
Please read the contributing guidelines before making a PR:
https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md
Pay particular attention to the section on how to present PRs:
https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md#pull-requests
-->
### Description
<!--Describe your changes in detail. If you have made changes to the UI, include screenshots. If your PR addresses a Github issue, please link to it.-->
Closes #6009.
Adds recent diary entries partial and displays it on the user profiles pages by implementing a responsive card layout. It takes 4 most recent diary entries by default. Each diary entry is now shown in a Bootstrap card that displays the title, truncated content, comment count, and creation date. The layout is responsive - showing as a single column on mobile and two columns on larger screens
### How has this been tested?
Both testing manually to make sure it works along different screen sizes and adding tests to `users_controller_test.rb`.
<!--Explain the steps you took to test your code.-->
### Screenshots
<img width="1035" alt="Screenshot 2025-05-13 at 09 02 26" src="https://github.com/user-attachments/assets/969e5bf9-0f72-48da-b06b-d6ac8528c6d0" />
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/6010
-- Commit Summary --
* Add recent diaries partial to profile
-- File Changes --
A app/assets/images/calendar.svg (1)
A app/assets/images/comment.svg (1)
A app/assets/images/note.svg (1)
M app/assets/stylesheets/common.scss (9)
M app/models/user.rb (65)
A app/views/diary_entries/_profile_diaries.html.erb (27)
M app/views/users/show.html.erb (2)
M config/locales/en.yml (2)
M db/structure.sql (10)
M test/controllers/users_controller_test.rb (44)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/6010.patch
https://github.com/openstreetmap/openstreetmap-website/pull/6010.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6010
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6010 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250513/107141a7/attachment-0001.htm>
More information about the rails-dev
mailing list