Modify

Opened 9 years ago

Last modified 15 months ago

#12270 new enhancement

[patch] allow modifying note data that has not been uploaded yet

Reported by: richlv Owned by: team
Priority: normal Milestone:
Component: Core notes Version: tested
Keywords: gsoc-candidate Cc: PHerison

Description

while editing and adding notes, it could be helpful to modify them - for example, remove new notes completely, edit their content, remove new comments, edit their content

currently there does not seem to be any way to do so short of deleting the note layer, which nukes all modifications

Attachments (1)

delete-note.patch (6.3 KB ) - added by NoteRoamer 15 months ago.
Adds a delete option to note dialog popup menu.

Download all attachments as: .zip

Change History (7)

comment:1 by mnalis, 5 years ago

Ticket #13027 has been marked as a duplicate of this ticket.

comment:2 by Klumbumbus, 5 years ago

Keywords: gsoc-candidate added

(move keyword from duplicate ticket)

comment:3 by skyper, 5 years ago

Cc: PHerison added

by NoteRoamer, 15 months ago

Attachment: delete-note.patch added

Adds a delete option to note dialog popup menu.

comment:4 by NoteRoamer, 15 months ago

Summary: allow modifying note data that has not been uploaded yet[patch] allow modifying note data that has not been uploaded yet

The attached patch solves one part of this ticket. It adds a delete option to the notelist popup menu.

There is no option to delete a note in the OpenStreetMap database so the delete is only done in the local layer. When deleting a note that is modified (new or has a new comment) a confirmation dialog is displayed.

All notes can be deleted, I consider this a feature. It can be used in a workflow such as
1) Download a large number of notes
2) Look at them, deleting the ones that are not interesting to you
3) Go out survey the interesting ones
4) Make map better

The patch also include two comment fixes, one spelling and one removal as the comment is no longer valid.

I have tested all combinations of add and modify that I could think of, as a deleted note "disappears" from the data layer it works nicely with the "unsaved changes" dialog in example deleting a commented note will behave as if the layer was not changed.

comment:5 by taylor.smock, 15 months ago

I'd be a lot happier if there was undo/redo functionality. I can see someone accidentally deleting a note. It does take a bit more effort than accidentally clicking on Comment though (on macOS, you can right-click and move the mouse, then release it to cause an action to fire). I've looked at adding undo/redo functionality in the past, and it will take a lot of work. So don't worry about that (too much).

I'll play with it for a bit to see what I think overall though.

Comments:

  • I'm not certain I like Delete note. Maybe Remove note?
  • Adding a possibility for users to assign it a shortcut is great, and not having a default is better. :)
  • You reused isModified as the method name, which is used elsewhere. And deduplicated code. :)

in reply to:  5 comment:6 by NoteRoamer, 15 months ago

Replying to taylor.smock:

I'd be a lot happier if there was undo/redo functionality. I can see someone accidentally deleting a note. It does take a bit more effort than accidentally clicking on Comment though (on macOS, you can right-click and move the mouse, then release it to cause an action to fire). I've looked at adding undo/redo functionality in the past, and it will take a lot of work. So don't worry about that (too much).

The undo for an unmodified note is to download it again, it will/should merge back into your layer without issue. For an modified note there is a confirmation before deletion. It would be no issue to have the confirmation for all deletions but for my main use case it would create a lot of extra clicks. I think it could be quite easy to make the delete move the object to a "deleted array" and make it possible to restore it from there, but that I think is better work on as a later separate patch.

I'll play with it for a bit to see what I think overall though.

Comments:

  • I'm not certain I like Delete note. Maybe Remove note?

I'm the new guy on the block, naming is the hardest part of programming, I will gladly rename things. I choose Delete because that is what was used in the Layers, Selection, Relation dialogs.

  • Adding a possibility for users to assign it a shortcut is great, and not having a default is better. :)

I got a helpful comment on another patch. :)

  • You reused isModified as the method name, which is used elsewhere. And deduplicated code. :)

I first read this as something that needed to be fixed, but now I am reading approval of the refactoring?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to richlv.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.