@etiennejourdier commented on this pull request.
> @@ -30,6 +30,7 @@ def confirm
user.email_valid = true
flash[:notice] = gravatar_status_message(user) if gravatar_enable(user)
user.save!
+cookies.delete :_osm_anonymous_notes_count
I thought it would be more l
@etiennejourdier commented on this pull request.
> @@ -5,9 +5,17 @@
<%= t(".intro") %>
<% if !current_user %>
-<%= t ".anonymous_warning_html",
- :log_in =>
link_to(t(".anonymous_warning_log_in"), login_path(:referer => new_note_path)),
-
@etiennejourdier pushed 1 commit.
b49cdc187e50fcbb5fda72719847e9215c5b81f4 display an encouragement to
contribute after many anonymous notes
--
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5468/files/13d1113e2f94e1a40268a8677bb443d2728b3307..b49cdc187e50fcbb5f
Hi,
Thanks again for the positive and pertinent comments, I pushed a new version
with:
- only 1 squashed commit
- updated threshold
- modified warning with a gap
- deletion of the cookie after successful login
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap
@etiennejourdier commented on this pull request.
> @@ -39,6 +39,8 @@ def successful_login(user, referer = nil)
session[:fingerprint] = user.fingerprint
session_expires_after 28.days if session[:remember_me]
+cookies.delete :_osm_anonymous_notes_count
> The point could be that if
@etiennejourdier commented on this pull request.
> +
+ <%= t ".anonymous_warning_html",
+:log_in => link_to(t(".anonymous_warning_log_in"),
login_path(:referer => new_note_path)),
+:sign_up => link_to(t(".anonymous_warning_sign_up"),
new_user_path) %>
+<% i
@etiennejourdier commented on this pull request.
> @@ -5,9 +5,17 @@
<%= t(".intro") %>
<% if !current_user %>
-<%= t ".anonymous_warning_html",
- :log_in =>
link_to(t(".anonymous_warning_log_in"), login_path(:referer => new_note_path)),
-
@etiennejourdier pushed 1 commit.
13d1113e2f94e1a40268a8677bb443d2728b3307 display an encouragment to contribute
after to many anonymous notes
--
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5468/files/6e6000c099cdac32f75a03290242ed718b980c3a..13d1113e2f94e1a4
> What shall we do with the counter
>
> * if the user logs in?
> * if the user creates an account?
I thought about it, we could delete the cookie after logging in, but it seemed
pointless as the cookie will expire 30 days after the last anonymous note
anyway. Do you agree?
--
Reply to this em
> you can just squash these commits together.
Good idea, I'll do that, it'll be cleaner. Sorry, I'm not really used to PR so
I hadn't thought of it myself.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5468#issuecomment-2580113
Thanks for your time, comments, and advice. I just pushed a new version with :
- the counter stored in a cookie, with a duration of 30 days, as anonymous
visitors don't necessarily post notes every day (I'm not sure about other
cookie options, please review)
- the cookie read in the controller
-
@etiennejourdier pushed 2 commits.
b12bb162f642a26c03d8743113c27ae775de76e4 display warning in new note form
after too many anonymous notes
6e6000c099cdac32f75a03290242ed718b980c3a store anonymous notes counter in a
cookie
--
View it on GitHub:
https://github.com/openstreetmap/openstreetmap-
@etiennejourdier commented on this pull request.
> @@ -152,6 +152,16 @@ OSM.NewNote = function (map) {
.on("input", updateControls)
.focus();
+var anonymousNotesCount =
Number(localStorage.getItem("anonymousNotesCount"));
+
+if (typeof OSM.user === "undefined" && anonymo
@etiennejourdier commented on this pull request.
> @@ -162,6 +172,9 @@ OSM.NewNote = function (map) {
newNoteMarker.dragging.disable();
createNote(location, text, (feature) => {
+if (typeof OSM.user === "undefined") {
+ localStorage.setItem("anonymousNotesCount",
@etiennejourdier commented on this pull request.
> @@ -162,6 +172,9 @@ OSM.NewNote = function (map) {
newNoteMarker.dragging.disable();
createNote(location, text, (feature) => {
+if (typeof OSM.user === "undefined") {
+ localStorage.setItem("anonymousNotesCount",
> I'd store the counter in a cookie, set an expiration date
I am not a specialist of cookies VS localStorage, the only advantage of cookies
is the possibility to set an expiration date ?
> replace the existing "You are not logged in" alert with this more motivating
> one
good idea !
> with a
@etiennejourdier commented on this pull request.
> @@ -152,6 +152,16 @@ OSM.NewNote = function (map) {
.on("input", updateControls)
.focus();
+var anonymousNotesCount =
Number(localStorage.getItem("anonymousNotesCount"));
+
+if (typeof OSM.user === "undefined" && anonymo
> A snap based firefox is unlikely to work.
OK, that's most likely the reason, I'll have to migrate from snap version to
apt version to check. I think a warning in CONTRIBUTING.md would be welcome for
beginners like me!
--
Reply to this email directly or view it on GitHub:
https://github.com/o
> Don't the docs tell you to run it as `bundle exec erblint .`?
oops, sorry, my mistake, I didn't see the `.` ...
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5467#issuecomment-2571747871
You are receiving this because you ar
### Motivation
In the French community, we've had a problem for over a year with someone
creating a huge number of anonymous notes, which hampers the processing of
other relevant notes in the same area. See [this
discussion](https://forum.openstreetmap.fr/t/notes-anonymes-a-gogo/18362) on
the F
### URL
_No response_
### How to reproduce the issue?
Hi,
I am preparing my very first PR, but I can't run the tests requested in
[CONTRIBUTING.md](https://github.com/openstreetmap/openstreetmap-website/blob/master/CONTRIBUTING.md)
`bundle exec teaspoon` gives me this error:
```
/home//.rbenv/
21 matches
Mail list logo