Move functionality from FileAttachmentReviewUI into base ReviewUI.
Review Request #13525 — Created Feb. 6, 2024 and submitted
In order to make Review UI classes more flexible, we're going to
consolidate all the functionality down into the base class. We currently
had theReviewUI
class which has an opaqueobj
member, and the
FileAttachmentReviewUI
class which assumes thatself.obj
is a
FileAttachment
. This change takes the functionality from
FileAttachmentReviewUI
and moves it into the base class,
conditionalizing it based on the type ofself.obj
. This will allow us
to add additional conditions for other types of objects, such as
allowing it to be aFileDiff
.This also adds a new flag to the ReviewUI classes for whether they
support operating on aFileAttachment
. This is used when selecting the
best ReviewUI for a given object.
- Ran unit tests.
- Tested to make sure Review UIs for common file types (images,
markdown) still worked correctly.
Summary | ID |
---|---|
39f014dad0dde611d23886aaa48467f89482e558 |
Description | From | Last Updated |
---|---|---|
line too long (93 > 79 characters) Column: 80 Error code: E501 |
reviewbot | |
line too long (82 > 79 characters) Column: 80 Error code: E501 |
reviewbot | |
do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()` Column: 20 Error … |
reviewbot | |
line too long (80 > 79 characters) Column: 80 Error code: E501 |
reviewbot | |
Typo "RevieUII" -> "ReviewUI" |
maubin | |
Shouldn't this be typed as Optional[object]? |
maubin | |
Add , optional to these args. |
maubin | |
do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()` Column: 20 Error … |
reviewbot | |
Wrap ReviewUI with :py:class: |
maubin |
- Commits:
-
Summary ID c7ea3fa6c5c100211972ed31d9813eacdf2cbc7c 39f014dad0dde611d23886aaa48467f89482e558 - Diff:
-
Revision 2 (+944 -872)