~niklaseklund/egerrit

ref: a4ed537fb95e450868d8b9fde10ad5a7cc27821f egerrit/notes.org -rw-r--r-- 4.6 KiB
a4ed537fNiklas Eklund Add a notes.org 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
* Ideas

Ideas for improving the =egerrit= package are stored in this section. These ideas should be seen as independent and the order doesn't indicate priority.

** Allow users to pause and resume reviews

Add persistent storage of reviews that yet have not been published to Gerrit. This would allow =egerrit= to support local draft reviews. The idea is that users should be able to pause a review and later resume it, even if Emacs has been restarted. This would require us to utilize a database to temporarily stored draft review objects.

Example of information to store:
- draft reviews comments
- draft review labels

** Add info section to the top of conversation buffer

There are information that are useful to highlight to the users when doing a review. This type of information could be shown at the top of the buffer (similar to how a commit message is shown at the top of a diff).

Example of information:
- The current review label
- What revisions the diff is based on (base vs latest revision) or (revision1 vs revision2)

** Add an egerrit-comment-minor-mode

Add a global minor mode that could be used to create comments from source code files. This minor mode would allow users to highlight source code and create a comment. It would need to check that there is currently a review active and that the change actually changes the file the user tries to add a comment to.

** Add support for file comments

Currently the users of the package can not create a file comment. This could be done by either:
- Assuming that if a user doesn't highlight anything in the diff it is a file comment
- Or by letting the user highlight the filename in the header of the file diff hunk
- Or by adding a prefix argument to the comment command?

** Create an internal representation of a review

Take an holistic approach to reviews. Add a review object that represents a review of change. It would make it easier to allow for users to add information to this object and then when finalizing the review send all the data that are currently stored in the object. It also becomes easier to store the object in a database.

Example of information that could be stored in a review object:
- The change-id
- What the range is of the review is it latest revision vs base or something else
- New conversations
- Updated conversations with replies
- Label of the review

** Improved integration of conversations with the diff buffer

The diff buffer and the conversations goes hand in hand. But there is currently limited support for how to integrate these two. One thing that can be improved is how to locate the conversation in the diff buffer.

A conversation should be able to relate to the diff buffer in the following way:
- By matching a specific hunk in the diff buffer
- By relating to a specific file in the diff buffer (exact location can not be found)
- By relating to an unknown file in the diff buffer (maybe the comment is from a patch set where an old file existed that are no longer present in the current revision) Put the location on the top, below the commit message?

** Improved visibility of conversations in diff buffer

Allow comments to be shown as overlays in the diff buffer. This would allow a user to more easily see where a conversation are and press it to focus on it in the conversation buffer. If there are multiple overlapping conversations that could be showed by adding a number to the overlay?

** Extend egerrit-diff mode

Improve the diff mode by adding metadata information such as:
- If a hunk/file has been reviewed
- If a file is autogenerated

This metadata information could be stored in the review object in order to make the information persistent. It could also be used then to improve the =imenu= support of =egerrit-diff= in order to show =reviewed= and =autogenerated= as annotations to the different files.

** Start new conversations

Currently the conversations that are started locally by a user aren't represented in the same way as those that are fetched from Gerrit. They lack the context when shown. The context should be generated either from the diff buffer, when a conversation is started there, or when its started in the source code.

**  Implement support for imenu in conversation buffer

Allow for the users to easily navigate between the conversations in by implementing support for imenu.

** Keep conversations in conversation buffer sorted

Currently the conversations are sorted when they are first generated. But if a user starts a new conversation it is added to the top of the conversation buffer. Ideally the conversations should remain sorted.

* Road Map

Documenting the upcoming planned changes.