Commit Graph

9042 Commits

Author SHA1 Message Date
Bryan Housel 694cc60893 Add thread dots to note header icon, disable comments on closed nodes 2018-07-16 16:53:45 -04:00
Bryan Housel 47de7b304f Make sure note report link doesn't show on hover 2018-07-16 16:03:00 -04:00
Bryan Housel 70f87632c7 Cleaner note icon rendering
Before: We drew 2 fontawesome comment icons, on on top of the other
After: Moved icon into iD spritesheet and gave it an actual `stroke` property that can be styled
2018-07-16 13:18:38 -04:00
Thomas Hervey 33de399bac fixed note-report display 2018-07-16 11:28:51 -04:00
Thomas Hervey 7ad765d408 added simple tests for loading and retrieving notes 2018-07-16 10:54:40 -04:00
Thomas Hervey 7fb42ac9d6 added note reporting and margin to save buttons 2018-07-13 17:09:51 -04:00
Bryan Housel 1a106f5253 Make uiViewOnOSM work for notes too, add it to note_editor footer 2018-07-13 15:55:58 -04:00
Bryan Housel 33ef9a4357 Wrap callbacks with common checks for connection id and auth failure
This eliminates a lot of the copy-paste code in every callback.
2018-07-13 15:14:20 -04:00
Thomas Hervey bd1586500e added tests for notes service 2018-07-13 15:01:43 -04:00
Bryan Housel f825845b79 Can't skip seen on the userDetails call
This call really does need for a result to be passed to the callback
2018-07-13 00:31:04 -04:00
Bryan Housel 8a1079c3c6 Update notes on status change 2018-07-13 00:15:30 -04:00
Bryan Housel 775b47272d Remove from inflight cache before doing anything in done 2018-07-12 23:56:03 -04:00
Bryan Housel 57da729837 Implement note save button code 2018-07-12 23:50:29 -04:00
Bryan Housel 645cc790a3 Add docs about OSM API, finish implementing postNoteUpdate
`postNoteUpdate` can hangle status changes and comment additions
(I named it that to be like `putChangeset`)

Also renamed `user` to `loadUser` to be consistent with other calls
2018-07-12 23:46:07 -04:00
Bryan Housel 19560ebc90 Properly save and restore caches when entering/leaving the walkthrough 2018-07-12 15:39:04 -04:00
Bryan Housel fe7086f753 Add header close 'X' button, add grey hover styling 2018-07-12 02:51:49 -04:00
Bryan Housel 5e5601f555 Store the unsaved comment in the note itself 2018-07-12 02:09:24 -04:00
Bryan Housel 91add0c33e WIP on buttons, simplify, remove some event dispatch
- I made the buttons work like GitHub comment-on-issue buttons
before typing:  "Close Note" / "Comment" (disabled)
after typing:   "Close and Comment" / "Comment" (enabled)

- I removed a bunch of the event dispatches.  These are useful for sending
events to listeners/observers outside of the module.  In this case I think
we can handle most of the things from within the uiNoteEditor.  We can still
dispatch an 'update' event so that modeSelectNote can reselect and redraw
the note after some change happens to it.

TODO - make the buttons work / check the OSM API stuff.
2018-07-11 23:10:01 -04:00
Bryan Housel 3454753bf6 Drop more/less toggle and just use a scrollbar for long comments 2018-07-11 16:00:54 -04:00
Bryan Housel e9e2f9ba8f Style note header 2018-07-11 15:41:43 -04:00
Bryan Housel f52f24b517 Add noteOptions, default to 10k note limit and 7 days closed
Also bump note tile zoom to z12. There just aren't that many notes,
so this reduces API calls.
2018-07-10 23:28:37 -04:00
Bryan Housel 7423d192d4 Implement multi-fetch get for users from OSM API
Eagerly load user details after loading notes
(re: openstreetmap/openstreetmap-website#1921)
2018-07-10 23:02:37 -04:00
Bryan Housel 0d7c292c23 Refactor out uiNoteHeader and uiNoteComments into separate modules
uiNoteEditor was getting big!
2018-07-10 21:45:02 -04:00
Thomas Hervey eafae6c58c WIP: update service calls; todo: note update event handling 2018-07-10 13:50:36 -04:00
Thomas Hervey c460c03da5 fixed typo 2018-07-09 10:11:50 -04:00
Thomas Hervey 14356cefe2 WIP: toggle note status 2018-07-08 12:50:02 -05:00
Thomas Hervey 0f49514fbb updated: removed centering when clicking a note 2018-07-08 10:27:44 -05:00
Bryan Housel 7b42743513 pacify some eslint warnings 2018-07-07 23:00:48 -04:00
Bryan Housel 3eb3eefabd Combine Osm and Notes layers into the same ul 2018-07-07 22:54:27 -04:00
Bryan Housel d137aa0046 Add "More/Less" toggle for too long comments (curr limit 600 chars) 2018-07-07 00:25:42 -04:00
Bryan Housel 01b33e3fb7 Linkify the usernames 2018-07-06 11:28:01 -04:00
Bryan Housel 263ec9e36a Add code to swap in avatar images for users that have them 2018-07-05 18:42:42 -04:00
Bryan Housel 6f1dc12f99 Add user method to osm service, _userCache, user parser 2018-07-04 03:20:16 -04:00
Thomas Hervey 73ee5c2fc9 fixed select_note mode, cleaned note_editor, TODO: enable note save 2018-07-03 22:45:51 -04:00
Bryan Housel bf499d9438 Restore modeSelect, and make a new modeSelectNote just for the notes 2018-07-03 18:11:59 -04:00
Bryan Housel b14d1b5061 resolve conflicts, fix a few minor bugs prob caused by merging:
- don't insert multiple times into the rtree in `services/osm.js`
- use `d.id` instead of `d.key` as the key in `svg/notes.js`
2018-07-03 16:40:07 -04:00
Thomas Hervey 8121f585d5 added checks for multiclick and click on notes 2018-07-03 15:39:22 -04:00
Thomas Hervey 61ae541cfc updated: notes save buttons 2018-07-03 10:57:53 -04:00
Thomas Hervey b4c6607384 merged from remote 2018-07-03 10:49:36 -04:00
Bryan Housel 68a3e6e69a npm run build 2018-07-03 09:15:22 -04:00
Bryan Housel 96794d29d7 Merge pull request #5120 from tordans/patch-2
Add capacity to playground:swing-preset
2018-07-03 09:14:28 -04:00
Tobias 095ae133c4 Add capacity to playground:swing-preset
The capacity defines if there is one swing on the object or more. A lot of playgrounds have one structure with two swings on it.
2018-07-03 14:00:36 +02:00
Bryan Housel ab8e793a72 Playing with note styling, add avatars and more metadata 2018-07-03 02:41:47 -04:00
Bryan Housel e0cc6260f5 Switch innerHtml to textContent, which properly unescapes xml
This commit also fixes a linter error, and switches some
lodash _forEach to normal for loops.
2018-07-02 23:22:00 -04:00
Bryan Housel d87a2c2d2d Adjust pointer css for note markers
This sets `pointer-events: none` for the `.note-shadow` class,
to fix an amusing bug where hovering over the filled part of the comment
icon would work ok but hovering over the "dots" would not.
2018-07-02 22:18:42 -04:00
Bryan Housel 2d2845e5d4 If notes are coincident, move them apart slightly 2018-07-02 16:56:05 -04:00
Thomas Hervey bd8705bf85 updated: reintroduced hovering on notes 2018-07-02 16:32:17 -04:00
Bryan Housel 7999aca9e2 Add getNode and replaceNote methods, refactor caches 2018-07-02 16:02:53 -04:00
Thomas Hervey 86dc0c9012 updated: new comments in notes sidebar ui 2018-07-02 15:51:55 -04:00
Bryan Housel 94eae89fc3 Merge, continue to tweak note_editor 2018-07-02 12:50:53 -04:00