Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Notes (aka OpenStreetBugs) #209

Merged
merged 252 commits into from

5 participants

@tomhughes
Owner

I think I have now resolved the outstanding issues with the notes branch.

As agreed previously at EWG it now shows a warning when viewing a note with anonymous comments that such information should be independently verified.

It's running at http://notes.apis.dev.openstreetmap.org/ so please try it out as much as possible and report any problems before it gets merged. You can comment here, or open issues against my repo at https://github.com/tomhughes/openstreetmap-website/issues.

Kai Krueger and others added some commits
Kai Krueger Split comment field out of map bugs table
Rather than have all comments in a single text field, have each comment in its own entry
and only combine them back on output
eac7348
Kai Krueger Allow for different formats to the getBugs call
This is a rudimentary initial version of a GPX and a rss
format for looking at bugs in an area.
d0e2915
Kai Krueger Fixed small bug where clicking on the "Report a Problem" link would d…
…irectly create a bug-report
be4c4d1
Kai Krueger support json format in getBugs, add a limit and name parameter 0989506
Kai Krueger Change comment type from varchar(255) to text
Some bug comments in the current OSB have more than 255 characters,
so the format needs to be extended to accomodate
dde9038
Kai Krueger Escape javascript in output ef9f53f
Kai Krueger Record time of closure of a bug. c22958f
Kai Krueger Add a browse page for bugs 01aa270
Kai Krueger try and make the OpenStreetBugs API a bit more consistent with the re…
…st of the API
4584028
Kai Krueger back out the registration of the gpx mime type, as it didn't seem work 3344e60
Kai Krueger Fixup some of the rss output and geocode bugs using nominatim 81113f3
Kai Krueger List bugs submited or commented on by user c9a3f91
Kai Krueger Fixup some error handling in map bugs 35bbf82
Kai Krueger Add some rudimentary initial tests for the map bugs api 6d668f6
Kai Krueger Merge -r 20198:20540 from trunc into openstreetbugs branch 03f733c
Kai Krueger Don't limit get map_bugs to a small Area, by disabling the quadtile i…
…ndex for those searches

The volumn of bugs seem small enough to get away with normal or GiST indexes (not included yet)

Also includes some other fixes
59a6ed0
Kai Krueger Convert openstreetbugs javascript to new style api aa61dfb
Kai Krueger minor improvement to the map_bugs tests 4aec8dc
Kai Krueger Reuse the map_bug_comment table as a more general history table of ma…
…p_bugs including close and reopen events

This helps the rss feed to work on a per event basis rather than on a per bug basis
c3bf919
Kai Krueger Fixed some minor bugs and add tests to spot them abf3358
@tomhughes tomhughes Merge branch 'master' into openstreetbugs acbc99a
Kai Krueger Merge branch 'master' of git://git.openstreetmap.org/rails into opens…
…treetbugs
5898b49
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
Conflicts:
	lib/osm.rb
160429e
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 0caaf54
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 959442d
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 568ce75
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 273706a
@tomhughes tomhughes Merge branch 'master' into openstreetbugs b5d0de8
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 4b17b92
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
Conflicts:
	app/controllers/browse_controller.rb
50224b4
@tomhughes tomhughes Merge branch 'master' into openstreetbugs b9c9d6c
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 02ad2f5
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 52395b3
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
Conflicts:
	config/environment.rb
	config/routes.rb
6fb8570
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
Conflicts:
	app/views/site/index.html.erb
a1cb0f0
Kai Krueger Merge branch 'master' into openstreetbugs2 001ff57
Kai Krueger Minor fix to updated OpenLayers 91b9b65
Kai Krueger users.visible has changed to users.status 3d3f398
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 8980da4
@tomhughes tomhughes Merge remote-tracking branch 'apmon/openstreetbugs2' into openstreetbugs e7ed263
Kai Krueger Use local files rather than remote ones for osb images d7afad9
Kai Krueger Change bug comment to a textarea to make it easier to input longer co…
…mments
8598412
Kai Krueger Grey out username text field for bugs when logged in. 4a23ee8
Kai Krueger Link the openstreetbugs browse pages 5e335b6
Kai Krueger Remove references to old server location f414d3c
Kai Krueger Forgott to copy over an image from openstreetbugs.schokokeks.org 890fbca
Kai Krueger Deactivate OSB controller immediately after clicking a new bug 8cb83ad
Kai Krueger Update OSB internationalisation to match the rails_port way ad75dd1
Kai Krueger Add a note that the OSB client side js library has been adapted from …
…the original
3b55494
Kai Krueger Send notification emails when someone comments on a map bug report b3d62bb
@tomhughes tomhughes Merge branch 'master' into openstreetbugs af68e07
@tomhughes tomhughes Merge remote-tracking branch 'apmon/openstreetbugs2' into openstreetbugs 0a3087c
Kai Krueger Only show "Report a problem" link at zoom level 12 and higher c322b0c
Kai Krueger Make the bug popups look a little nicer 1ac7f20
Kai Krueger Increase font-size of the "report a problem" link 14ed7ad
Kai Krueger Don't enable OSB layer by default 3b3896d
Kai Krueger Merge branch 'openstreetbugs' of git://git.openstreetmap.org/rails in…
…to openstreetbugs2
a6f45ad
Kai Krueger Merge branch 'master' of git://git.openstreetmap.org/rails into opens…
…treetbugs2
43e12e7
Kai Krueger Don't require a second click to create an OpenStreetBug 6476388
@tomhughes tomhughes Merge branch 'master' into openstreetbugs e7cd90f
@tomhughes tomhughes Tidy up some of the map bugs code fb4d003
@tomhughes tomhughes Switch back to using the local OL build as it seems to work fine 4da9fd7
@tomhughes tomhughes Detabify and tidy up some more of the bugs code 4b0191b
@tomhughes tomhughes Factor out common code into partials 560e41e
@tomhughes tomhughes Get returning of bugs as GPX files working cc311ff
@tomhughes tomhughes Merge the gpx_bugs action into the main get_bugs action 6aec21b
@tomhughes tomhughes Detabify and tidy up some more of the bugs code a2495c8
@tomhughes tomhughes Always get the bug commenter name from the user if there is one 63e9c47
@tomhughes tomhughes Place legacy routes after their replacements 54b42ec
@tomhughes tomhughes Rename association between map_bugs and map_bug_comment to comments 8852454
@tomhughes tomhughes Don't add a geographic condition when fetching an RSS feed with no bbox cbcbd7a
@tomhughes tomhughes Add a C implementation of QuadTile.iterate_tiles_for_area 7bba798
@tomhughes tomhughes Use quad tiling to select bugs in an area
Remove the _no_quadtile versiond of the selection routines and switch
to using the ordinary ones but with a (large) limit applied on the size
of the area to prevent us spending ages working out the list of tiles
to be selected.
22bef89
@tomhughes tomhughes Make the edit action default to z17
If an attempt is made to invoke an editor without specifying a zoom
level (as with the GPX edit links) then default to z17 instead of z14
to avoid trying to load too much data. Fixes #3728.
ff9fb4f
@smsm1 smsm1 Add the .DS_Store file to the gitignore (often added by default). bab8ad3
@smsm1 smsm1 Update the rss feed logo, to use the new logo. 741c624
@tomhughes tomhughes Make sure the ruby quadtile code give the same result as the C version d2cf09f
@tomhughes tomhughes Rename some columns and indexes in the bug tables 882700c
Mendhak Allow any valid (per RFC 3986) scheme name in OAuth callback URLs
Changed the callback_url regex so that you can have custom schemes such
as myapp: or my-lovely-app: instead of just http and https. This should
help with mobile development where users can authorize with OSM in their
browser and are automatically redirected to the registered app.
03eb6ce
@tomhughes tomhughes Add methods to get a bug's author details from the first comment f77a3c7
@tomhughes tomhughes Use the right author name for bugs in RSS format ae844f3
@tomhughes tomhughes User an RJS template for the javascript response c7bb260
@tomhughes tomhughes Fix a few minor issues in the print stylesheet
Stop the mobile header appearing, and set the size of the attribution.
ff174c1
@tomhughes tomhughes Simplify URL scheme name matching in OAuth callback URLs a little 6cb69b5
@tomhughes tomhughes Don't allow libxml 2.0.0 and later to be used a2f08cc
@tomhughes tomhughes Make "all traces" and "your traces" links more consistent
Make sure we always show the "all traces" and "your traces" links
in the same place and that they don't accidentally inherit parameter
values that we don't really want.

Based on work by Andrzej Zaborowski <balrog@zabor.org>.
c4d0b04
@tomhughes tomhughes Handle large bounding box changesets better
If the bounding box of a changeset is much larger than the map then
there seem to be problems with OL not rendering the feature correctly
so reduce the highlight to just be the extent of the map plus a small
margin in that case.
bb2c0c7
@tomhughes tomhughes Rename a number of methods in the map_bugs controller f4928d0
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
Conflicts:
	config/environment.rb
bb490ac
@tomhughes tomhughes Mass rename of "bugs" as "notes" for increased user friendliness e3b8b89
@tomhughes tomhughes Tidy up the note model a bit 33c0f15
@tomhughes tomhughes Tidy up the note_comment model a bit ab2acea
@tomhughes tomhughes Update tests for change in name from "map_bug" to "note" etc 08d6a0c
@tomhughes tomhughes Tidy up the note controller
Go through most of the note controller, tidying things up, fixing
a few bugs, and making sure we have tests for everything.
8382181
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 5ff9f2d
@tomhughes tomhughes Merge branch 'master' into openstreetbugs c20b31b
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 7c98b41
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
Conflicts:
	app/views/browse/_map.html.erb
	app/views/site/index.html.erb
72e3304
@tomhughes tomhughes Use correct URL for note details a693862
@tomhughes tomhughes Get the note browse pages into a vaguely working state 81a6c7b
@tomhughes tomhughes Add next/previous tooltips for browsing notes 561140d
@tomhughes tomhughes Enable the note later when going from the browser to the map view be68d73
@tomhughes tomhughes First pass at banishing the words "bug" and "OpenStreetBugs" a12b087
@tomhughes tomhughes Tidy up some insanity in the creating of new notes e48837f
@tomhughes tomhughes Move the marker with the mouse when positioning a note 2b3846b
@tomhughes tomhughes More cleanup work on the notes javascript e52b06d
@tomhughes tomhughes Remove the notes control
The control existed to allow creation of notes by clicking on the map
but as we're not doing that we don't need it.
7bf44e6
@tomhughes tomhughes Turn on the note layer when adding a note 0e73248
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 18883b5
@tomhughes tomhughes Allow the format to be selected for note API responses 2bceba3
@tomhughes tomhughes Improve formatting of note descriptions in GPX and RSS responses 82eedbf
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 3a654c8
@tomhughes tomhughes Return GeoJSON for notes when JSON format is requested d5295fb
@tomhughes tomhughes Rework notes interface using OpenLayers and rails 0030c77
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
Conflicts:
	app/views/browse/_map.html.erb
	app/views/site/index.html.erb
	config/initializers/mime_types.rb
	config/routes.rb
	lib/map_boundary.rb
	lib/migrate.rb
	lib/osm.rb
	vendor/assets/openlayers/OpenLayers.js
52e5fa6
@tomhughes tomhughes MapBoundary no longer exists 663f3e4
@tomhughes tomhughes Bounding boxes are sanitised on creation now e756dba
@tomhughes tomhughes Use jsonify to create JSON for notes so that it is properly formatted 732c20b
@tomhughes tomhughes Move notes resources to assets directory 3ecf431
@tomhughes tomhughes Deselect note features when the popup is closed c29bcca
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
Conflicts:
	Gemfile
	Gemfile.lock
	lib/migrate.rb
e660e60
@tomhughes tomhughes Drop with_format and user the new :formats render option instead 82cf356
@tomhughes tomhughes Include the event type in the JSON output of a note 85d17f2
@tomhughes tomhughes Make setting of a default status for new notes work 2e1d9f3
@tomhughes tomhughes User errors.add(:base) instead of the removed errors.add_to_base() 67017db
@tomhughes tomhughes Fix mass assignment issues 6f88f4d
@tomhughes tomhughes Update schema 11af5c2
@tomhughes tomhughes Remove redundant routes and add default format specifiers fbf2310
@tomhughes tomhughes Update note controller tests for new GeoJSON output 81d6b9d
@tomhughes tomhughes Fix some bugs found by the note controller tests 39b20bb
@tomhughes tomhughes Get the per-user note list view working again 6de8c2e
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
Conflicts:
	config/routes.rb
	db/structure.sql
6aca6cf
@tomhughes tomhughes Restructure notes URLs according to standard rails conventions c9fb146
@tomhughes tomhughes Start rewriting the notes layer for the front page fe16fec
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
Conflicts:
	Gemfile.lock
	app/views/browse/_map.html.erb
	app/views/user/view.html.erb
	config/locales/en.yml
	config/openlayers.cfg
	db/structure.sql
	vendor/assets/openlayers/OpenLayers.js
0d3a9ed
@tomhughes tomhughes Add OpenLayers.Format.QueryStringFilter to the OpenLayers build 6206ab7
@tomhughes tomhughes Add an entry to the edit menu for turning on the notes layer ea63736
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
Conflicts:
	Gemfile
	app/helpers/application_helper.rb
	app/views/site/index.html.erb
4d91fe3
@tomhughes tomhughes Use standard indentation 74543b6
@tomhughes tomhughes Add support for creating new notes 1f06652
@tomhughes tomhughes Remove redundant code 90fe21a
@tomhughes tomhughes Generate proper descriptions for notes 0b981e4
@tomhughes tomhughes Fix require paths in migrations a63b22a
@tomhughes tomhughes Drop renaming of sequences
Rails seems to rename sequences automatically now when the
corresponding table is renamed, so we don't need to do it.
99a2b54
@tomhughes tomhughes Update database schema 4377418
@tomhughes tomhughes Merge branch 'master' into notes
Conflicts:
	Gemfile.lock
	app/views/browse/_map.html.erb
	app/views/site/index.html.erb
0037502
@tomhughes tomhughes Refactor notes code to work with recent site changes e3d5e3d
@tomhughes tomhughes Use EJS templates for notes 73b59c5
@tomhughes tomhughes Localise notes interface 361906a
@tomhughes tomhughes Use named routes in note RSS builder 28b4c62
@tomhughes tomhughes Include useful URLs in note responses 91b3d1a
@tomhughes tomhughes Get note comment notification working again 92ce228
@tomhughes tomhughes Return a copy of the note data on creation and update f48d8f4
@tomhughes tomhughes Allow an optional comment to be given when closing a note 8b917cc
@tomhughes tomhughes Allow commenting on, and closing of, notes from the web site d57755b
@tomhughes tomhughes Refactor note add/update code 89fc5a7
@tomhughes tomhughes Set attributes on newly created notes 513bec8
@tomhughes tomhughes Improve styling of notes popups 352d936
@tomhughes tomhughes Remove unused translations 9d90474
@tomhughes tomhughes Remove unused stylesheet rules 5cb9f2b
@tomhughes tomhughes Fix up issues with notes in the data browser c6be5f3
@tomhughes tomhughes Correct field name e6c400b
@tomhughes tomhughes Fix links to user notes 324c37a
@tomhughes tomhughes Return the body of a note comment as a rich text object 654d22e
@tomhughes tomhughes Replace htmlize call by rich text to_html call e54f9ed
@tomhughes tomhughes Merge branch 'master' into notes 3fb931f
@tomhughes tomhughes Update list of filtered methods in notes controller e2f1d60
@tomhughes tomhughes Disable buttons while form submission is in progress c0ee3f6
@tomhughes tomhughes Recover properly from a failed notes load
Patch OpenLayers so that it doesn't consider an area as loaded if
the HTTP request fails, so that it will try and load the area when
you zoom back in again.
9f560df
@tomhughes tomhughes Merge branch 'master' into notes
Conflicts:
	Gemfile
	Gemfile.lock
	app/assets/stylesheets/common.css.scss
	app/helpers/application_helper.rb
7599f98
@tomhughes tomhughes Fix formatting of comments in the notes RSS feed 129d505
@tomhughes tomhughes Get the notes tests working again fd6abf4
Kai Krueger Remove nearby_place from the note model
Instead of storing the auto-generated meta information nearby_place
in the database, just look up the information on the fly when needed
and cache it for performance.
0a3aba7
@tomhughes tomhughes Move caching of reverse geocodes to describe_location 5fe5777
@tomhughes tomhughes Merge branch 'master' into notes
Conflicts:
	app/assets/javascripts/browse.js
	app/assets/javascripts/map.js.erb
	app/assets/stylesheets/common.css.scss
	app/views/site/index.html.erb
78f608b
@tomhughes tomhughes Rework notes UI using leaflet de78176
@tomhughes tomhughes Add a scrollbar when a note gets too big 9847507
@tomhughes tomhughes Make sure popups don't overlay controls or the top bar 146e987
@tomhughes tomhughes Police the MAX_NOTE_REQUEST_AREA limit on the client 7f89545
@tomhughes tomhughes Abort any existing load before starting a new one 7ec003d
@tomhughes tomhughes Remove the author_name field from notes ba5107e
@tomhughes tomhughes Include a user URL in JSON and XML responses 9477d7a
@tomhughes tomhughes Link user names to their pages dbc523b
@tomhughes tomhughes Format note comments correctly in the data browser c3cb1de
@tomhughes tomhughes Return note comments as formatted HTML as well as text 2ddd667
@tomhughes tomhughes Display formatted notes in the web UI c533fb4
@tomhughes tomhughes Convert author_ip to a proper INET field 31a031b
@tomhughes tomhughes Style disabled permalinks appropriately 0d11ad7
@tomhughes tomhughes Don't try and add a note when the control is disabled ee530d8
@tomhughes tomhughes Merge branch 'master' into notes
Conflicts:
	Gemfile.lock
	app/assets/stylesheets/common.css.scss
	app/views/browse/_map.html.erb
	app/views/user/view.html.erb
	config/locales/en.yml
3d7eb38
@tomhughes tomhughes Set width of comment entry area in note popups 8cd6168
@tomhughes tomhughes Fix notes page in data browser to match new site style 76559d3
@tomhughes tomhughes Merge branch 'master' into notes 56db9ca
@tomhughes tomhughes Improve comment descriptions in note popups db5c58e
@tomhughes tomhughes Localise dates and times in notes popups e957aaa
@tomhughes tomhughes Tweak sizing of note popups 0b993e5
@tomhughes tomhughes Improve display of anonymous note comments 2ef58f4
@tomhughes tomhughes Improve styling of the per-user notes list view 9d3b419
@tomhughes tomhughes Add anonymous comment warning to note popup 5ad4554
@tomhughes tomhughes Show anonymous user warning in data browser note view 16a0f14
@tomhughes tomhughes Make notes RSS feeds work ff73d12
@tomhughes tomhughes Touch notes when new comments are added 43f39c5
@tomhughes tomhughes Only show each note once is the user notes view 8e5364b
@tomhughes tomhughes Improve date display in user notes list 7f83692
@tomhughes tomhughes Move the note popups up slightly
The default position makes it hard to grab the marker and move it
when adding a note, so move themm up a few pixels.
ae48206
@ppawel

Since there's no captcha, is there any server-side anti-spam mechanism (like API call throttling) to prevent abuse of anonymous notes?

@tyrasd

The "close" button in the popup is ambiguous: does it close the popup or the note/issue? (I accidentally closed my own note just after creating it...). Better use something like "mark as fixed".
Should it be possible to close a note without commenting?
Is there a way to re-open a closed note (and: is there a way to comment on a closed note)?

tomhughes added some commits
@tomhughes tomhughes Remove the "new note" marker when the user clicks somewhere else 51dcf86
@tomhughes tomhughes Avoid javascript warning d92ca41
@tomhughes tomhughes Remove redundant return c12fe5f
@tomhughes tomhughes Pass parameters to APIAlreadyDeletedError correctly 6279d83
@tomhughes tomhughes Make the API reject changes to closed notes ae27f7a
@tomhughes tomhughes Reject note comments with no text d1aa084
@tomhughes tomhughes Change "Close" button to "Resolve" in notes popup 9f02513
@tomhughes tomhughes Stop newly added notes disappearing a5ca0f4
@tomhughes tomhughes Merge branch 'master' into notes 8090e08
@tomhughes tomhughes Separate the links in the bottom right map corner better 68044c6
@tomhughes tomhughes Reject attempts to create notes with no comment text eed9de5
@tomhughes tomhughes Clear the note cache when the note layer is turned off 34f823a
@tomhughes tomhughes Update "new note" messaging to provide more guidance 5bb55c2
@tomhughes tomhughes Preload sender/recipient details for messages 3a06235
@tomhughes tomhughes Reimplement User#is_friends_with? in a non-insane way abd2900
@tomhughes tomhughes Improve selection logic in DiaryEntry#rss 9d23b0d
@tomhughes tomhughes Optimise database reads in DiaryEntry#list 9717b81
@tomhughes tomhughes Avoid reading nodes twice in WayController#full 6300fa2
@tomhughes tomhughes Use changeset and user caches in Changeset#download 78e8828
@tomhughes tomhughes Force translations to be preloaded during startup 652b09b
@tomhughes tomhughes Wait until after rails has initialise I18n to preload the resources 30f8e41
@tomhughes tomhughes Mark CORS responses as uncacheable d53bbe5
@tomhughes tomhughes Add javascript OAuth support e8d3263
@tomhughes tomhughes Use OAuth for notes API calls and require authentication to close 38255f9
@tomhughes tomhughes Merge branch 'master' into notes
Conflicts:
	Gemfile.lock
898cc82
@tomhughes tomhughes Add missing padding at right hand end of greeting menu 15be6b3
@tomhughes tomhughes Tidy up javascript OAuth code 00a4d9f
@tomhughes tomhughes Don't try and use OAuth if we don't have a token 84f7d32
@tomhughes tomhughes Fix display of updates on newly loaded notes d00994d
@tomhughes tomhughes Focus on the text field when a note is opened 0a4b860
@tomhughes tomhughes Test that closing and deleting notes require authentication 544113a
@tomhughes tomhughes Add a new write_notes permission needed for OAuth access to notes 97e0d5a
@tomhughes tomhughes Restriction note deletion to moderators f4b599e
@tomhughes tomhughes Allow a comment to be supplied when hiding a note 030bb31
@tomhughes tomhughes Return an updated copy of the note from the delete call 4b669ec
@tomhughes tomhughes Add a "Hide" button to notes when viewed by moderators 979822f
@tomhughes tomhughes Merge branch 'master' into notes
Conflicts:
	Gemfile.lock
	app/views/diary_entry/list.html.erb
7f598ab
@tomhughes tomhughes Merge branch 'master' into notes 52611a5
@tomhughes
Owner

I think this is probably ready for merging now, unless anybody can see any major problems that should be resolved first?

@openstreetmap-mirror openstreetmap-mirror merged commit 52611a5 into openstreetmap:master
@tomhughes tomhughes deleted the tomhughes:notes branch
@tomhughes tomhughes restored the tomhughes:notes branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.