Closed Bug 32594 Opened 20 years ago Closed 19 years ago

[RFE] sidebar panel for History


(SeaMonkey :: Sidebar, enhancement, P3)



(Not tracked)



(Reporter: myron, Assigned: timeless)



(Keywords: helpwanted, Whiteboard: [nsbeta2-] [nsbeta3-])


(7 files)

From Bugzilla Helper:
User-Agent: Mozilla/4.7 [en]C-AOLNSCP  (Win98; U)
BuildID:    2000031420

It would be handy to have the History of URLs I've visited available to me as a 
panel in the Sidebar. Currently, it seems that the only way to view my History 
is from Tasks>Tools>History. Clicking on the Back button doesn't do it either 
(the way it works in N4.x) This buries a feature I've come to depend on.

Reproducible: Always
Steps to Reproduce:
This is a new feature request.
I'm all for this :-)
Ever confirmed: true
QA Contact: paulmac → claudius
Looking closely at the contents of my build packaging tells me someone is already working on this. Find out who owns history-
test.xul and they'll have all the answers for you.

In the meantime if you're burning for history access from the sidebar you can just add the whole dang window into your sidebar as 
a panel. It's a little clunky but it works fine. http://mobay/sidebar/history.html will do it for you with one click.
This is currently out for beta 2.  Sorry.  I want it too, though. :-)
Whiteboard: HELP WANTED
Target Milestone: --- → M17
Move to M20.
Target Milestone: M17 → M20
Adding helpwanted keyword to all bugs with the old HELPWANTED in their status 
Keywords: helpwanted
Putting on [nsbeta2-] radar.
Whiteboard: HELP WANTED → [nsbeta2-]
Nav triage team: [nsbeta3-]
Whiteboard: [nsbeta2-] → [nsbeta2-] [nsbeta3-]
Could someone make http://mobay/sidebar/history.html available for outsiders?

done. you can now find this little page at

keep in mind this is exactly the whole global history window, not a pared down version like it should be.
I think I can do this. Just a little bit of XUL and JS, right? (Maybe some C if
I'm unlucky.) I'm going to have to get setup for Mozilla CVS, but I should have
some code for this soon. Consider it being worked on.

Oh, and the link above doesn't work for me with the 2000080620 build. Dunno if
it's just a nightly thing, but apparently XPCOM doesn't want to give that JS
code access. At least that's what the JavaScript console says.
Hmmm, if it doesn't work then that's a recent regression on the M-18 trunk(ie it works fine on the m17 branch).

There's probably not too much work to be done actually. Now that the column selector widget is in and working all you really
need is for the columns to be resizable (which should now be working too). Then you'd have a working and managable history 
sidebar tab. Oh, and you'd have to rip out the menus as well. AFAIK that should all just be XUL and JS.
Adding nsbeta3 keyword to bugs which already have nsbeta3 status markings so 
the queries don't get all screwed up.
Keywords: nsbeta3
Adding nsbeta2 keyword to bugs with nsbeta2 triage value in status field so the 
queries don't get screwed up
Keywords: nsbeta2
Okay then, here's pass one: A sidebar panel very closely descended from the
regular history window. Attached are the two new files needed to add the panel
plus a patch to add needed stuff to various DTDs, add the panel to the default
list, and do a tiny bit of maintenance on the bookmark panel (just because I was

M17 and the M18 binaries both have non-overlapping issues with this, and if what
works was put together, it would operate fine. M17 has splitter layout and
column removal problems and M18 nightlies have column sorting and DND problems.
I've disabled what rudimentary DND it had so it works okay with the nightlies.

The same problems are experienced by the regular history window.

Without the patch applied, you can use this link: <a
href="javascript:sidebar.addPanel('Panel History',
'chrome://communicator/content/history/history-panel.xul',' ');">Add History
Panel</a> to add the history panel to your sidebar, as long as the XUL and js
files are in the chrome/packages/core/communicator/content/history directory.
M18 nightlies currently have a problem with this, however.

Yay! My first patch.
And that was going to be such a nice link too. Silly <pre> tags. Well, just go
to the next attachment for a link. Sorry for the spamming.
Could someone review and check in, please?
Keywords: patch, review
Follows are improved versions of history-panel.xul and history-panel.js. These
work pretty well with the current nightlies, barring a bug with bookmarks.js
that breaks the menu sorting.

Ignore the older versions.
*** Bug 52934 has been marked as a duplicate of this bug. ***
*** Bug 53336 has been marked as a duplicate of this bug. ***
[Reassigning (hopefully) to someone who works on Mozilla ...]
Assignee: slamm → matt
OS: Windows 98 → All
QA Contact: claudius → shrir
Hardware: PC → All
Ok, so I asked on IRC: is anyone actively working on this? If someone did work
on this, would someone vouch for it? What's the current state here?

I'd love to work on it, if it's still a feature people want, and someone has the
time to beat me over the head w/ a stick when I try to submit crappy code... :-)
Preed -- this bug is assigned to, which means nothing is 
happening to it. So go for it. Have a look at the attached files and see if you 
can get it finished.
I added the .js and .xul files to comm.jar and edited panels.rdf to try this
out. The History panel is added no problem , with functional links.

Someone should review this and hopefully get it checked in.  
Anyone want to take these patches through the review process
<>? Please?
Another lost patch.
I would commit:
attach_id=12768 08/11/00 13:04 patch for adding history panel to default setup
except Index: xpfe/components/bookmarks/resources/bm-panel.xul
And the patch to local-panels.rdf is missing a line, which i would clone from 
the patch to panels.rdf
attach_id=12955 08/15/00 13:49 the new history-panel.xul
attach_id=12956 08/15/00 13:51 the new history-panel.js
I will attach a new patch that contains all of these changes and a patch to 

The xul used a titledbutton. Unfortunately, this went out of style.
Assignee: matt → timeless
Severity: normal → enhancement
Summary: [FEATURE] Add sidebar panel for History → [RFE] sidebar panel for History
Target Milestone: M20 → mozilla0.9
Blake: would you please review this?
Some comments on the first file from skimming over the patch.  More later, need 
to leave now...:

+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation.

They are?  Wouldn't that be you?

+ * Portions created by Netscape are
+ * Copyright (C) 1999 Netscape Communications Corporation. All

2000 ;-)

+// get handle to the BrowserAppCore in the content area.
+var gAppCore = window._content.appCore;

jag will kill you if you introduce new appCore references.  there are other 
ways to do what you're using appCore for.  Look at LoadURI() in navigator.js

+function openHistoryURL(event, node)
+  if (event.type == "click" && 

Why is this necessary?  Won't this only get called onclick?

+      ((event.button != 1) || (event.detail != 2) ||
+       (node.nodeName != "treeitem"))) {
+    return(false);
+  }

For clarity, and to back out as soon as possible, you might want to separate 
these into simple |if (condition) return false;|'s

Also, this is your file so you're free to establish your preferred style.  
Typically, though, the parenthesis are ommitted for the return value (so just 
|return false;|)
+  if (node.getAttribute("container") == "true") {
+    return(false);
+  }

And the additional braces are typically omitted here. But again, your choice.

+  // If we don't have a browser window or metaKey is down,
+  // then open a new browser window
+  if ((window._content == null) || (event.metaKey)) {

That can be |!window._content|.  Also, we already have a generic handler for 
modified clicks in contentAreaClick.js.  Please use that, it has all the right 

+    window.openDialog( getBrowserURL(), "_blank", "chrome,all,dialog=no", url);

getBrowserURL() will work in Mail, Composer, etc.?

+  } else {
+    if(gAppCore) {
+      // support session history (if appCore is available)
+      gAppCore.loadUrl(url);
+    } else {
+      // fallback case (if appCore isn't available)
+      window._content.location = url;
+    }
+  }

See navigator.js for how to do this best.

+function HistoryBuildTreePopup(item) {
+  BuildTreePopup(
+    document.getElementById('theColumns'),
+    document.getElementById('headRow'), item,
+    document.getElementById('popupCell')
+  );

Why do we need a separate helper function just to call another function?  In 
files like history.xul and bm-find.xul, we just do this inline in the xul (e.g.
Also, <titledbutton/>'s didn't go out of style, they were just replaced by 
<button/>'s with images.
I've wrapped up the last two attachments (but not the patch) into a package and
posted it at:

The history panel is functional and I didn't change any of the files.
See also bug 64218, maybe this one is fixed now that bug 64218 is fixed?
This has been checked in...Marking Fixed.
Closed: 19 years ago
Resolution: --- → FIXED
history panel appears in the 'recommended' folder os sidebar customize
now.VERIFIED on all trunk builds.
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.