After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 743027 - [4.4] "Hardware" field is shown; should be hidden via CSS
[4.4] "Hardware" field is shown; should be hidden via CSS
Status: RESOLVED FIXED
Product: bugzilla.gnome.org
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: André Klapper
Bugzilla Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-01-16 11:46 UTC by Sébastien Wilmet
Modified: 2015-02-24 20:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sébastien Wilmet 2015-01-16 11:46:45 UTC
In the new bugzilla we can now choose the hardware: DEC, HP, PC, etc.

Was it added on purpose?
Comment 1 André Klapper 2015-01-16 12:28:52 UTC
Also see https://bugzilla.gnome.org/show_bug.cgi?id=742490

It was not added on purpose, but "normally" (in upstream) it is always there an cannot be disabled (grumble, https://bugzilla.mozilla.org/show_bug.cgi?id=763409 ).

I'm wondering whether we had a hack in place to not show the field in 3.4. 
If so, I'd support trying to port that hack for the sake of having less than 5 billions UI fields shown which nobody needs.


And same for that new "URL" field that we do not need (cannot find an option to disable that). And same for that new "Tags" field that we do not need (see https://bugzilla.mozilla.org/show_bug.cgi?id=1116994 ). Feature bloat.
Comment 2 Olav Vitters 2015-01-16 12:33:03 UTC
This was removed from view from show_bug.cgi and the search. My intended solution was to teach the template bit to show text when the drop down only has one option. Then only have one option for Hardware and done :-P

URL was removed as well.

Maybe we should just use CSS to hide this?
Comment 3 André Klapper 2015-01-16 14:13:37 UTC
(In reply to comment #2)
> Maybe we should just use CSS to hide this?

YES PLEASE! I quickly tried a week ago (for "Tags" though) but failed to find a good ID; I can probably try again if I find time but would not mind if someone else is faster.
Comment 4 André Klapper 2015-01-18 00:35:20 UTC
Summarizing what needs to be done here (whoever wants to write the patch):
* "display:none" for the id "container_rep_platform" on Advanced Search page.
* "display:none" for the id "rep_platform" on show_bug.cgi
* in template/en/*/global/field-descs.none.tmpl, 
  change "rep_platform" from "Hardware" to "OS"
Comment 5 André Klapper 2015-01-18 00:38:19 UTC
Offtopic, but as we are talking about CSS tweaks:
* Would also love to somehow hide the entire <tr> (without any id) that
  includes the <th> with the id "field_label_tag" on show_bug.cgi
* Would also love to somehow hide the entire <tr> (without any id) that
  includes the <th> with the id "field_label_bug_file_loc" on show_bug.cgi
Comment 6 Olav Vitters 2015-01-19 12:09:02 UTC
I removed all the Hardware options that didn't have any bugs assigned to them. We're left with: All, PC, Other.
Comment 7 André Klapper 2015-01-24 18:20:28 UTC
@Olav: Thanks.
Seeing that we have several things to change in show_bug.cgi (bug 743056, don't show "Tags" field either) I really propose to copy /bugzilla-gnome-org-upstream/template/en/default/bug/edit.html.tmpl to /bugzilla-gnome-org-customizations/extensions/TemplateOverrides/template/en/default/bug/edit.html.tmpl

It's going to be painful but I'm willing to maintain this.

I'd do it but I have no idea how to use "digests" in https://git.gnome.org/browse/bugzilla-gnome-org-customizations/tree/extensions/TemplateOverrides/lib/Digests.pm#n18 properly (and have not checked if there is documentation).
Comment 8 André Klapper 2015-02-07 12:43:13 UTC
> I'd do it but I have no idea how to use "digests"

Maybe Krzesimir knows? I still have no idea what to put in there... :-/
Comment 9 Krzesimir Nowak 2015-02-07 15:30:24 UTC
Me? Why me? What digests? I have completely no idea what digests are for. :P

Jokes aside, you just put sha256 sum of original file (the one in bugzilla-gnome-org-upstream repository from production branch, here /bugzilla-gnome-org-upstream/template/en/default/bug/edit.html.tmpl, the path part would be bug/edit.html.tmpl)

I still have to write some docs for it, sorry.
Comment 10 André Klapper 2015-02-22 16:40:29 UTC
On query.cgi we could already hide the Hardware field via custom CSS:
 #container_rep_platform {
   display: none;
 }

On show_bug.cgi I am waiting for adding IDs to get reviewed upstream:
  https://bugzilla.mozilla.org/show_bug.cgi?id=1133245
After that we can also hide via custom CSS.
Comment 11 André Klapper 2015-02-24 20:41:40 UTC
Hopefully fixed by https://git.gnome.org/browse/bugzilla-gnome-org-customizations/commit/?h=production&id=eb3b43bf4253823d81eddf942f3348d10a14bdf6

Only CSS changes as we do not need to hide a full table row in this case (second dropdown for OS in the same line still used and displayed).
"Hardware" name is ugly though...
Comment 12 Olav Vitters 2015-02-24 20:57:51 UTC
> [%- field_descs.${field.name} FILTER html %]:</a>

I think you can rename Hardware to OS by using field_descs.

See for an example on how to override:
extensions/Voting/template/en/default/hook/global/field-descs-end.none.tmpl