-
Notifications
You must be signed in to change notification settings - Fork 921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal for adding support for map notes tags #5294
Comments
It isn't clear from the description if this is intended or not, but to be really useful (for example to document with which client an operation is being performed) they need to be "per interaction" so not just for the original note creation but at least for every comment, and maybe for opening and closing too. |
At the moment, tags are added only at creation time and are per-note. For example, if created from OpenStreetMap, only pair But, it will not be hard to add tags for comments / actions (open, close, ..) .. We can add it without disrupting current implementation as next steps, if others agree. Thanks for great idea! |
Do you want versioned notes with sets of tags for every version, like elements? |
No, I don't think that would be an appropriate model. Just as comments extend the conversation around the original note and do not replace it, tags associated with comments should not replace the original ones. |
I thought about this again and versioned notes may be what we actually want. We already kind of have note versions, they only contain state changes (open -> closed -> open again). But with tags we might want to record tag changes too. Being able to change tags allows to use them for more than just recording what tool the note was created with. We may want to use them for some kind of categorization (like "needs survey"). We might want to add some categories to already existing notes. Also we might want to add them to our own newly created notes because the tools we were using to create these notes don't allow adding tags or it was inconvenient to add the tags at the moment.
We don't have tags associated with comments anywhere else on the site.
And what's the goal of that? Is it that important to record a client if it was just a comment? We're not adding tags to changeset comments and not trying to record clients in some other way, should we start doing that?
This is different to commenting. If anyone actually modifies the note, we might want to record that by adding a tag such as |
Comment asking for editable tags: #3932 (comment) |
If we want editable tags, then we definitely need (if we want to follow remaining of website) versioning for notes. But what do you mean by "modifying note"? Only adding / removing / changing tags (the easiest) or also changing note's status or perhaps also updating note's description or also some other "interaction" (hardness rises when going from left to right :-))? |
At first editable tags and status (which is already editable). The versions table will also contain the description and coordinates, but we won't make them editable right away. Currently there's no API for that, maybe when API 0.7 happens we can have create/update endpoints receiving xml/json with the entire note data. |
We have a so called note comments table: CREATE TABLE public.note_comments (
id bigint NOT NULL,
note_id bigint NOT NULL,
visible boolean NOT NULL,
created_at timestamp without time zone NOT NULL,
author_ip inet,
author_id bigint,
body text, -- (a) not always a comment
event public.note_event_enum -- (b) not a comment
); As you can see, it contains things that are not comments:
Here's the changeset comments table for comparison: CREATE TABLE public.changeset_comments (
id integer NOT NULL,
changeset_id bigint NOT NULL,
author_id bigint NOT NULL,
body text NOT NULL,
created_at timestamp without time zone NOT NULL,
visible boolean NOT NULL
); You can turn If we replace |
The note versions table could look like this: ... (
note_id bigint NOT NULL,
version bigint NOT NULL,
status public.note_status_enum NOT NULL,
"timestamp" timestamp without time zone NOT NULL, -- more standard name would be created_at but that could be mixed up with the note creation timestamp
latitude integer NOT NULL,
longitude integer NOT NULL,
tile bigint NOT NULL,
user_id bigint NOT NULL, -- I guess we're not going to call this "author", that won't sound right for non-initial versions
user_ip inet, -- if we keep anonymous notes
...
) We also need to choose between visible boolean NOT NULL, and redaction_id integer depending on whether we want to use redactions for hiding note version. If we want the versions table to be similar to element versions, its primary key should be |
Problem
Do you have some key-value meta-data you would like to store with map notes? Would you like to do it like with tags in nodes / ways / relations / changesets / .. instead of writing in description / comments? Note tags have already been mentioned / requested several times in #385 , #801 , #3932 and similar. Here we expose our plan about how we could add them.
Description
Here is a list of PRs (steps) we would like to work on with rough description of what they will do. We would highly appreciate your feedback and suggestions on how we could improve the plan:
<tag k="" v=""/>
pairs between status and comments like in this examplecreated_by:OpenStreetMaps-Website
tag to newly created note when created from OSM websiteScreenshots
The text was updated successfully, but these errors were encountered: