- Create a shared style module that is included in every custom element
- Add the shared style module to each existing element
Change-Id: I1ee382955afe4ff630548a6640e7c4d03688849d
In the previous fix, the function was not called and since it was
the function that set the class to 'hidden' it did not hide.
Change-Id: Ic8f908802cb515086860f20e2c82d0ddd06c0278
Previously, the rest api interface set '__isOnParent' for comments.
When comments were added, the property from the comment thread
'isOnParent' was passed as a property. When the draft was saved, it was
expecting '__isOnParent' rather than 'isOnParent' and this caused
comments to show up on the wrong side after saved/refreshed, because
'__isOnParent' was undefined.
Instead of changing to either '__isOnParent' which would be strange to
pass as an attribute or 'isOnParent' which would look like it came from
the api directly, this change introduces isOnParent functions so that
translation doesn't need to be done with the API.
Bug: Issue 5831
Change-Id: I3b849ba5878275cda0a39638626a12bd51341a29
Use '__isOnParent' as a boolean in place if 'side' ('PARENT vs
'REVISION'). In doing so, it's necessary to convert to/from 'side'
whenever interacting with the REST API.
Change-Id: Ic023c9be1969597e4b9c73a51cfed9f5eb9bc23e
Previously, if a PARENT revision was getting compared to a patchset,
the local storage key would be the same for both, and there were issues
if a user was trying to write drafts on the same line on either side.
This addresses the issue by storing 'PARENT' as the patch number in the
local storage key, so that each key is unique.
Bug: Issue 5412
Change-Id: Ia8b2f0abe1d24a3849628fe335c931f07bcaff52
Unresolved state is only shown when the comment actions (reply/Ack/etc)
are shown AND when the thread is unresolved.
Feature: Issue 5442
Change-Id: I7e0859530198fa17172e9f9efa73a20c7aa03975
Move all buttons that generate a reply of some sort (done, ack, reply,
quote) to the comment thread instead of the comment [1].
When there is a draft for a particular comment thread, all reply buttons
are hidden [2]. For example, if you click reply, you cannot click done
on the same thread, unless you remove the draft.
Each thread can have up to 1 draft. It's also worth noting that if a
thread has a draft, and the user clicks on the line or 'c' at the same
range, the existing draft will switch to 'editing' form.
[1] With the exception of "please fix" for robot comments.
[2] In this case, The please fix button will be disabled when other
reply buttons are hidden.
Feature: Issue 5410
Change-Id: Id847ee0cba0d0ce4e5b6476f58141866d41ffdad
Goes along with c/95273/. Adds commentSide attribute to comments to see
which side of the diff view they belong on. This is also used as part
of the locationRange for the gr-diff-comment-thread-group, so that two
thread groups can be on the same line or range for the unified group (
one for the right, one for the left).
Note: there is already a 'side' attribute on the gr-diff-comment, which
is confusing. This side actually references 'PARENT' or 'REVISION', to
identify whether the comment belongs to the parent or any revision. On
diffs where two revisions are compared to each other, this cannot be
used to determine left/right. However, because 'side' is part of
the CommentInfo entity[1], it is difficult to change the name and make
more sense out of that.
[1] https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#comment-info
Bug: Issue 5114
Change-Id: I5cc4c17d4bb134e31e5cc07ff9b08ed349488c97
Occasionally comment threads would render in such a way that the bottom
border is covered by the following diff line. Giving 1px of margin below
the thread elements makes the border consistent generally.
Bug: Issue 5083
Change-Id: I3f29905d1dc388d2d160444c16f09ddeaaec36b5
This change tracks and exposes the resolved state of a comment thread
without exposing the UI for modifying that state. This enables features
to be built out while the API request does not exist in the backend.
Feature: Issue 4879
Change-Id: If002035024920a7762519cedf5a869221bbbc3c8
This change addresses a few issues that existed due to multiple comments
in an editing state at the same time.
1) Fixes issue where if you create two replies and add text to the
second reply, then delete the first one, the text in the second textarea
gets removed.
2) Fixes issue where if you reply and add text, then reply again with
the first draft still editing, the second draft gets populated with the
message from the first comment.
3) Fixes issue where if you have multiple replies and delete one of
them, local storage gets erased. This change sets local storage to the
value of the first editing message found after deleting the other one
(if it exists).
Bug: Issue 4409
Change-Id: Ib5913a34a79783a4a87b4a298e25b02fc587b8dd
This change adds an API request to get robot comments for displaying
inline in the diff view. They are styled in a different color, contain
build and robotId information, and a "please fix" action rather than the
standard set of actions.
Feature: Issue 5089
Change-Id: I1f5954a2ed01920bb7c3dc897e3285687ff7d3ca
This change is the PolyGerrit counterpart to [1].
Nicer rendering for reviewer comments in PolyGerrit using the Gerrit
Wiki-like format. Whereas, formerly, PG comments were set in PRE blocks
using monospaced font so that the original format and alignment of the
comment can be directly viewed. This change allows comments to default
to a variable-width font with wrapping while separately styling blocks
intended to be pre-formatted text, quotes and lists.
The logic to parse comment text into blocks is borrowed from the Java
implementation found in [1]. Test cases are additionally translated from
this change to ensure coincident behavior.
Introduces GR-FORMATTED-TEXT to display these comments, and which uses a
similar interface to GR-LINKED-TEXT. Much like [1], the comment is
parsed into a list of blocks. These blocks are then mapped to the DOM
nodes that get attached inside the element.
[1] I8e11d363b80bff0b6395f56e210b636f68db36fa
Feature: Issue 4861
Change-Id: I245d6782e2fd8982ac3eda438fe4ca80f3658195
The border can just surround the thread itself. There doesn’t need
to be this roundabout way of doing it via *-of-type.
Change-Id: I310f0615984c80b7a9c46c255c9179b1f15e6e59
There is no change in functionality. Only moving things around.
+ Separate html from the js.
+ Place the unit test for a component within the same folder.
+ Organize the components in subfolders.
Change-Id: I51fdc510db75fc1b33f040ca63decbbdfd4d5513