[uf-discuss] Microformats UI in Firefox 3

André Luís andr3.pt at gmail.com
Tue Aug 28 07:52:18 PDT 2007


I don't know if this has been discussed before... but what about
showing a bar similar to the popup-blocker one and say there is
microformats on the page with a button to "Reveal". And _then_ inject
the extra code?


On 8/28/07, Alex Faaborg <faaborg at mozilla.com> wrote:
> Perhaps instead of new classes and protocols, we could just do this
> completely in javascript.  Here is a general example, probably all
> the function names would end up being different:
>
> <div id="hcard-Alex-Faaborg" class="vcard">
>   <span class="fn">Alex Faaborg</span>
>   <div class="org">Mozilla</div>
>   <div class="adr">
>    <div class="street-address">1981 Landings Dr. Building S</div>
>    <span class="locality">Mountain View</span>
> ,
>    <span class="region">CA</span>
> ,
>    <span class="postal-code">94043</span>
>    <script type="text/javascript">
>         if (navigator.microformatAware("hCard")){
>         document.write("<a href='#' onclick='navigator.sendToAddressBook
> ('hcard-Alex-Faaborg')'>Add to Address Book</a>");
>         document.write(", ")
>         document.write("<a href='#' onclick='navigator.sendToMap('hcard-
> Alex-Faaborg')'>Send to Map</a>");
>         }
>    </script>
>   </div>
>
> > It seems you'll still need a way for the browser to inject UI for
> > actions the content creator didn't foresee.
>
> We can include these actions on context menus, and in the browser UI
> (similar to Operator's interface).  However, I'm not sure content
> creators would be too happy with Firefox modifying their pages by
> literally injecting UI.
>
> -Alex
>
>
> On Aug 28, 2007, at 6:37 AM, Scott Reynen wrote:
>
> > 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
> >
> > _______________________________________________
> > microformats-discuss mailing list
> > microformats-discuss at microformats.org
> > http://microformats.org/mailman/listinfo/microformats-discuss
>
> _______________________________________________
> microformats-discuss mailing list
> microformats-discuss at microformats.org
> http://microformats.org/mailman/listinfo/microformats-discuss
>


More information about the microformats-discuss mailing list