Re: [openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)

2024-09-16 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 4efc63d6090eef1bb334fa7b58c123cf4d80577b Add social sharing functionality -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/4985/files/ff4b223f68baf21e70e79acc5f82eca34b872ab2..4efc63d6090eef1bb334fa7b58c123cf4d80577b You are receiving this

Re: [openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)

2024-09-16 Thread Emin Kocan via rails-dev
As @AntonKhorev suggested, we're now displaying these icons only when users open the full diary entry, as outlined in #5121. Since this is currently used in one place, turbo pagination issues can be handled in a future PR if a use case arises for combining it with turbo pagination. Thank you. -

Re: [openstreetmap/openstreetmap-website] Add Sorting with Turbo Pagination and Extend to Sortable Columns (Issue #5259)

2024-10-13 Thread Emin Kocan via rails-dev
Closed #5259 as not planned. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5259#event-14619886643 You are receiving this because you are subscribed to this thread. Message ID: ___ r

[openstreetmap/openstreetmap-website] Add Sorting with Turbo Pagination and Extend to Sortable Columns (Issue #5259)

2024-10-13 Thread Emin Kocan via rails-dev
### Problem Currently, we use a custom `PaginationMethods` module, which sorts and filters data using IDs. Sorting by other attributes (e.g., created_at or updated_at) does not work correctly, and implementing sorting with these attributes would require changes to `PaginationMethods`. Additiona

Re: [openstreetmap/openstreetmap-website] Re-enable JavaScript unit tests using Teaspoon (PR #5216)

2024-10-12 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 7b7e6550ce7ccac73c075257cd71807858cb364d Enable eslint and fix eslint errors for osm_test.js -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5216/files/91e8d556fe976b42a4aabfc594ac905304d37d3d..7b7e6550ce7ccac73c075257cd71807858cb364d Yo

Re: [openstreetmap/openstreetmap-website] Re-enable JavaScript unit tests using Teaspoon (PR #5216)

2024-10-12 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. bc453f0bb14709adc3997f371c8e6121e7f6e3b3 Enable eslint and fix eslint errors for osm_test.js -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5216/files/7b7e6550ce7ccac73c075257cd71807858cb364d..bc453f0bb14709adc3997f371c8e6121e7f6e3b3 Yo

Re: [openstreetmap/openstreetmap-website] Re-enable JavaScript unit tests using Teaspoon (PR #5216)

2024-10-12 Thread Emin Kocan via rails-dev
@kcne pushed 7 commits. 9266180344761718d4068dd62f78ef3a0169b8e1 Use teaspoon to run javascript tests 1c47363ae310ddf11760e64263ca763077a6d3bf Run javascript tests in CI 123c7d10a5e798e2379dfb04df4a22b1deface3c Selenium driver working on local 5c7b7383e71380d4189385c6d05430649e0e7496 Use chai

Re: [openstreetmap/openstreetmap-website] Re-enable JavaScript unit tests using Teaspoon (PR #5216)

2024-10-12 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 40c71f28be97ffcafb47058fd2590020fb8567a1 Enable eslint and fix eslint errors for osm_test.js -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5216/files/6a3a0e5c02a4e0c54d93414257b8e03fce33eb91..40c71f28be97ffcafb47058fd2590020fb8567a1 Yo

Re: [openstreetmap/openstreetmap-website] Re-enable JavaScript unit tests using Teaspoon (PR #5216)

2024-10-12 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -9,6 +9,13 @@ SET xmloption = content; SET client_min_messages = warning; SET row_security = off; +-- +-- Name: public; Type: SCHEMA; Schema: -; Owner: - +-- + +-- *not* creating schema, since initdb creates it + + Removed changes to this file in t

Re: [openstreetmap/openstreetmap-website] Re-enable JavaScript unit tests using Teaspoon (PR #5216)

2024-10-12 Thread Emin Kocan via rails-dev
> I suppose the issues listed below are a result of the changes in #5084. I > would simply fix the respective unit tests to re-align them with the current > implementation. > > ``` > 1) OSM .formatHash formats lat/lon/zoom params > Failure/Error: expected '#map=9/57.625/-3.685' to equal

Re: [openstreetmap/openstreetmap-website] Re-enable JavaScript unit tests using Teaspoon (PR #5216)

2024-10-12 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -144,6 +144,9 @@ gem "unicode-display_width" # Keep ruby 3.0 compatibility gem "multi_xml", "~> 0.6.0" +gem "teaspoon" +gem "teaspoon-mocha", "~> 2.3.3" Moved the gems to `group :development, :test` which made a bit more sense to me since running

Re: [openstreetmap/openstreetmap-website] Re-enable JavaScript unit tests using Teaspoon (PR #5216)

2024-10-12 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 9ca88734655f1836fcdc6455cdcdb9dba2535ec4 Enable eslint and fix eslint errors for osm_test.js -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5216/files/717a8dd4a4193c07a828dc1b92fc7020a0730006..9ca88734655f1836fcdc6455cdcdb9dba2535ec4 Yo

Re: [openstreetmap/openstreetmap-website] Re-enable JavaScript unit tests using Teaspoon (PR #5216)

2024-10-12 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 2306d56b1daeffa2dbecfed6adfff5e5378c4d5f Enable eslint and fix eslint errors for osm_test.js -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5216/files/9ca88734655f1836fcdc6455cdcdb9dba2535ec4..2306d56b1daeffa2dbecfed6adfff5e5378c4d5f Yo

Re: [openstreetmap/openstreetmap-website] Re-enable JavaScript unit tests using Teaspoon (PR #5216)

2024-10-12 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 97540a304302822d27dffde3d0c843c616a65583 Enable eslint and fix eslint errors for osm_test.js -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5216/files/2306d56b1daeffa2dbecfed6adfff5e5378c4d5f..97540a304302822d27dffde3d0c843c616a65583 Yo

Re: [openstreetmap/openstreetmap-website] Sorting and filtering notes on the profile[TEST RUN] (PR #5255)

2024-10-09 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. e382dfa8eb4cfbf63d93645542142b98cb19f149 Add tests to note controller and handle edge cases -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5255/files/63ca32725b6f808e2e5288573643facfcf10300e..e382dfa8eb4cfbf63d93645542142b98cb19f149 You

[openstreetmap/openstreetmap-website] Sorting and filtering notes on the profile[TEST RUN] (PR #5255)

2024-10-09 Thread Emin Kocan via rails-dev
You can view, comment on, or merge this pull request online at: https://github.com/openstreetmap/openstreetmap-website/pull/5255 -- Commit Summary -- * Add filter and sort scopes to note model * Add tests for filtering and sort scopes inside note model * Integrate filtering and sorting

Re: [openstreetmap/openstreetmap-website] Sorting and filtering notes on the profile[TEST RUN] (PR #5255)

2024-10-09 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 2e18a7cc7552c729dcc147e1391e286fca4d Add test to controller and update scopes and filtering to handle edge cases -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5255/files/d8d40c10734f3012f854e8eedadc8ba92ee74656..2e18a7cc7552c72

Re: [openstreetmap/openstreetmap-website] Sorting and filtering notes on the profile[TEST RUN] (PR #5255)

2024-10-09 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 63ca32725b6f808e2e5288573643facfcf10300e Add test to controller and update scopes and filtering to handle edge cases -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5255/files/2e18a7cc7552c729dcc147e1391e286fca4d..63ca32725b6f808e2e5

Re: [openstreetmap/openstreetmap-website] Sorting and filtering notes on the profile[TEST RUN] (PR #5255)

2024-10-09 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 721f8d52810673783b48341ecfbb9b7305ae4134 Add tests to note controller and handle edge cases -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5255/files/e382dfa8eb4cfbf63d93645542142b98cb19f149..721f8d52810673783b48341ecfbb9b7305ae4134 You

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-16 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. d88ec3046dd0257e856010720417226ffe64e8aa Add tests to note controller and handle edge cases -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5255/files/d87609f00fd6ed04514f08f0dde2ec7279d8df30..d88ec3046dd0257e856010720417226ffe64e8aa You

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-16 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -27,19 +27,19 @@ - <%= t ".my friends" %> + <%= t ".followed users" %> Maybe use "Following" instead of "Followed users" for better clarity. It aligns with the common terminology users are familiar with, like "Following" and "

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-16 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 84a01a3174d1383e85584f0d6689d4e07a4b6bed Use turbo for filtering on select without refreshing the whole page -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5255/files/d88ec3046dd0257e856010720417226ffe64e8aa..84a01a3174d1383e85584f0d668

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-16 Thread Emin Kocan via rails-dev
Thank you for the detailed background and context, Anton. I agree that using date pickers makes sense if we’re filtering notes by dates, especially since the current setup isn’t relying on standard pagination. As for the next steps, I’m not sure whether it’s better to get this PR merged as is

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-16 Thread Emin Kocan via rails-dev
> About the date pickers: > > I wanted to add them to our standard pagination because we already have date > indexes. Then we wouldn't need them here, specifically in this notes filer. > But this plan haven't worked so far because: > > * I wanted to first add a simpler thing to the standard

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-16 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > <% else %> + <%= form_tag(url_for("controller" => "notes", "action" => "index"), "method" => :get, "data" => { "turbo" => true, "turbo-frame" => "pagination", "turbo-action" => "advance" }) do %> + + +<%= label_tag :status, t(".status

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-16 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > <% else %> + <%= form_tag(url_for("controller" => "notes", "action" => "index"), "method" => :get, "data" => { "turbo" => true, "turbo-frame" => "pagination", "turbo-action" => "advance" }) do %> + + +<%= label_tag :status, t(".status

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-16 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 7851e30c263079c28a13e18005339c1cdf00e537 Add tests to note controller and handle edge cases -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5255/files/721f8d52810673783b48341ecfbb9b7305ae4134..7851e30c263079c28a13e18005339c1cdf00e537 You

Re: [openstreetmap/openstreetmap-website] Modify the way "Friends" are added (PR #5261)

2024-10-16 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > -friends_heading = find :element, "h2", :text => "My friends" +friends_heading = find :element, "h2", :text => "Followed users" Maybe use "Following" instead of "Followed users" for better clarity. It aligns with the common terminology users a

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-16 Thread Emin Kocan via rails-dev
@kcne pushed 6 commits. c49aaf4b0256f0c1904b16ec7a71a7176c36b7b4 Add filter and sort scopes to note model 0117a279264b962663c529c5cb49b14aa2933e4a Add tests for filtering and sort scopes inside note model 0f1045e9480989d54c2fe6fa7fa37fad1adbfd3f Integrate filtering and sorting methods into n

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-16 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. d87609f00fd6ed04514f08f0dde2ec7279d8df30 Add tests to note controller and handle edge cases -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5255/files/7851e30c263079c28a13e18005339c1cdf00e537..d87609f00fd6ed04514f08f0dde2ec7279d8df30 You

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-21 Thread Emin Kocan via rails-dev
> Besides the [double-join db > query](https://github.com/openstreetmap/openstreetmap-website/pull/5255#discussion_r1801064970), > there's couple more issues with the interaction type: ["blue on blue" > colors](https://github.com/openstreetmap/openstreetmap-website/pull/4700#issuecomment-2221682

Re: [openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

2024-10-21 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -6,41 +7,69 @@ :commented => tag.span(t(".subheading_commented"), :class => "px-2 py-1 bg-body") %> <% end %> -<% if @notes.empty? %> - <%= t ".no_notes" %> +<%= form_tag(url_for("controller" => "notes", "action" => "index"), "method"

Re: [openstreetmap/openstreetmap-website] Refactor PaginationMethods to Support Sorting with Turbo Integration (Issue #5259)

2024-10-21 Thread Emin Kocan via rails-dev
Closed #5259 as completed. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5259#event-14770454975 You are receiving this because you are subscribed to this thread. Message ID: ___ rai

Re: [openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)

2024-10-21 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -0,0 +1,27 @@ +// Opening pop-ups with share URL +function openShareUrl(url, initialWidth = 640, initialHeight = 480) { + if (typeof url !== "string" || !url.startsWith("http")) { +console.error("Invalid URL"); // Consider removing this line if con

Re: [openstreetmap/openstreetmap-website] Use system font on error pages (PR #5277)

2024-10-21 Thread Emin Kocan via rails-dev
@kcne approved this pull request. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5277#pullrequestreview-2383177034 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [openstreetmap/openstreetmap-website] Add Sorting with Turbo Pagination and Extend to Sortable Columns (Issue #5259)

2024-10-14 Thread Emin Kocan via rails-dev
Tom, I want to dig a bit deeper into this to explore limitations and what are some solid ways to approach this, after which I will reopen this again. I've read few blog posts where people use Turbo with [Stimulus](https://github.com/hotwired/stimulus) but I'm not sure if that would fit the bill

Re: [openstreetmap/openstreetmap-website] Add Sorting with Turbo Pagination and Extend to Sortable Columns (Issue #5259)

2024-10-14 Thread Emin Kocan via rails-dev
You bring up a valid point about the limitations of cursor-based pagination with sorting. Cursor pagination works efficiently when sorting by a unique or sequential field (like `id`, `created_at`, or `updated_at`), but it breaks down when we try to sort by non-unique columns (e.g., `name`, `stat

Re: [openstreetmap/openstreetmap-website] Add Sorting with Turbo Pagination and Extend to Sortable Columns (Issue #5259)

2024-10-14 Thread Emin Kocan via rails-dev
Reopened #5259. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/5259#event-14636898955 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mail

Re: [openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)

2024-10-22 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -0,0 +1,27 @@ +// Opening pop-ups with share URL +function openShareUrl(url, initialWidth = 640, initialHeight = 480) { + if (typeof url !== "string" || !url.startsWith("http")) { +console.error("Invalid URL"); // Consider removing this line if con

Re: [openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)

2024-10-22 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -0,0 +1,27 @@ +// Opening pop-ups with share URL +function openShareUrl(url, initialWidth = 640, initialHeight = 480) { + if (typeof url !== "string" || !url.startsWith("http")) { +console.error("Invalid URL"); // Consider removing this line if con

Re: [openstreetmap/openstreetmap-website] Add filtering functionality to user notes page (PR #5255)

2024-10-25 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. ec7668874ba6da72d718661746baf5460c37012e Remove filtering by interaction. Group status by open, closed and commented -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5255/files/900b9153f3daecf2bc8bcf3e10ac6a5cfc380a8d..ec7668874ba6da72d71

Re: [openstreetmap/openstreetmap-website] Add filtering functionality to user notes page (PR #5255)

2024-10-24 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. cc6c281028aef5983500b62091321f4b215bba3c Remove filtering by interaction. Group status by open, closed and commented -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5255/files/8725d95265e95b1b16610bbc6d483a0afffe9d9e..cc6c281028aef598350

Re: [openstreetmap/openstreetmap-website] Add filtering functionality to user notes page (PR #5255)

2024-10-24 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 900b9153f3daecf2bc8bcf3e10ac6a5cfc380a8d Remove filtering by interaction. Group status by open, closed and commented -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5255/files/cc6c281028aef5983500b62091321f4b215bba3c..900b9153f3daecf2bc8

Re: [openstreetmap/openstreetmap-website] Add filtering functionality to user notes page (PR #5255)

2024-10-24 Thread Emin Kocan via rails-dev
> Time for what? For PR review? Exactly, since each PR would need to be reviewed sequentially, it would prolong the overall process. > Are you sure? Is it complete with exactly the filters you added and not some > other filters? Yes, the goal was to implement the filters that were most commonl

Re: [openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)

2024-10-28 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 8ba2316df11bc0de908f589c4ff78a0337726531 Add social sharing functionality -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/4985/files/4efc63d6090eef1bb334fa7b58c123cf4d80577b..8ba2316df11bc0de908f589c4ff78a0337726531 You are receiving this

Re: [openstreetmap/openstreetmap-website] Add social sharing functionality (PR #4985)

2024-10-28 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -0,0 +1,27 @@ +// Opening pop-ups with share URL +function openShareUrl(url, initialWidth = 640, initialHeight = 480) { + if (typeof url !== "string" || !url.startsWith("http")) { +console.error("Invalid URL"); // Consider removing this line if con

Re: [openstreetmap/openstreetmap-website] Build a mechanism for notifications on the web site, not using email (#1387)

2024-10-28 Thread Emin Kocan via rails-dev
After a bit of research on some libraries that offer such functionalities and implementation details that we could potentially use for this: ### 1. [notifications-rails](https://github.com/jonhue/notifications-rails) `notifications-rails` provides a modular structure for creating, rendering, push

Re: [openstreetmap/openstreetmap-website] Add status filter to user's note page (PR #5297)

2024-10-30 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 5670d46dfbe671499bfe593b555939bb7e3aaf43 Add status filter to user's note page -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5297/files/0b7d8b8711567f8a952e8c7c805faf911aa981f6..5670d46dfbe671499bfe593b555939bb7e3aaf43 You are receiving

[openstreetmap/openstreetmap-website] Add status filter to user's note page (PR #5297)

2024-10-30 Thread Emin Kocan via rails-dev
### Description This PR partly addresses #832 and serves as a smaller alternative to #5255 as suggested in comments. It aims to enhance user experience on user note pages by providing filtering functionality for notes by status. The `with_status` scope is added to the `Note` model, and the `Note

Re: [openstreetmap/openstreetmap-website] Add pop-up or other obvious notification for getting a message or changeset comment (#3182)

2024-10-28 Thread Emin Kocan via rails-dev
Did a bit research on some libraries that offer such functionalities and implementation details that we could potentially use for this: ### 1. [notifications-rails](https://github.com/jonhue/notifications-rails) `notifications-rails` provides a modular structure for creating, rendering, pushing,

Re: [openstreetmap/openstreetmap-website] Add filtering functionality to user notes page (PR #5255)

2024-10-25 Thread Emin Kocan via rails-dev
As for splitting this into multiple smaller PRs, I would prefer we merge this as a complete feature/functionality. Adding filters one by one would significantly increase the time required and might leave the feature feeling incomplete. This PR covers all the intended functionality cohesively, an

Re: [openstreetmap/openstreetmap-website] Add filtering functionality to user notes page (PR #5255)

2024-10-31 Thread Emin Kocan via rails-dev
Closed #5255. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5255#event-15027313160 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing

[openstreetmap/openstreetmap-website] Contribution activity on user page (Issue #5298)

2024-10-31 Thread Emin Kocan via rails-dev
### Problem Currently, the OpenStreetMap user profile page lacks a comprehensive contribution activity feed similar to those seen on platforms like GitHub. This means users cannot easily track or showcase their activity across changeset edits, note interactions, diary entries, and GPS trace upl

Re: [openstreetmap/openstreetmap-website] Add filtering functionality to user notes page (PR #5255)

2024-10-31 Thread Emin Kocan via rails-dev
I opened new PR #5297 according to suggestion here. Closing this as not planed for now. > You can make a pull request that just adds the status filter. That doesn't > depend on pagination and shouldn't tank the performance because: > > - status is checked anyway to see if the note is not h

Re: [openstreetmap/openstreetmap-website] Add status filter to user's note page (PR #5297)

2024-10-31 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 0d0045ea6753ca3e830d03ec81a8640f0fa942e6 Add status filter to user's note page -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5297/files/5670d46dfbe671499bfe593b555939bb7e3aaf43..0d0045ea6753ca3e830d03ec81a8640f0fa942e6 You are receiving

[openstreetmap/openstreetmap-website] Allow Filtering of Notes by Status (Open/Closed) on User Profile (PR #5239)

2024-09-25 Thread Emin Kocan via rails-dev
This PR implements a basic filtering functionality for the notes displayed on a user's profile page, addressing part of the long-standing request from issue #832. Key Changes: - Introduced tabs for filtering notes by status (Open/Closed) on the user profile page. - When no status is specif

Re: [openstreetmap/openstreetmap-website] Allow filtering of notes by status (open/closed) on user profile (PR #5239)

2024-10-03 Thread Emin Kocan via rails-dev
Closed #5239. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5239#event-14500664143 You are receiving this because you are subscribed to this thread. Message ID: ___ rails-dev mailing

Re: [openstreetmap/openstreetmap-website] Allow filtering of notes by status (open/closed) on user profile (PR #5239)

2024-10-03 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 971f63d1f613d8dccc00707ee5a25522a6447e1c Add filtering by status and date to user note page -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5239/files/ef9ad5484e917681c7bf36b9ef8084ca312c0975..971f63d1f613d8dccc00707ee5a25522a6447e1c You

Re: [openstreetmap/openstreetmap-website] Allow filtering of notes by status (open/closed) on user profile (PR #5239)

2024-10-03 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 5047b5396739ee418ad6499b25c17a967b0b1a8e Add filtering by status and date to user note page -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5239/files/14ac88714af3e8220c01c2c46a6138457fb23fa8..5047b5396739ee418ad6499b25c17a967b0b1a8e You

Re: [openstreetmap/openstreetmap-website] Add status filter to user's note page (PR #5297)

2024-11-06 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. b56dc10cec6239c067cca43f38176627f51887a5 Add status filter to user's note page -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5297/files/337d37e71d1070ffe729ab6b7c6d877dc7cce203..b56dc10cec6239c067cca43f38176627f51887a5 You are receiving

Re: [openstreetmap/openstreetmap-website] Add status filter to user's note page (PR #5297)

2024-11-06 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -34,6 +34,16 @@ class Note < ApplicationRecord scope :visible, -> { where.not(:status => "hidden") } scope :invisible, -> { where(:status => "hidden") } + scope :with_status, lambda { |status| +case status +when "open" + where(:sta

Re: [openstreetmap/openstreetmap-website] Add status filter to user's note page (PR #5297)

2024-11-06 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 5b87c908f21977ec6908858b4f60b9a80d51e14d Add status filter to user's note page -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5297/files/0d0045ea6753ca3e830d03ec81a8640f0fa942e6..5b87c908f21977ec6908858b4f60b9a80d51e14d You are receiving

Re: [openstreetmap/openstreetmap-website] Dark Mode (#2332)

2024-11-07 Thread Emin Kocan via rails-dev
Great work, thank you. I will take a look at PRs mentioned, in the meantime if you need help with any of these I'm happy to jump in. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/issues/2332#issuecomment-2461750909 You are receivin

Re: [openstreetmap/openstreetmap-website] Dark Mode (#2332)

2024-11-07 Thread Emin Kocan via rails-dev
I've been exploring these updates, and with Bootstrap 5.3 now in use, I believe we can implement them with minimal code adjustments. > - **Refactor the background color for `content-heading` to use theme colors instead of a standard color variable** This seems to be working fine locally, so I

Re: [openstreetmap/openstreetmap-website] Guidance on Enhancing OSM Profile Pages with Contribution Data (Issue #5356)

2024-11-25 Thread Emin Kocan via rails-dev
Thank you for the clarification! Yes, we're focusing on the openstreetmap-website and aim to integrate this directly. Testing queries and performance locally with large datasets would ensure reliability at scale. For development, we can always mock or use a small subset of data to simplify test

Re: [openstreetmap/openstreetmap-website] Add status filter to user's note page (PR #5297)

2024-11-18 Thread Emin Kocan via rails-dev
@kcne pushed 1 commit. 738e66afa6231390f52679fe8b343478643f5684 Add status filter to user's note page -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5297/files/b56dc10cec6239c067cca43f38176627f51887a5..738e66afa6231390f52679fe8b343478643f5684 You are receiving

Re: [openstreetmap/openstreetmap-website] Add status filter to user's note page (PR #5297)

2024-11-18 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -6,6 +6,20 @@ :commented => tag.span(t(".subheading_commented"), :class => "px-2 py-1 bg-body") %> <% end %> +<%= form_with :url => url_for(:controller => "notes", :action => "index"), :method => :get, :data => { :turbo => true } do %>

Re: [openstreetmap/openstreetmap-website] Add status filter to user's note page (PR #5297)

2024-11-18 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -6,6 +6,20 @@ :commented => tag.span(t(".subheading_commented"), :class => "px-2 py-1 bg-body") %> <% end %> +<%= form_with :url => url_for(:controller => "notes", :action => "index"), :method => :get, :data => { :turbo => true } do %>

[openstreetmap/openstreetmap-website] Guidance on Enhancing OSM Profile Pages with Contribution Data (Issue #5356)

2024-11-25 Thread Emin Kocan via rails-dev
### Problem We want to enhance the OSM profile pages to include more engaging and informative features, similar to [HDYC](https://hdyc.neis-one.org/). The goal is to display user contribution summaries, activity patterns, and insights into changesets. However, we're unsure about the best approa

Re: [openstreetmap/openstreetmap-website] Adds note tags support (PR #5344)

2024-12-03 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -14,6 +14,10 @@ xml.note("lon" => note.lon, "lat" => note.lat) do xml.date_closed note.closed_at if note.closed? + note.tags.each do |k, v| This code is duplicated multiple times, consider creating a shared helper method to reuse instead. > +

[openstreetmap/openstreetmap-website] Calendar heatmap of user contributions on user profile (Issue #5373)

2024-12-03 Thread Emin Kocan via rails-dev
### Problem The current user profile page provides a detailed summary of contributions but lacks a visual representation of activity trends. A calendar heatmap, similar to GitHub's user contribution calendar, would make it easier to understand user engagement over time at a glance. ### Descrip

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2024-12-24 Thread Emin Kocan via rails-dev
@kcne pushed 2 commits. 32ed629cd8d7af0e1d5615a352c44e7eece4057e Add heatmap javascript logic, styles and localization 0a8fc1422aaa55c5b0c7e7220a99e4bda6bed9c5 Add tests for heatmap data in UsersController -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5402

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2024-12-24 Thread Emin Kocan via rails-dev
@kcne pushed 2 commits. 27333136065e1eb2f34b3b8d0275f2f03692b984 Add heatmap javascript logic, styles and localization af02b6aecf6f39ac3694f00758f920c545cd19b1 Add tests for heatmap data in UsersController -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5402

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2024-12-26 Thread Emin Kocan via rails-dev
I've updated the code to account for the "Preferred Website Color Scheme." Theme settings should now be working correctly. **UX Thoughts:** - **Disabling Feature in Profile:** Data is already public and open, so I believe all mappers should have a contribution graph. This feature provides val

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-03 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > +.heatmap-wrapper { + position: relative; + height: 130px; +} + +.heatmap-labels { +position: absolute; + top: 2px; + left: 17px; + padding-top: 21px; + z-index: 1; + overflow-y: hidden; +} + +.heatmap { + margin-left: 50px; + height: 100%; + z-i

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-03 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > + height: 100%; + z-index: 0; I thought they did as precaution but they don't. Removed now and everything works ok. Thank you. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5402#disc

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-03 Thread Emin Kocan via rails-dev
@kcne pushed 2 commits. fde2ab967b45609d6d4186f00500b51b39f8c55d Add heatmap javascript logic, styles and dependencies 7680971278a6941ebf3ce639aa1dd4b4c07767cc Add tests for heatmap data in UsersController -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5402

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-03 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > //= link_tree ../../../vendor/assets/iD/iD/img //= link_directory ../../../vendor/assets/iD/iD/data .json //= link_directory ../../../vendor/assets/iD/iD/locales .json //= link_directory ../../../vendor/assets/iD/iD/mapillary-js .css //= link_director

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-03 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > + type: "threshold", + range: currentTheme === "dark" ? rangeColors : Array.from(rangeColors).reverse(), + domain: [10, 20, 30, 40] +} + } +}, [ + [Tooltip, { +text: (date, value) => getTooltipText(

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-03 Thread Emin Kocan via rails-dev
@kcne pushed 4 commits. b4abb7c36d77d8634bf116d6287ee698fa3e63ad Add heatmap data caching and query for user contributions 754f79000ccce4a41eea7d2e09e1bc039b3feba7 Add heatmap container to user profile view 183a14f2827d398b0465153b336204ad205981bb Add heatmap javascript logic, styles and dep

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-03 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > + data: { +source: heatmapData, +type: "json", +x: "date", +y: "total_changes" + }, + scale: { +color: { + type: "threshold", + range: currentTheme === "dark" ? rangeColors : Array.f

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-03 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > + const translations = I18n.translations[locale] || I18n.translations.en; + const date = translations && translations.date; + const abbrMonthNames = date && date.abbr_month_names; + + const months = abbrMonthNames || []; + return months[monthIndex + 1

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-03 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > + top: 2px; + left: 17px; + padding-top: 21px; I had issues while making this work on UI with positioning. Fixed now, removed padding top and relied on top property completely instead. Everything works properly. Marking as resolved. -- Reply to thi

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-03 Thread Emin Kocan via rails-dev
@kcne pushed 2 commits. 4347c00fb4b694a918dc9134c2f8f53d22392525 Add heatmap javascript logic, styles and dependencies ad50c87e692aa87a3644027fb519c494b191e735 Add tests for heatmap data in UsersController -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5402

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-03 Thread Emin Kocan via rails-dev
@kcne pushed 4 commits. 5969abfcaf1c424db763488dcf05738884750192 Add heatmap data caching and query for user contributions 66834e32332adf773e8866f55452bd1379bdfa46 Add heatmap container to user profile view 49b1c4192368f34bf891d64555af5900ad7a79ac Add heatmap javascript logic, styles and dep

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-04 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > + + + Refactored the code to use flexbox instead. It is indeed much simpler, as I could get rid of some custom css classes. Thanks once again. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/openstreet

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-04 Thread Emin Kocan via rails-dev
@kcne pushed 2 commits. 9fc9ed65c63ad95897af6665fe9275ccb8976a4f Add javascript logic, styles and heatmap in view 341fe1378fe6d3ebf260e1715329affb1aa1fa5f Add tests for heatmap data in UsersController -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5402/file

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-04 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > +<% if @heatmap_data.present? %> + +<%= tag.div(:id => "cal-heatmap", :data => { :heatmap => @heatmap_data.to_json }) %> + +<% end %> Okay, kept the if statement as it is now and also removed styling mentioned and `console.warn` statment from th

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-04 Thread Emin Kocan via rails-dev
@kcne pushed 2 commits. 2c62802c3d056edb43f3e20e3e8a5d7d3c8fad05 Add heatmap container to user profile view e1bc1b99783548e8382e29fd8d7fb5ea61a83fb6 Add tests for heatmap data in UsersController -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5402/files/7680

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-04 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > + <%= stylesheet_link_tag "heatmap" %> + <%= javascript_include_tag "heatmap" %> Removed from this commit and added later when the files are added. Thank you. -- Reply to this email directly or view it on GitHub: https://github.com/openstreetmap/opens

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-04 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > +<% if @heatmap_data.present? %> + +<%= tag.div(:id => "cal-heatmap", :data => { :heatmap => @heatmap_data.to_json }) %> + +<% end %> When we decide the conditions for renedering we can refactor the if statement as necessary. Thank you. -- Rep

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-04 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -237,11 +237,29 @@ <%= @user.description.to_html %> -<% if @heatmap_data.present? %> - -<%= tag.div(:id => "cal-heatmap", :data => { :heatmap => @heatmap_data.to_json }) %> + Removed that div entirely, thank you. I thought it would help m

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-04 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > +# Test user with no changesets +user_without_changesets = create(:user) +get user_path(user_without_changesets) +assert_response :success +assert_select "div#cal-heatmap", 1 Updated the test to reflect latest changes. Thank you. --

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-04 Thread Emin Kocan via rails-dev
@kcne pushed 2 commits. 3fc5a320930d24208aabeaf0acfb5af4802c8cdd Add javascript logic, styles and heatmap in view ec5f4a5edc56db8a1a2bb14244cffdac85661466 Add tests for heatmap data in UsersController -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5402/file

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-04 Thread Emin Kocan via rails-dev
@kcne pushed 2 commits. fbe7865e0255c06d8e5760faa945c464009007c8 Add heatmap container to user profile view ccaeee9113382d874dd015d9f5106f9296f38b39 Add tests for heatmap data in UsersController -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5402/files/e1bc

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-05 Thread Emin Kocan via rails-dev
@kcne pushed 2 commits. 7a2fd38e7a2b86aaa1cfb13f91972b8480b1d2c9 Add javascript logic, styles and heatmap in view a068ef7ad03658871fbd1723e20449126f76f32d Add tests for heatmap data in UsersController -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/5402/file

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-05 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > @@ -3300,6 +3300,10 @@ en: show_address: Show address query_features: Query features centre_map: Centre map here +heatmap: + tooltip: +contributions: "%{count} contributions on %{date}" Updated keys and js code respec

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-05 Thread Emin Kocan via rails-dev
@kcne pushed 2 commits. 840decddc6af04be60ff5ef398f9fffd113b407e Add heatmap data caching and query for user contributions 38f909333e62e46665f0e0bb123573b79023bc87 Add tests for heatmap data in UsersController -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-10 Thread Emin Kocan via rails-dev
@kcne pushed 2 commits. 373ded893fce0b68a7767ca43974d92cf864d30e Add heatmap data caching and query for user contributions 7ff09b4fa1fa531a36fbbdd65a4bf54ac5f83091 Add tests for heatmap data in UsersController -- View it on GitHub: https://github.com/openstreetmap/openstreetmap-website/pull/

Re: [openstreetmap/openstreetmap-website] Add user profile heatmap visualization for contributions (PR #5402)

2025-02-10 Thread Emin Kocan via rails-dev
@kcne commented on this pull request. > +return value === 1 ? + I18n.t("javascripts.heatmap.tooltip.one_contribution", { date: localizedDate }) : + I18n.t("javascripts.heatmap.tooltip.contributions", { count: value, date: localizedDate }); Resolved. -- Reply to this email dir

  1   2   3   >