Add a note about MozReview to the Create Attachment page

RESOLVED FIXED

Status

()

bugzilla.mozilla.org
User Interface
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: mcote, Assigned: mcote)

Tracking

Production

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

3 years ago
To get more people trying out MozReview, we should add a little note to the top of the Create New Attachment page saying something like

Are you attaching a patch?  Consider trying out <a href="https://reviewboard.mozilla.org/">MozReview</a>, Mozilla's new repository-based code-review tool.  <a href="http://mozilla-version-control-tools.readthedocs.org/en/latest/mozreview.html">Read the docs</a> to get started.

For now, this should only be shown if the bug's product is Core, Firefox, or Firefox for Android.
(Assignee)

Comment 1

3 years ago
Created attachment 8573708 [details] [diff] [review]
Advertise MozReview

I don't like the inline CSS, but it looks like allowing extra CSS files, like in show_bug, would require a lot of refactoring.
Assignee: nobody → mcote
Status: NEW → ASSIGNED
Attachment #8573708 - Flags: review?(glob)
(Assignee)

Comment 2

3 years ago
Comment on attachment 8573708 [details] [diff] [review]
Advertise MozReview

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

::: template/en/default/attachment/create.html.tmpl
@@ +45,4 @@
>  -->
>  </script>
>  
> +[%# BMO hook for display MozReview message %]

This should, of course, be "displaying"; I've already fixed it locally.
Comment on attachment 8573708 [details] [diff] [review]
Advertise MozReview

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

::: extensions/MozReview/Extension.pm
@@ +36,5 @@
> +            }
> +        } else {
> +            my @rrids;
> +            my $attachments =
> +                Bugzilla::Attachment->get_attachments_by_bug($bug);

nit: no need to wrap this line

::: extensions/MozReview/template/en/default/hook/attachment/create-before_form.html.tmpl
@@ +6,5 @@
> +  # defined by the Mozilla Public License, v. 2.0.
> +  #%]
> +
> +[% USE Bugzilla %]
> +[% cgi = Bugzilla.cgi %]

you aren't using cgi here

@@ +10,5 @@
> +[% cgi = Bugzilla.cgi %]
> +
> +[% RETURN UNLESS mozreview_enabled %]
> +
> +<div style="background-color:#fff9db;color:#666458;padding:5px;margin-bottom:10px">

i don't like inline css either.

hook the global header and add your stylesheet there.
look at Needinfo/template/en/default/hook/global/header-start.html.tmpl for an example
Attachment #8573708 - Flags: review?(glob) → review-
(Assignee)

Comment 4

3 years ago
Created attachment 8573728 [details] [diff] [review]
Advertise MozReview, v2

Not sure if I should split the CSS file into two now, since the last rule is only used by the attachments page (which doesn't use any other rules).  I left it in for simplicity but lemme know if you think that I should split it out.
Attachment #8573708 - Attachment is obsolete: true
Attachment #8573728 - Flags: review?(glob)
(Assignee)

Comment 5

3 years ago
Created attachment 8574070 [details] [diff] [review]
Advertise MozReview, v3

Meh I decided to go ahead and split the CSS into two files.  Might as well save a few bytes of traffic.
Attachment #8573728 - Attachment is obsolete: true
Attachment #8573728 - Flags: review?(glob)
Attachment #8574070 - Flags: review?(glob)

Comment 6

3 years ago
Comment on attachment 8574070 [details] [diff] [review]
Advertise MozReview, v3

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

I support the proposed messaging.
Attachment #8574070 - Flags: feedback+
Comment on attachment 8574070 [details] [diff] [review]
Advertise MozReview, v3

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

r=glob

::: extensions/MozReview/template/en/default/hook/attachment/create-before_form.html.tmpl
@@ +5,5 @@
> +  # This Source Code Form is "Incompatible With Secondary Licenses", as
> +  # defined by the Mozilla Public License, v. 2.0.
> +  #%]
> +
> +[% USE Bugzilla %]

you don't need to use bugzilla either; remove on commit.
Attachment #8574070 - Flags: review?(glob) → review+
(Assignee)

Comment 8

3 years ago
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   b199f49..c25b318  master -> master
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.