Location Prettyprinting

From MozillaWiki
Jump to navigation Jump to search

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
  • 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.