Redesign the user infobox.
Review Request #8074 — Created March 24, 2016 and submitted
This change is the first of two major improvements to the user infobox. This
one makes the infobox itself much lighter weight (with a lighter border color
and much lighter drop-shadow), and tweaks the design a bit.This involves several changes:
- Instead of listing the username and real name on separate lines, we now
prefer the real name if it's available, and put the username in parens on
the same line. - The avatar is now even bigger.
- The avatar is flush with the sides of the infobox.
- The user's local time is shown (computed by their preferred timezone).
There's also some code cleanup in here. I've created a new view for infoboxes,
which simplifies the code in common.es6.js. I also discovered while doing this
that the way we were fetching the infobox contents wouldn't send the
If-None-Match header. I've fixed that up, and made the client-side caching
better so if we have data cached client side, we'll show that immediately and
then update it when we get data back from the server.
This also updates the version of moment to the latest stable.
Looked at a bunch of user infoboxes and saw everything looked nice.
Description | From | Last Updated |
---|---|---|
Can we add more padding? Maybe 1em? This is looking very crowded. |
chipx86 | |
'ChangeDescription' imported but unused |
reviewbot | |
This should probably be a constant as we're also using it above in .user_infobox. |
brennie | |
Doc comments throughout. |
brennie | |
/* */ |
brennie | |
Mention in description that we're updating momentjs? |
brennie | |
Blank line between these. |
chipx86 | |
Should we do UTC or configured server time? |
chipx86 | |
Multi-line comments should use: /* * */ |
chipx86 | |
We chain this elsewhere, like: view.render().$el.appendTo(document.body); Minor thing, but saves some chars. |
chipx86 | |
Can we add literal quotes for <a>, so generated docs don't have issues? |
chipx86 | |
Same here. |
chipx86 | |
Blank line between these. |
chipx86 | |
Are we no longer doing one const/var/etc. keyword per grouping? I feel like consistency is good here. |
chipx86 | |
Blank line between these. |
chipx86 | |
Same question as above. |
chipx86 | |
Missing localization. |
chipx86 | |
Space before />. (Technically required for non-XML.) |
chipx86 | |
Missing localization. |
chipx86 | |
Missing localization. |
chipx86 |
- Description:
-
This change is the first of two major improvements to the user infobox. This
one makes the infobox itself much lighter weight (with a lighter border color and much lighter drop-shadow), and tweaks the design a bit. This involves several changes:
- Instead of listing the username and real name on separate lines, we now
prefer the real name if it's available, and put the username in parens on
the same line.
- The avatar is now even bigger.
- The avatar is flush with the sides of the infobox.
- The user's local time is shown (computed by their preferred timezone).
There's also some code cleanup in here. I've created a new view for infoboxes,
which simplifies the code in common.es6.js. I also discovered while doing this that the way we were fetching the infobox contents wouldn't send the If-None-Match header. I've fixed that up, and made the client-side caching better so if we have data cached client side, we'll show that immediately and then update it when we get data back from the server. + + This also updates the version of moment to the latest stable.
- Instead of listing the username and real name on separate lines, we now
- Commit:
-
069341ddb253889dffbc768481691bbcc2ecb0367a0b0da392bcc429be365495e8bad452aafd9ea3
- Diff:
-
Revision 2 (+5087 -111)
-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/static/lib/js/moment-2.0.0.min.js reviewboard/templates/accounts/user_infobox.html reviewboard/static/rb/js/common.es6.js reviewboard/static/rb/css/common.less reviewboard/static/rb/js/ui/views/infoboxView.es6.js reviewboard/static/lib/js/moment-timezone-0.5.2.js reviewboard/static/lib/js/moment-2.12.0.js reviewboard/static/rb/css/defs.less Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/static/lib/js/moment-2.0.0.min.js reviewboard/templates/accounts/user_infobox.html reviewboard/static/rb/js/common.es6.js reviewboard/static/rb/css/common.less reviewboard/static/rb/js/ui/views/infoboxView.es6.js reviewboard/static/lib/js/moment-timezone-0.5.2.js reviewboard/static/lib/js/moment-2.12.0.js reviewboard/static/rb/css/defs.less
- Commit:
-
7a0b0da392bcc429be365495e8bad452aafd9ea3eb9330a005402683c82c03862f5507511f28243e
- Diff:
-
Revision 3 (+5090 -111)
-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/static/lib/js/moment-2.0.0.min.js reviewboard/templates/accounts/user_infobox.html reviewboard/static/rb/js/common.es6.js reviewboard/static/rb/css/common.less reviewboard/static/rb/js/ui/views/infoboxView.es6.js reviewboard/static/lib/js/moment-timezone-0.5.2.js reviewboard/static/lib/js/moment-2.12.0.js reviewboard/static/rb/css/defs.less Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/static/lib/js/moment-2.0.0.min.js reviewboard/templates/accounts/user_infobox.html reviewboard/static/rb/js/common.es6.js reviewboard/static/rb/css/common.less reviewboard/static/rb/js/ui/views/infoboxView.es6.js reviewboard/static/lib/js/moment-timezone-0.5.2.js reviewboard/static/lib/js/moment-2.12.0.js reviewboard/static/rb/css/defs.less
- Commit:
-
eb9330a005402683c82c03862f5507511f28243e64a2672478abbde552cb4fb01b8a01120ba4fa66
- Diff:
-
Revision 4 (+5158 -116)
- Added Files:
-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/static/lib/js/moment-2.0.0.min.js reviewboard/templates/accounts/user_infobox.html reviewboard/static/rb/js/common.es6.js reviewboard/static/rb/css/common.less reviewboard/static/rb/js/ui/views/infoboxView.es6.js reviewboard/static/lib/js/moment-timezone-0.5.2.js reviewboard/static/lib/js/moment-2.12.0.js reviewboard/static/rb/css/defs.less Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/static/lib/js/moment-2.0.0.min.js reviewboard/templates/accounts/user_infobox.html reviewboard/static/rb/js/common.es6.js reviewboard/static/rb/css/common.less reviewboard/static/rb/js/ui/views/infoboxView.es6.js reviewboard/static/lib/js/moment-timezone-0.5.2.js reviewboard/static/lib/js/moment-2.12.0.js reviewboard/static/rb/css/defs.less
- Commit:
-
64a2672478abbde552cb4fb01b8a01120ba4fa66ae01554bad3405bd63c43a2cf73f371b57964355
- Diff:
-
Revision 5 (+5164 -117)
-
Tool: Pyflakes Processed Files: reviewboard/reviews/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/static/lib/js/moment-2.0.0.min.js reviewboard/templates/accounts/user_infobox.html reviewboard/static/rb/js/common.es6.js reviewboard/static/rb/css/common.less reviewboard/static/rb/js/ui/views/infoboxView.es6.js reviewboard/static/lib/js/moment-timezone-0.5.2.js reviewboard/static/lib/js/moment-2.12.0.js reviewboard/static/rb/css/defs.less Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/staticbundles.py Ignored Files: reviewboard/static/lib/js/moment-2.0.0.min.js reviewboard/templates/accounts/user_infobox.html reviewboard/static/rb/js/common.es6.js reviewboard/static/rb/css/common.less reviewboard/static/rb/js/ui/views/infoboxView.es6.js reviewboard/static/lib/js/moment-timezone-0.5.2.js reviewboard/static/lib/js/moment-2.12.0.js reviewboard/static/rb/css/defs.less