From 535a1fd09e4b150e31165e2e79af42c2e5f2bda5 Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Wed, 18 Jul 2018 22:44:16 -0400 Subject: [PATCH] Bug 1472954 - Implement one-click component watching on bug modal and component description pages --- .../global/header-external-links.html.tmpl | 2 +- .../hook/reports/components-start.html.tmpl | 10 + .../en/default/reports/components.html.tmpl | 99 ---- .../bug_modal/activity_stream.html.tmpl | 12 +- .../en/default/bug_modal/edit.html.tmpl | 88 ++-- .../en/default/bug_modal/header.html.tmpl | 1 + extensions/BugModal/web/bug_modal.css | 52 +- extensions/BugModal/web/bug_modal.js | 40 -- extensions/ComponentWatching/Extension.pm | 33 +- .../ComponentWatching/lib/WebService.pm | 113 +++++ .../components-component_footer.html.tmpl | 10 + .../components-product_header.html.tmpl | 10 + .../hook/reports/components-start.html.tmpl | 12 + .../ComponentWatching/web/js/overlay.js | 218 ++++++++ js/dropdown.js | 69 ++- js/global.js | 41 ++ skins/standard/describecomponents.css | 97 ++++ skins/standard/global.css | 465 ++++++++++-------- skins/standard/reports.css | 97 ---- template/en/default/global/header.html.tmpl | 6 +- .../en/default/reports/components.html.tmpl | 111 ++--- template/en/default/reports/menu.html.tmpl | 5 +- 22 files changed, 994 insertions(+), 597 deletions(-) create mode 100644 extensions/BMO/template/en/default/hook/reports/components-start.html.tmpl delete mode 100644 extensions/BMO/template/en/default/reports/components.html.tmpl create mode 100644 extensions/ComponentWatching/lib/WebService.pm create mode 100644 extensions/ComponentWatching/template/en/default/hook/reports/components-component_footer.html.tmpl create mode 100644 extensions/ComponentWatching/template/en/default/hook/reports/components-product_header.html.tmpl create mode 100644 extensions/ComponentWatching/template/en/default/hook/reports/components-start.html.tmpl create mode 100644 extensions/ComponentWatching/web/js/overlay.js create mode 100644 skins/standard/describecomponents.css delete mode 100644 skins/standard/reports.css diff --git a/extensions/BMO/template/en/default/hook/global/header-external-links.html.tmpl b/extensions/BMO/template/en/default/hook/global/header-external-links.html.tmpl index 54a2f0e49..f79548e3d 100644 --- a/extensions/BMO/template/en/default/hook/global/header-external-links.html.tmpl +++ b/extensions/BMO/template/en/default/hook/global/header-external-links.html.tmpl @@ -15,7 +15,7 @@
  • Mozilla Home
  • - +
  • Privacy
  • diff --git a/extensions/BMO/template/en/default/hook/reports/components-start.html.tmpl b/extensions/BMO/template/en/default/hook/reports/components-start.html.tmpl new file mode 100644 index 000000000..a4234caa2 --- /dev/null +++ b/extensions/BMO/template/en/default/hook/reports/components-start.html.tmpl @@ -0,0 +1,10 @@ +[%# This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + # + # This Source Code Form is "Incompatible With Secondary Licenses", as + # defined by the Mozilla Public License, v. 2.0. + #%] + +[%# Don't show the default assignees and QA contacts %] +[% show_default_people = 0 %] diff --git a/extensions/BMO/template/en/default/reports/components.html.tmpl b/extensions/BMO/template/en/default/reports/components.html.tmpl deleted file mode 100644 index 3e23d389e..000000000 --- a/extensions/BMO/template/en/default/reports/components.html.tmpl +++ /dev/null @@ -1,99 +0,0 @@ -[%# The contents of this file are subject to the Mozilla Public - # License Version 1.1 (the "License"); you may not use this file - # except in compliance with the License. You may obtain a copy of - # the License at http://www.mozilla.org/MPL/ - # - # Software distributed under the License is distributed on an "AS - # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or - # implied. See the License for the specific language governing - # rights and limitations under the License. - # - # The Original Code is the Bugzilla Bug Tracking System. - # - # The Initial Developer of the Original Code is Netscape Communications - # Corporation. Portions created by Netscape are - # Copyright (C) 1998 Netscape Communications Corporation. All - # Rights Reserved. - # - # Contributor(s): Bradley Baetz - # Max Kanat-Alexander - #%] - -[%# INTERFACE: - # product: object. The product for which we want to display component - # descriptions. - # component: string. The name of the component to hilight in the browser - #%] - -[% title = BLOCK %] - Components for [% product.name FILTER html %] -[% END %] - -[% inline_style = BLOCK %] -.product_name { - font-size: 2em; - font-weight: normal; -} -.component_name { - font-size: 1.5em; - font-weight: normal; -} -.product_desc, .component_desc { - padding-left: 1em; - font-size: 1em; -} -.component_container { - padding-left: 1em; - margin-bottom: 1em; -} -.product_container, .instructions { - margin-bottom: 1em; -} -.component_highlight { - padding: 0 0 0 1em; -} -[% END %] - -[% PROCESS global/header.html.tmpl - style_urls = [ "skins/standard/reports.css" ] - title = title - style = inline_style -%] - -

    [% mark FILTER html %]

    - -
    - [% product.name FILTER html %] -
    - [% product.description FILTER html_light %] -
    -
    - -
    - Select a component to see open [% terms.bugs %] in that component: -
    - -[% FOREACH comp = product.components %] - [% INCLUDE describe_comp %] -[% END %] - -[% PROCESS global/footer.html.tmpl %] - -[%############################################################################%] -[%# BLOCK for components %] -[%############################################################################%] - -[% BLOCK describe_comp %] -
    - -
    - [% comp.description FILTER html_light %] -
    -
    -[% END %] diff --git a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl index af2077e00..36494773b 100644 --- a/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl +++ b/extensions/BugModal/template/en/default/bug_modal/activity_stream.html.tmpl @@ -15,8 +15,8 @@