Open andrepapoti opened 5 months ago
No issues with the idea or API design on this one. Just a couple of minor nits and a slight tweak to the model (that will have knock-on effects for the API also).
Thought on this more over the weekend. Out of curiosity, how many maintainer notes would one expect and do we need them to be surfaced to the top above comments? Put another way, would we expect there to be a single uber-important note on a patch, or many notes like a conversation? I'm thinking that a note is really no different from a comment. Rather than adding a whole new model, we could simply extend the Comment
model and API to allow creating comments via the web UI and REST API and marking a comment as private (and maybe also hidden, for spammy replies). We would need a visual way to distinguish between "real" comments (i.e. those sent via the mailing list) and other replies we should allow users to filter between the two via a dropdown filter that allows you to show only comments from e.g. a certain author, submitted via the web UI etc. but it could flow a bit better and avoid adding yet another resource to our database and API. Again, this is taken from experience: tools like Bugzilla, GitHub Issues, and Red Hat's Support Portal all work this way, with private comments interleaved with regular comments. What do you think?
@stephenfin
I don't imagine patches having many notes at once (although it's possible in the current implementation).
I think the idea for it is to provide important context for a patch before the reader dives into the patch so it makes sense to give them more importance than comments, they are similar to a commit message, but can be private and edited without the need to submit a new patch. If they were to be in the middle of a comment thread they wouldn't have the same emphasis on their message.
Like you mentioned, notes also have a different way to interact with them, to maintain the privacy they are added through the Web UI / REST API
For these reasons notes, in their current state, are different enough from comments to have their own model.
I think that if we went with private comments the use case for the feature would be a bit different, but very valid as well
That's right, FWIW, the intention is small number of important notes / one note which can be edited.
Description
Add support for maintainers to add notes to patches. Notes can be either public or private enabling non maintainers users of a certain patches to see them or not. The API for this feature allows to create, read, update, and delete notes. Reading can be either a detailed view of a note or a list of notes for a specified patch. The patch serializer was update to include the notes related to it
Related