Closed Bug 37339 Opened 24 years ago Closed 23 years ago

Bugzilla sidebar, containing info in footer

Categories

(Bugzilla :: Bugzilla-General, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Bugzilla 2.16

People

(Reporter: jgmyers, Assigned: jacob)

References

()

Details

Attachments

(1 file, 13 obsolete files)

22.45 KB, patch
ddkilzer
: review+
kiko
: review+
Details | Diff | Splinter Review
There should be a bugzilla sidebar, which would contain the information that is
in the bugzilla footer.
ugh. sidebar. this sounds like a feature for mozilla browsers only.
ccing scc@mozilla.org - he has made a BugZilla sidebar at
http://www.scottcollins.net/Journal/#links - it already contains part of the
footer content, is it possible to add the additional points like "my bugs" and
saved queries?
I wan't some of these things too.  Dawn Endico and I are trying to figure out
how exactly we might do this.  Perhaps a combination of a bugzilla cgi and the
appropriate data source in the sidebar to connect to it.  I'm most interested in
building the pop-up of the currently logged in user's saved queries.
cool, I think that's the main reason why this bug had been filed (saved 
queries)!
you rock!
since I've been working on this ... I guess I should probably own the bug
Assignee: tara → scc
Status: NEW → ASSIGNED
I like this idea... in fact, I was thinking about attempting the code for it
myslef, but decided it would be better to check the old DB here first...

How's the progress on this coming?  Is any of it's code in the tree?  Or is it
all still residing at scottcollins.net?
What do people think of the bugzilla sidebar at http://dino.mozdev.org/
patches/patches.html?
I'd have to say of the three bugzilla sidebars I've seen, I like the one at
http://www.scottcollins.net/Journal/#links the best.  If it could be tied more
closely to the actual bugzilla install (in order to provide links like "My
Bugs", "My Votes" and saved queries it would be that much better.  It would also
then be able to become part of the bugzilla distribution instead of something
customized for Mozilla.org (which is really the only way to remotely host the
sidebar).
*** Bug 68813 has been marked as a duplicate of this bug. ***
Triaging bugs in Bugzilla so moving this to future ... scc if you have a better
milestone feel free ... or is this something that wouldn't be distributed with
Bugzilla and should be elsewhere?
Target Milestone: --- → Future
Well, I don't have a pop-up yet, but, I have just added the feature that the
nsEngineer and bugzilla sidebars can now run your named saved queries.  A query
starting with an |=| is interpreted as a saved query name.  The initial |=| is
chopped off, the whole string is escaped (so spaces are ok), and then your
selected bug database is asked to resolve the query by name.  This will only
work if you are `logged into' the database in question. See

  http://ScottCollins.net/panels/bugzilla-home.shtml
  http://ScottCollins.net/panels/ns-engineer-home.shtml

as appropriate.

In answer to previous comments, no I don't think it's appropriate that this
sidebar would be shipped with bugzilla.

...a pop-up _would_ be nice though.  Leaving this bug open till I figure out
how, or else that it's not reasonable.
I've spent a little bit of time on a CGI script that'll retrieve information
from the database and display the footer links for saved queries.  It also
displays different links if you are logged in or not.  I also managed to get it
working using Quick Search (requires some changes to quicksearch.js, will attach
that diff, too).
Attached file sidebar.cgi (obsolete) —
I like the BugZilla sidebar quite much but I've recognized that I can't call the
"my bugs" query. Is there a possibility to add this one?
Robert, the difficulity with putting "My bugs" on the sidebar in its current
state is that "My bugs" is really just a specially formatted query that
automatically puts your e-mail address in the field for e-mail adresess (to see
this, click on "My bugs" in the footer and then "Edit this query" on the buglist
page).  The server that this sidebar is hosted on has no way to know what you're
logged into bugzilla as, and thus has no way to substitute your e-mail address
in the correct place.

The CGI script that I attached here does have that ability, but it needs to be
reviewed before it can be added to CVS.
To get the equivalent of `My Bugs' with the nsEngineer sidebar, enter an email
address in the bug query field, or, if the first part is unique, just up to and
including the |@|, e.g., scc@.
http://landfill.tequilarista.org/jake/bugzilla/show_bug.cgi?id=1

I'm currently soliciating opinions on my CGI version of SCC's sidebar.  The URL
above will give you the ability it to your sidebar (assuming, of course, you
have a sidebar to add it to ;).  The database it's running right now doesn't
have much data, but you can still produce queries and stuff (checking the box to
put them in your footer) to see how it looks.

The version of sidebar.cgi running at landill right now is slightly modified
from the version attached to this bug.  I have been running w/this version for a
while now on my local install, and I really like it.  I think it'd be nice to
get in for 2.16 (even if it is currently Mozilla only).
Priority: P3 → P4
Target Milestone: Future → Bugzilla 2.16
Attached patch updated patch to quicksearch (obsolete) — Splinter Review
http://landfill.tequilarista.org/bz37339/show_bug.cgi?id=31

The test install for this bug is now listed at the above URL.
Attached file Current sidebar.cgi (obsolete) —
Depends on: 76484
The test install is still at the same URL, but the local bug number for that
install is now 262.

http://landfill.tequilarista.org/bz37339/
http://landfill.tequilarista.org/bz37339/show_bug.cgi?id=262
Keywords: patch, review
Component: Bugzilla → Bugzilla-General
OS: Windows NT → All
Product: Webtools → Bugzilla
Version: other → unspecified
Comment on attachment 40917 [details] [diff] [review]
updated patch to quicksearch

This is somewhat broken. On the landfill test installation, quicksearch doesn't work for me. I just get the "not a valid bug number" error. Other than that, this and sidebar.cgi look great, at least for a start. I'm inclined to check this in once this issue is fixed and let people give it a try. We should probably do some UI work on the sidebar though, it looks a little empty. Time to sharpen my xul tools.
Attachment #40917 - Flags: review-
I personally don't have any XUL skills :)  What you see outputted by sidebar.cgi
is a generated version of Scott's sidebar.
*** Bug 102687 has been marked as a duplicate of this bug. ***
Attached patch quicksearch patch v3 (obsolete) — Splinter Review
Attached file sidebar.cgi - v3 (obsolete) —
Attachment #38142 - Attachment is obsolete: true
Attachment #38143 - Attachment is obsolete: true
-> me
Assignee: scc → jake
Status: ASSIGNED → NEW
Attachment #40917 - Attachment is obsolete: true
Attachment #40922 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attached file panel.css (obsolete) —
Attachment #54295 - Attachment is obsolete: true
Attachment #54294 - Attachment is obsolete: true
Attachment #54164 - Attachment is obsolete: true
The all-in-one patch I just uploaded contains all the files need for both this
bug and bug 80183.  It also changes sidebar.cgi to use a template. 
Unfortunately, I just noticed that I didn't fully remove the output_xul()
routine, so another patch will be coming up in a minute.

The install at landfill has been updated to use this new patch.
Attachment #55108 - Attachment is obsolete: true
Attachment #55110 - Attachment is obsolete: true
Pretend like:
+###### Script nutered
+exit;

Isn't in the patch I just uploaded :)

Attachment 55231 [details] [diff] contains a little code in checksetup.pl to attempt to detect
old versions of index.html that were not removed by CVS because they were
modified and notify the person running checksetup.pl.
Blocks: 80183
Attachment #55231 - Attachment is obsolete: true
blocks a P1, therefore it's a P1
Priority: P4 → P1
I don't think quicksearch should be added to the bugzilla footer until it's 
server-side.  Quicksearch forms currently make pages take longer to load.  If 
you must include quicksearch in the footer right away, please use something 
like http://www.cs.hmc.edu/~jruderma/quicksearch.html rather than making each 
bugzilla page load the javascript for quicksearch.
blocks a blocker, so it's a blocker.
Severity: enhancement → blocker
Attached patch all-in-one v5 -- patch -p1 (obsolete) — Splinter Review
This version adds the license headers.	I had to turn on POST_CHOMP in order to
make the first real line of the template be the first output line (after the
content-type and other headers, of course) otherwise the XUL parser really
complained (PRE_CHOMP didn't work).
Attachment #55491 - Attachment is obsolete: true
Comment on attachment 59354 [details] [diff] [review]
all-in-one v5 -- patch -p1

r=afranke on the quicksearch part of this patch. It's all plausible. My only
question is whether all browsers are known to handle the case of an undefined
"sidebar" variable in the 
	if (sidebar == 1)
statement.

By the way, when you're doing so much good to quicksearch.js, you should really
add your name to the contributors list.

I did not review the whole patch, but I noticed a typos in the checksetup part:
"direcotry"
Comment on attachment 59354 [details] [diff] [review]
all-in-one v5 -- patch -p1

I only performed a visual inspection of the code, but here are some items 
that need to be fixed:

- I don't believe "shadow" should be removed from .cvsignore
(apparently some people actually use this feature :)
- Fake index.html created by checksetup.pl needs a <!DOCTYPE ...> tag
- Fix misspelling of "direcotry" in checksetup.pl patch
- Fix misspelling of "compatiable" ("compatible" is correct) in regex in
patch to sidebar.cgi
- Make regex for "compatible" to be case-insensitive
http://browserwatch.internet.com/stats.html
- Any reason why index.tmpl touts Netscape 6.x instead of
Mozilla 0.9.x in JavaScript?
Attachment #59354 - Flags: review-
Ignore my comment about removing "shadow" from .cvsignore.
Attached patch all-in-one v6 -- patch -p1 (obsolete) — Splinter Review
> - I don't believe "shadow" should be removed from .cvsignore
> (apparently some people actually use this feature :)

Ignored :)

> - Fake index.html created by checksetup.pl needs a <!DOCTYPE ...> tag

Fixed. (HTML 4 transitional)

> - Fix misspelling of "direcotry" in checksetup.pl patch

Fixed.

> - Fix misspelling of "compatiable" ("compatible" is correct) in regex in
> patch to sidebar.cgi

Fixed.

> - Make regex for "compatible" to be case-insensitive
> http://browserwatch.internet.com/stats.html

Doh. Fixed.

> - Any reason why index.tmpl touts Netscape 6.x instead of
> Mozilla 0.9.x in JavaScript?

The reason for this is two fold, 1) the javascript was pretty much a copy/paste
from Netscape's web site and 2) Bugzilla is used by more than just mozilla.org
and Netscape is supposed to be an "end user product" where as Mozilla is there
for devolopers (at least that's what they say on IRC :)  I have no objection to
making it say Mozilla by default and I'm sure that b.m.o will want to change
that in their b.m.o template, but that's why it says Netscape 6.
Attachment #59354 - Attachment is obsolete: true
Comment on attachment 61323 [details] [diff] [review]
all-in-one v6 -- patch -p1

I hate this tiny comment window on the Edit Attachment page!  Comments
to follow.
Attachment #61323 - Flags: review-
Comment on attachment 61323 [details] [diff] [review]
all-in-one v6 -- patch -p1


- Remove template/default/index.tmpl~ from patch

- quicksearchhack.html: fix call to LoadQuery() in JavaScript
  (needs parameter) like this:  LoadQuery(f.id.value)

- Change extension on template files (*.tmpl) to match the
  other template files (*.atml)

- Change "application/x-javascript" to "text/javascript" in
  template/default/index.tmpl (may want to add language="JavaScript"
  too).  Note that this is a working draft, not even an RFC.

  http://www.ietf.org/internet-drafts/draft-hoehrmann-script-types-00.txt

- Add type="text/javascript" to <script> tags in 
  template/default/index.tmpl and template/default/sidebar/xul.tmpl

- Specify an alt="" attribute for the <img> tag for ant.jpg.

- Remove the </p> tag after the </form> tag in 
  template/default/index.tmpl.

Conditional r= if the above items are fixed.  I tested this on my
local setup and it works great!!
I hereby remove condition of using *.atml for file extensions per
discussion with Jake on IRC.  Apparently, it has been decided to 
move to the less-confusing *.tmpl file extension for all new 
templates.

Also, the last three items in the previous list were derived from
running the output of index.cgi through the W3C HTML validator.
Feel free to fix the HTML as appropriate...i.e., if you wish to
move the <P></P> tags and <FORM></FORM> tags around to fix the
parse error (rather than just eliminating </P>), go for it.

Finally, I would rather see a consistent use of a JavaScript MIME
type rather than mixing and matching if you have a preference for
one over the other since the "standard" I referenced is only a 
draft standard.
All latest review items addressed.
Attachment #61323 - Attachment is obsolete: true
Comment on attachment 61451 [details] [diff] [review]
all-in-one v7 -- patch -p1

r=ddk (yay!)
Attachment #61451 - Flags: review+
Comment on attachment 61451 [details] [diff] [review]
all-in-one v7 -- patch -p1

Okay, I'm doing a line-by line here, and I must admit I know zero XUL, so i
can't
review that. If the #mozilla folks are fine with the XUL, great.

>-shadow

Gone with oldemailtech. Ok.

>+if ($my_index_html) {

I like the way the HTML is generated, cool.

>+radio
>+  {
>+    -moz-user-select: ignore;
>+  }

This is sidebar-specific, so it's ok to be mozilla-only, I assume.

>+# Suppress silly "used only once" warnings
>+use vars qw{ %COOKIE };

This is now standard, I take it? :-)


>-function ShowURL(mode) {
>-    var input = document.f.id.value;
>+function ShowURL(mode,input) {
>     var searchURL = make_query_URL(bugzilla+"buglist.cgi", input, false);
>     if (searchURL != no_result) {
>         var pieces = searchURL.replace(/[\?]/g,"\n?").replace(/[\&]/g,"\n&");

Here, the API changes but the clients arent changed. No wonder, this API has no
clients
in bugzilla currently, so OK by me.

>+function addSidebar() {
>+      if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function"))
>+      {
>+         window.sidebar.addPanel ("Bugzilla", "[% Param('urlbase') %]sidebar.cgi", "");

I was somewhat concerned about this lacking browser sniffing, but since I can't
get it
to generate a warning, OK.

Nitpicking what I could, it looks good to me. r=kiko
Attachment #61451 - Flags: review+
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Reopening. To quote from my comment #40:

> My only question is whether all browsers are known to handle the case of an
> undefined "sidebar" variable in the 
>         if (sidebar == 1)
> statement.

On my installation, this breaks the normal use of quicksearch from the index.cgi
page in Netscape 4.x: It causes a "sidebar not defined" javascript error. 

A possible workaround is to disable sidebar support in quicksearch.js:

function go_to (url) {
//    if (sidebar == 1) {
//        load_relative_url(url);
//    } else {
        document.location.href = url;
//    }
}
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 61451 [details] [diff] [review]
all-in-one v7 -- patch -p1

> function go_to (url) {
>-  document.location.href = url;
>-  //window.open(url, "other" );
>+    if (sidebar == 1) {
>+        load_relative_url(url);
>+    } else {
>+        document.location.href = url;
>+    }
>+    //window.open(url, "other" );
> }

Oh, bad bad. How did I not see that? May I suggest the if line become

if ( typeof sidebar != "undefined" && sidebar == 1 ) {

Should work on netscape.
Thanks. Seems to work in both Netscape 4.x and Mozilla now, and even the sidebar
works :-)

r=afranke
Checking in quicksearch.js;
/cvsroot/mozilla/webtools/bugzilla/quicksearch.js,v  <--  quicksearch.js
new revision: 1.9; previous revision: 1.8
done

Thanks Andreas/Christian.
Status: REOPENED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: