Closed Bug 920026 Opened 7 years ago Closed 7 years ago

show reminder of pending review, feedback, and needinfo requests in the header

Categories

(bugzilla.mozilla.org :: Extensions, defect)

Production
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: glob, Assigned: glob)

References

Details

Attachments

(2 files)

Attached image ui mockup β€”
show reminder of pending review, feedback, and needinfo requests in the header.

to avoid performing extra queries on each page load, we'll have to add three columns to the profiles table, and update them when flags are set/updated/cleared.
Duplicate of this bug: 820472
Attached patch 920026_1.patch β€” β€” Splinter Review
Attachment #819551 - Flags: review?(dkl)
Comment on attachment 819551 [details] [diff] [review]
920026_1.patch

Review of attachment 819551 [details] [diff] [review]:
-----------------------------------------------------------------

Very nice as always. Works well in testing and code looks sane except for minor cosmetics. r=dkl

::: extensions/Review/lib/Util.pm
@@ +25,5 @@
> +               COUNT(*) as count
> +          FROM flags
> +               INNER JOIN profiles ON profiles.userid = flags.requestee_id
> +               INNER JOIN flagtypes ON flagtypes.id = flags.type_id
> +         WHERE status = '?'

nit: s/flags/flags.status/

::: extensions/Review/template/en/default/hook/global/header-message.html.tmpl
@@ +12,5 @@
> +    || user.needinfo_request_count
> +%]
> +
> +<span id="badge" title="Flags requested of you:
> +  [%- " review(" _ user.review_request_count _ ")" IF user.review_request_count -%]

nit: space between review and (. Same with the others.

::: extensions/Review/web/styles/badge.css
@@ +10,5 @@
> +    font-size: small;
> +    font-weight: bold;
> +    padding: 0px 5px;
> +    border-radius: 10px;
> +    margin: 0 2px;

Nit: Increase to maybe 5px so it looks better for non-Mozilla skins. Otherwise it is almost touching the title for me. YMMV.
Attachment #819551 - Flags: review?(dkl) → review+
thanks dkl :)

Committing to: bzr+ssh://bjones%40mozilla.com@bzr.mozilla.org/bmo/4.2/
modified Bugzilla/Flag.pm
modified extensions/Review/Extension.pm
added extensions/Review/bin
added extensions/Review/bin/review_requests_rebuild.pl
added extensions/Review/lib/Util.pm
added extensions/Review/template/en/default/hook/global/header-message.html.tmpl
modified extensions/Review/template/en/default/hook/global/header-start.html.tmpl
added extensions/Review/template/en/default/hook/global/user-error-auth_failure_object.html.tmpl
added extensions/Review/template/en/default/pages/review_requests_rebuild.html.tmpl
added extensions/Review/web/styles/badge.css
modified template/en/default/global/header.html.tmpl
Committed revision 9115.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Component: Extensions: Review → Extensions
You need to log in before you can comment on or make changes to this bug.