Archive review requests from inbox icon
Review Request #10154 — Created Sept. 21, 2018 and submitted
Made the inbox icon on review request pages a shortcut for
archiving/unarchiving the review request.The idea behind this change is to make the archiving/unarchiving of
requests a little bit faster for advanced users.The shortcut was implemented by adding archive/unarchive click handlers
to the icon. A title attribute was also added to the icon which
dynamically changes to "Archive review request" or "Unarchive review
request". This should help with accessibility and general ease of use.
There were no changes made to any Python files so the Python tests were
not ran for this change.The JS tests were ran for these changes.
These changes were implemented off the master branch version of
ReviewBoard which had 6 failures for the JS tests.The JS tests when ran on this update had the same 6 failures as in the
master branch JS tests.
Description | From | Last Updated |
---|---|---|
Can you add some title= text to the inbox icon that says "Archive" ? |
brennie | |
Please update the description to include a little bit more information about the motivation for this change. |
david | |
Please fill out the "Testing done" field explaining what you have done to test the change. |
david | |
Can you limit your summary to 50 characters or so? |
brennie | |
Can you rewrite your summary to be in the imperitive mood, i.e., as if it were a command or order? … |
brennie | |
Can you wrap your description & testing done at 72 characters? |
brennie | |
This is an es6 file, so we can (and should) have a comma on the last item in the object. |
david | |
Your code has trailing whitespace. You'll want to remove this. |
brennie | |
This should be let over `var. |
brennie | |
Instead of switching on the iconClass, I would do what the calculation for iconClass does, e.g.: const iconTitle = (visibility … |
brennie | |
These need to use gettext('...') so that the strings are marked for translation. |
brennie | |
Since these are classes, they aren't necessarily unique. It is possible that the rb-icon-archive-{on,off} class could be used for another … |
brennie | |
We're now doing the same equality check three times. How about adding: const visible = (visibility === RB.ReviewRequest.VISIBILITY_VISIBLE); |
david |
- Description:
-
Made the inbox icon on review request pages a shortcut for archiving/unarchiving the review request.
+ + The idea behind this change is to make the archiving/unarchiving of requests a little bit faster for advanced users.
+ + The shortcut was implemented by adding archive/unarchive click handlers to the icon. A title attribute was also added to the icon which dynamically changes to "Archive review request" or "Unarchive review request". This should help with accessibility and general ease of use.
- Testing Done:
-
+ There were no changes made to any Python files so the Python tests were not ran for this change.
+ + The JS tests were ran for these changes.
+ These changes were implemented off the master branch version of ReviewBoard which had 6 failures for the JS tests. + + The JS tests when ran on this update had the same 6 failures as in the master branch JS tests.
- Commit:
-
570c6e94279146a0bd3eafe17458b5f1c039790b11e336e03010bc7906b5df311459b812e131cf32
Checks run (2 succeeded)
- Commit:
-
11e336e03010bc7906b5df311459b812e131cf32e7dbc7c5c51f2794e7b2e64877e121d95500637b
Checks run (2 succeeded)
-
-
-
Can you rewrite your summary to be in the imperitive mood, i.e., as if it were a command or order?
If you substitute your summary into the following sentence, it should make sense:
This patch will <summary>
-
-
-
-
Instead of switching on the
iconClass
, I would do what the calculation foriconClass
does, e.g.:const iconTitle = (visibility === RB.ReviewRequest.VISIBILITY_VISIBLE ? gettext('Archive review request') : gettext('Unarchive review request'));
This is because the underlying case is a boolean, which are easier to compare compared to strings (which at worst compare N bytes of an N byte string instead of 1).
Also, at first glance, there is no
default
case soiconTitle
could end upundefined
. -
- Summary:
-
Made the inbox icon on review request pages a shortcut for archiving/unarchiving the review request.Archive review requests from inbox icon
- Description:
-
~ Made the inbox icon on review request pages a shortcut for archiving/unarchiving the review request.
~ Made the inbox icon on review request pages a shortcut for
+ archiving/unarchiving the review request. ~ The idea behind this change is to make the archiving/unarchiving of requests a little bit faster for advanced users.
~ The idea behind this change is to make the archiving/unarchiving of
+ requests a little bit faster for advanced users. ~ The shortcut was implemented by adding archive/unarchive click handlers to the icon. A title attribute was also added to the icon which dynamically changes to "Archive review request" or "Unarchive review request". This should help with accessibility and general ease of use.
~ The shortcut was implemented by adding archive/unarchive click handlers
+ to the icon. A title attribute was also added to the icon which + dynamically changes to "Archive review request" or "Unarchive review + request". This should help with accessibility and general ease of use. - Testing Done:
-
~ There were no changes made to any Python files so the Python tests were not ran for this change.
~ There were no changes made to any Python files so the Python tests were
+ not ran for this change. The JS tests were ran for these changes.
~ These changes were implemented off the master branch version of ReviewBoard which had 6 failures for the JS tests. ~ These changes were implemented off the master branch version of + ReviewBoard which had 6 failures for the JS tests. ~ The JS tests when ran on this update had the same 6 failures as in the master branch JS tests.
~ The JS tests when ran on this update had the same 6 failures as in the
+ master branch JS tests. - Commit:
-
e7dbc7c5c51f2794e7b2e64877e121d95500637b20684076665693995aa323f41ae5f41388a0d214
Checks run (2 succeeded)
- Change Summary:
-
Added id to the archiving shortcut.
- Commit:
-
20684076665693995aa323f41ae5f41388a0d2149afd7cf3dbd51e0c4db757ae13d35b29eadb781e