OSM-de / osm-org-greasemonkey

Additional links for openstreetmap.org using Greasemonkey
6 stars 1 forks source link

hide resolved notes on user pages #4

Closed joshinils closed 2 years ago

joshinils commented 2 years ago

https://www.openstreetmap.org/user/cyton/notes may contain open and closed notes, I think it be better if I can hide closed notes via some checkmark on that site.

joshinils commented 2 years ago

also some colors are always good, like highlighting my username, so i can distinguish notes i created from notes i commented on.

mine are marked with css class creator so filtering via css is possible here

html body.notes.notes-index.vsc-initialized div#content div.content-body div.content-inner table.table.table-sm.note_list tbody tr.creator
{background: white}

html body.notes.notes-index.vsc-initialized div#content div.content-body div.content-inner table.table.table-sm.note_list tbody tr
{background: lightgray}
kmpoppe commented 2 years ago

I've been thinking about this as well ;)

There are two options:

Either cope with what gets delivered from the server, do some educated guessing on whether a page should be skipped and have pages with only one entry. Not favourable.

Alternatively, we could use the OSM API to pull the open notes (https://api.openstreetmap.org/api/0.6/notes/search.json?display_name=<URL encode user's Display Name>&closed=0), throw away the complete contents of what comes from the server, fill with what comes from API and also overtake the content-inner-div >> p that displays the pagination and rebuild all the links. Favourable option, although lots more work.

Your take on that, @joshinils?

kmpoppe commented 2 years ago

Decided to take the full option. Version 15, Release 0.15

joshinils commented 2 years ago

the header of the table is also gone now, which contained

  Id Creator Description Created at Last changed

and there is no clickable way to go back to the previous look, at least not without reloading the whole page. and at that point the button to only show open notes is not needed, since only open notes are shown.