Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

BLUEPRINT Addressbar

Adrian Cochrane edited this page Mar 21, 2017 · 1 revision

The browser chrome is currently at a stage where I want to avoid adding more to it. However I still want to add features which have the capacity to complicate the chrome in ways I'd rather avoid.

In addition to "internal tools" a good way to resolve this is to create a custom text entry, which dynamically presents these new features as just Oddysseus trying to be helpful. I may not be able to achieve what I want from a native control, but nothing it'll do would be too far outside of normal Gtk controls.

Just like now I'd like to maintain it's behaviour of rendering the the website's favicon, web address, and loading progress. The only thing I might change that way would be to bold the domain name and italicize the fragment identifier.

I'd add an autocompletion dropdown which loads completions from various "traits" (predominantly hooking in search services, but will also include local sources) and possibly implies the preceding "http://". While completions should come in asynchronously, new completions should only be added below previous ones (otherwise user interaction would get messed up) while doing it's best to group completions from common sources. An icon next to the completion should indicate the source, while an arrow on the right should indicate this "completion" actually does something else.

Where I'd start needing a custom text entry is when I add multiple icons to the right-hand-side of it. These would indicate whether page resources have been "installed" into Oddysseus, the HTTPS certificate validity, and if we're subscribed to any feeds from the page. A gray icon would indicate inactive, a glowing icon would indicate the user's hovering, and a (monochromatic) coloured icon would indicate active.

When clicked hat certificate validity icon would show a custom certificate UI that hides the raw key values (even with a full understand of what that value is, no one can understand it) in a popover.

The favicon could be a nice place to place to hide permissions information, which should ideally allow users to even block and unblock specific resources the page uses.

Then the bookmarks UI I have in mind adds a little bit more complexity to this control. (Though that's for a seperate page).

Overview

Customize the addressbar text entry to support:

  • Renders load progress and favicons
  • Highlighting certain parts of URIs
  • Show autocompletions from multiple sources identified by favicons
  • Show multiple clickable icons on the right hand side (in a simple line drawing style)
  • Show page permissions in a popover when it's favicon is clicked.
  • (something more)

Implementation

The trickiest part of this is to maintain the look of a text entry. Thankfully by accessing a widgets stylecontext I can change what type it looks up in the stylesheet for it's rendering. So the containing element should render as a TextEntry and the internal control renders as a label.

Once I have that I can easily use my ProgressBin to render load progress and to add MenuButtons/ToggleButtons for everything else. Drawing the icon ontop of a blurred version of itself should create a nice blur effect.

For autocompletion I'd wrap a listbox with a ScrolledWindow and a Window placed beneath my control (just like the native completer, except I wouldn't bother filtering and seperate the input control from that which it's sized to). Add a controller which consults an interface and I'd have all the infrastructure I need there.

I'd probably use internal pages to render certificates and page permissions for a stronger focus on typography and a lesser one on interactivity.