[uf-discuss] Microformats UI in Firefox 3
Scott Reynen
scott at randomchaos.com
Tue Aug 28 06:37:14 PDT 2007
On Aug 28, 2007, at 6:33 AM, Alex Faaborg wrote:
> Yes, while previous Firefox designs have focused on the browser
> injecting UI into the page, this discussion is about how the
> content creator should provide links and buttons for acting on
> microformatted content.
It seems you'll still need a way for the browser to inject UI for
actions the content creator didn't foresee. And for that you'll need
to know 1) whether a given action is already labeled by the content
creator, 2) where to put it if it's not, and 3) what to do with
actions the content creator labels but Firefox doesn't understand.
For #1, each action will need a unique identifier. URLs make good
unique identifiers on the web, and could point to somewhere useful
(#3), removing the need for hidden content. For #2, it might be
useful to have something like class="put-actions-here". I'd suggest
something like this:
<ul class="user-actions">
<li><a href="http://mozilla.org/add-to-address-book/" rel="user-
action">Add to Address Book</a></li>
<li><a href="http://random-website.org/crazy-unknown-action/"
rel="user-action">Do Something Crazy</a></li>
</ul>
So if Firefox has two actions it could apply to a given hCard, it
could do something like this:
1) find where the content creator wants user actions inserted,
ul.user-actions
2) check all a[rel=user-action] for already-labeled actions
3) compare those against available actions and update UI accordingly:
3a) the action identified by the URL http://mozilla.org/add-to-
address-book/ is already added and available, so update the link to
point to the action rather than the identifier
3b) the action identified by http://maps.google.com/firefox/add-to-
map/ is available but not added, so add the action with default label
3c) the action identified by http://random-website.org/crazy-unknown-
action/ is added but not available, so offer a prompt to install the
new action
Peace,
Scott
More information about the microformats-discuss
mailing list