Add Overview section in the Dashboard
Review Request #10166 — Created Sept. 22, 2018 and submitted
Users have to switch between sections to view a open review requests that
they have sent out or reviews requests that are targeting them indirectly.The dashboard now contains a new section that contains all open review
requests that the user is either a submitter of or a reviewer (either
directly or indirectly).
Testing was done by checking the Overview section in the browser to see
if the expected review requests were displayed.
Python Unit tests were run to ensure the query returns the expected review
requests.
Description | From | Last Updated |
---|---|---|
Usually commit messages are descriptive (e.g. what the patch does) instead of declarative (what I -- or you -- did … |
brennie | |
Can you update your summary with the new section name? |
brennie | |
The right caret will have to align with the "Overview" text. You'll also want to bump its font size up … |
brennie | |
E501 line too long (81 > 79 characters) |
reviewbot | |
E302 expected 2 blank lines, found 1 |
reviewbot | |
E501 line too long (100 > 79 characters) |
reviewbot | |
E127 continuation line over-indented for visual indent |
reviewbot | |
Some general things to note about evolutions, in case you need to do them in the future (or now, if … |
chipx86 | |
This is wrapped way too early. You have more room on the line for content. |
chipx86 | |
This will need to follow the modern documentation format, with a Yield section. Someone at the sprint can point you … |
chipx86 | |
We'd update this to "overview". |
chipx86 | |
Two blank lines between top-level classes/functions/groups of variables. |
chipx86 | |
These should be in alphabetical order. |
chipx86 | |
For now, let's not set this as the default view. Users can find these sorts of changes to be very … |
chipx86 | |
This needs to use our modern docstring format. |
chipx86 | |
This will need a docstring. (Many of the others are missing this, but they predate the current standards. Don't worry … |
chipx86 | |
W293 blank line contains whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W293 blank line contains whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
W291 trailing whitespace |
reviewbot | |
This will require at least one unit test to ensure the query returns the correct review requests. |
brennie | |
E501 line too long (87 > 79 characters) |
reviewbot | |
E501 line too long (99 > 79 characters) |
reviewbot | |
E501 line too long (99 > 79 characters) |
reviewbot | |
E501 line too long (81 > 79 characters) |
reviewbot | |
E501 line too long (81 > 79 characters) |
reviewbot | |
We avoid inline styles as much as possible. Instead, can you put a class on this (maybe overview-section-row) and add … |
brennie | |
The other docstrings quote the section name, e.g. The "Overview" section ... |
brennie | |
Since you're updating this, can you update this to our documentation style? Also, technically, for reStructuredText, this list is mis-formatted … |
brennie | |
The summary should be on the first line and should fit on a single line. |
brennie | |
This should be in the imperitive mood, as if it were a command (i.e., "Return" instead of "Returns"). |
brennie | |
This should be formatted as :py:meth:`ReviewRequest.objects.public <reviewboard.reviews.managers.ReviewRequestManager.public>` which will format it as a method invocation and link to the correct … |
brennie | |
This is actually a Q (django.db.models.Q) object. |
brennie | |
How about: A query for all review requests the users is inolved in as either a submitter or a reviewer … |
brennie | |
i.e does not end a sentence. It is a joining clause . |
brennie | |
The summary should be on the first line and should fit on a single line. |
brennie | |
QuerySet |
brennie | |
Missing a period. |
brennie | |
The actual class name is dict |
brennie | |
Missing a period. |
brennie | |
Same comment re: wording as above. |
brennie | |
Return documentation is formatted as: Returns: django.http.HttpResponse: The rendered HTTP response for the datagrid. What datagrid is rendered depends on … |
brennie | |
this should go above args in the documentation noting that the view GET parameter is used, e.g. ```python """Display the … |
brennie | |
E501 line too long (80 > 79 characters) |
reviewbot | |
Typo here: 'mine'to -> 'mine' |
david | |
Although we often use six.text_type in the code, docs should use unicode in order to link to the right thing. |
david | |
Typo: objectts |
david |
- Change Summary:
-
Resolved issues raised by Review Bot
- Commit:
-
4f072be7f9161340e72630b831edc5ff65555305f5ce83ad836bd36b93c3a8dc7e1c8bcb4638644c
- Diff:
-
Revision 2 (+82 -2)
- Change Summary:
-
Resolved E127
- Commit:
-
f5ce83ad836bd36b93c3a8dc7e1c8bcb4638644c08b255c72cdf33e0dc866136322bf2bf6d9f4235
- Diff:
-
Revision 3 (+82 -2)
Checks run (2 succeeded)
-
You're delving into a lot of complex stuff, which is great! And you've done a great job with the change. As I've been reviewing it, though, I've been mulling over what it is we may really want to do with this sort of view, and have some thoughts.
Take this as a proposal. I'm sure there will be differing thoughts on it.
There's two things that stood out:
- The new counter is maybe not necessary, and if we can avoid it, that'd be awesome. Database changes are expensive and invasive. One seemingly simple database change can turn into hours or days of upgrade time for some customers. This one's easier to handle, but if it were on, say,
ReviewRequest
, we'd definitely be looking at weekend downtime. So we try not to add them unless necessary. And we only need this if we use the current design. Which is where my second thought comes in. - The name "My Reviews" is not quite right for what this is. First, these are review requests, not reviews. Second, they're not all "mine." I know the original project name is "My Reviews," but we can do better, and be less confusing to users. Along with this, the "All" item underneath it is inconsistently named, as "All" in "Outgoing" means "Even ones that are closed." There's only a single item in here, though, which is maybe not necessary.
I think we can address both of these by making two changes:
- Renaming "My Reviews" to "Overview".
- Getting rid of the "All" item, and instead folding that into "Overview".
I don't think we even need a counter for this. It can just be "Overview." Let the finger-grained sections below supply the counters. They're more useful that way, and it frees us up to do things with this section later (I have some pie-in-the-sky ideas for showing more useful information than just a list of review requests down the road, which would make a counter less relevant anyway -- backburner idea for something I call "Radar," but that's a longer discussion.)
This would look something like:
This would massively simplify the change, though you would need to allow sections to be selectable/made active, so there's some new work there. The counter work could be tossed, reducing the amount of unit tests and query consolidation I was going to have you write (counters are complex), and we'd have something that we could land pretty quickly.
With that in mind, I'm going to drop a bunch of comments I had for the counters. If it turns out that you're going to end up having to add them anyway, I'll have a bunch of comments in a separate review.
- The new counter is maybe not necessary, and if we can avoid it, that'd be awesome. Database changes are expensive and invasive. One seemingly simple database change can turn into hours or days of upgrade time for some customers. This one's easier to handle, but if it were on, say,
-
Some general things to note about evolutions, in case you need to do them in the future (or now, if we have to keep this counter):
- The name of the evolution should describe the model schema changes, not the reason you're making the model changes. When adding fields, this is gneerally going to include the model name and field name. For instance,
localsiteprofile_total_request_count
. - This needs to use underscores, not hyphens.
- Last item in a list should always have a trailing comma, so this line doesn't have to be modified next time we add an entry.
- The name of the evolution should describe the model schema changes, not the reason you're making the model changes. When adding fields, this is gneerally going to include the model name and field name. For instance,
-
-
This will need to follow the modern documentation format, with a
Yield
section. Someone at the sprint can point you to the docs for this. -
-
-
-
For now, let's not set this as the default view. Users can find these sorts of changes to be very disruptive, which means us fielding a lot of support requests :) For now, let's keep the existing default view, and make the new Overview an optional thing users can go to. They can always bookmark it if they want.
-
-
This will need a docstring. (Many of the others are missing this, but they predate the current standards. Don't worry about those, but provide one here.)
I'd also like this to be called
to_or_from_user
.
- Change Summary:
-
Resolved a few issues
- Commit:
-
08b255c72cdf33e0dc866136322bf2bf6d9f4235cd63b5f372b6c1664468db8c7b7b517dd1672314
- Change Summary:
-
Resolved W293
- Commit:
-
cd63b5f372b6c1664468db8c7b7b517dd1672314eb76ccd6260ca673733e360eddb8ac5f498f0874
Checks run (2 succeeded)
- Change Summary:
-
Improved documentation using the modern documentation format
- Commit:
-
eb76ccd6260ca673733e360eddb8ac5f498f0874011413e77331f5d1b3e8e8bfbc414ae28c3e8eff
- Change Summary:
-
Resolved all whitespace related issues
- Commit:
-
011413e77331f5d1b3e8e8bfbc414ae28c3e8eff4f5e0f3ae69b41a25736b22fb8e112192b58e67b
Checks run (2 succeeded)
- Change Summary:
-
Added right arrow to overview so users know to click
- Commit:
-
4f5e0f3ae69b41a25736b22fb8e112192b58e67b26f53f850320d1822790df6d818cb6b1d8720cbf
- Diff:
-
Revision 8 (+76)
- Added Files:
Checks run (2 succeeded)
-
-
Usually commit messages are descriptive (e.g. what the patch does) instead of declarative (what I -- or you -- did to write the patch).
e.g., for your second paragraph:
The dashboard now contains a new section that contains all review requests that the user is either a submitter of or a reviewer (either directly or indirectly).
-
-
-
-
The right caret will have to align with the "Overview" text. You'll also want to bump its font size up (try 200%?)
You might want to try the following:
- Wrap the
Overview
and caret in a<span>
/<div>
and style it withline-height: normal
- Wrap and style it with
vertical-align: middle
.
If neither of these work, we can help you figure out the appropriate styles.
- Wrap the
- Summary:
-
Add new 'My Reviews' section in the DashboardAdd Overview section in the Dashboard
- Description:
-
~ Users have to switch between views to view a summary on review requests
~ that they have sent out or reviews requests that are targeting them ~ Users have to switch between sections to view a open review requests that
~ they have sent out or reviews requests that are targeting them indirectly. - indirectly. ~ I added a new section to the dashboard with a link that allows users to
~ view review requests that they sent out and review requests that ~ indirectly target them. ~ The dashboard now contains a new section that contains all open review
~ requests that the user is either a submitter of or a reviewer (either ~ directly or indirectly). - Testing Done:
-
~ Testing was done by checking the new 'My Review' section in the browser.
~ Testing was done by checking the Overview section in the browser to see
+ if the expected review requests were displayed. + Python Unit tests were run to ensure the query returns the expected review + requests. - Commit:
-
26f53f850320d1822790df6d818cb6b1d8720cbf3b6ccd4050c08a88d0834b1de09cead3431086fe
- Diff:
-
Revision 9 (+173)
- Added Files:
- Change Summary:
-
Resolved E501
- Commit:
-
3b6ccd4050c08a88d0834b1de09cead3431086fe3fe5ce88f06b8f70b1af5eb478b3a7ca6ef04331
- Commit:
-
3fe5ce88f06b8f70b1af5eb478b3a7ca6ef04331e4d6e62becf6d5d23df5221e5c1d9183c2754268
Checks run (2 succeeded)
- Change Summary:
-
Moved style from inline to class
- Commit:
-
e4d6e62becf6d5d23df5221e5c1d9183c27542680dec73caf108d1585bbbe399590bcbbfa0e5f75a
- Diff:
-
Revision 12 (+183)
Checks run (2 succeeded)
-
You'll notice these comments are pretty nitty-gritty, which means this is getting very close to a ship it and we're just working on polish!
-
-
Since you're updating this, can you update this to our documentation style?
Also, technically, for reStructuredText, this list is mis-formatted (not your fault); instead the
*
should be in the same column as theV
inValid ...
. -
-
This should be in the imperitive mood, as if it were a command (i.e., "Return" instead of "Returns").
-
This should be formatted as
:py:meth:`ReviewRequest.objects.public <reviewboard.reviews.managers.ReviewRequestManager.public>`
which will format it as a method invocation and link to the correct place in the docs.
-
-
How about:
A query for all review requests the users is inolved in as either a submitter or a reviewer (either directly assigned or indirectly as a member of a group).
-
-
-
-
-
-
-
- Change Summary:
-
Resolved a few of the mentioned issues
- Commit:
-
0dec73caf108d1585bbbe399590bcbbfa0e5f75ae4b373373de6f6f59449cd4704860f0c80bf520f
- Diff:
-
Revision 13 (+182 -6)
Checks run (2 succeeded)
- Commit:
-
e4b373373de6f6f59449cd4704860f0c80bf520fe6e5252fb3cee1644ede2561cdd523686febb276
- Diff:
-
Revision 14 (+181 -6)
Checks run (2 succeeded)
- Commit:
-
e6e5252fb3cee1644ede2561cdd523686febb276234290c20a36e33e54381e89ae780c00141cec86
- Diff:
-
Revision 15 (+195 -8)
Checks run (2 succeeded)
-
-
Return documentation is formatted as:
Returns: django.http.HttpResponse: The rendered HTTP response for the datagrid. What datagrid is rendered depends on the ``view`` parameter.
-
this should go above args in the documentation noting that the
view
GET parameter is used, e.g.```python
"""Display the dashboard.This shows review requests organized by a variety of lists, depending on the
view
GET
parameter. Valid values ofview
are:outgoing
to-me
- ...
Args:
....Returns:
...
"""
- Commit:
-
234290c20a36e33e54381e89ae780c00141cec86691cb1c153be23a1a6cdffd99051a5a41b9ae3f8
- Diff:
-
Revision 16 (+198 -9)
- Commit:
-
691cb1c153be23a1a6cdffd99051a5a41b9ae3f820f54deb4f867430627c0597440fe5b530aa4cbd
- Diff:
-
Revision 17 (+197 -8)
Checks run (2 succeeded)
- Change Summary:
-
Addressed issues
- Commit:
-
20f54deb4f867430627c0597440fe5b530aa4cbdc79bda0314d05405e4807119b3563b3f98c6bf45
Checks run (2 succeeded)
- Commit:
-
c79bda0314d05405e4807119b3563b3f98c6bf45b94e084bd7591fef8f47178890d560e39ddca235
Checks run (2 succeeded)
- Commit:
-
b94e084bd7591fef8f47178890d560e39ddca235c7fc4419efb4786327af948b6b346f117bdc01f2
- Diff:
-
Revision 20 (+197 -8)