Location Prettyprinting
Contents
Location Prettyprinting
I can think of a number of extensions and enhancements to Firefox that really want to present themselves in a tab or a browser window, and just present a XUL page as their UI. For example, a bittorrent download manager could display extra information that way; some sort of bugzilla integration could use that to display a nicer view of a bug, etc. However, the URL bar will still say "chrome://foo/bar/content/baz.xul" or something indecipherable.
I suggest that we create a service that extensions can register with to allow for prettyprinting of chrome:// URLs in the Location Bar. That way, "chrome://foo/bar/content/baz.xul" could be displayed as "BitTorrent Download Statistics". "about:config" could display "Advanced Configuration". "about:" could display "About Mozilla Firefox", "about:blank" -> "Blank Page", etc.
Some notes:
- The translated name cannot look like a URL; can't start with a registered protocol handler maybe, can't include a : in the first 20 characters, or similar (Edit: this actually isn't that important, I don't think -- for something to register for prettyprinting, they need to have chrome privs; if they have chrome privs, they can make the location bar say whatever they want anyway... but it's probably a good guideline in any case.)
- The location bar should have a different background (light blue?) if it's being translated, maybe with an icon similar to the lock icon that the user can click to see the actual chrome: URL.
- Only chrome: and possibly about: URLs would be eligible for translation.
Thoughts from biesi
Implementation thought: what about showing the title attribute of the <window> for chrome:// XUL content as the url?
I'm not sure what I think of the idea itself... Maybe the chrome:// url should show when clicking into the location bar?
Thoughts from bsmedberg
Perhaps we should also suppress various kinds of browser chrome, such as the back/forward buttons, when we're showing "app UI" in a tab.
Thoughts from darin
It seems to me that the whole navigation bar is less applicable to such applications. Perhaps the tab strip should exist above navigation bar, or perhaps extensions should be able to replace the navigation bar with something more appropriate for their application. For example, if you were to embed Thunderbird into a Firefox tab, then it would probably make sense to swap the navigation toolbar for Tbird's mail toolbar. Extensions would also want to be able to load different menu items when their tab is selected.
Thoughts from jhughes
I've been iterating a prototype of this with beng, and here's how it currently works:
- If a chrome URI is loaded that has a title (in <window>), the location bar is replaced with a special bar that shows the title and optionally a favicon-like image specified by the chrome file (currently as an XBL anonymous image, might change). I should probably extend this to support "about:" URIs as well.
- If the user clicks on this special bar or hits Ctrl-L, the location bar reappears (revealing the chrome URI).
- Navigation controls remain active for now--users are familiar with the Back button, so why not keep it if it doesn't cause any other problems?
Thoughts from plasticmillion
My concern with this approach is that it is likely to defy the expectations of average users if they aren't able to enter a URL into what they will doubtless imagine is the normal Address bar. As long as the special bar accepts user input and navigates as expected when a URL is entered then this is surely an excellent solution. (Which, now that I look again, is obviously what is meant by "If the user clicks on this special bar...")