<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Scott Robbin &#187; UI</title>
	<atom:link href="http://srobbin.com/blog/category/ui/feed/" rel="self" type="application/rss+xml" />
	<link>http://srobbin.com/blog</link>
	<description>A variety of articles, projects and by web developer, Scott Robbin.</description>
	<lastBuildDate>Wed, 07 Dec 2011 17:05:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Visual Reinforcement of a Conversation</title>
		<link>http://srobbin.com/blog/visual-reinforcement-of-a-conversation/</link>
		<comments>http://srobbin.com/blog/visual-reinforcement-of-a-conversation/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 20:58:04 +0000</pubDate>
		<dc:creator>Scott Robbin</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://srobbin.com/blog/?p=237</guid>
		<description><![CDATA[I like how Twitter Search uses overlapping profile images to distinguish individual status updates from ones that are conversational. It&#8217;s a nice, little touch.]]></description>
			<content:encoded><![CDATA[<p>I like how <a title="Twitter Search" href="http://search.twitter.com">Twitter Search</a> uses overlapping profile images to distinguish individual status updates from ones that are conversational. It&#8217;s a nice, little touch.</p>
<p><img class="alignnone" title="Twitter Search: Overlapping Profile Images" src="http://farm4.static.flickr.com/3298/3442076257_471fe212e9_o.png" alt="" width="494" height="74" /></p>
]]></content:encoded>
			<wfw:commentRss>http://srobbin.com/blog/visual-reinforcement-of-a-conversation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Humane is in the Details</title>
		<link>http://srobbin.com/blog/humane-is-in-the-details/</link>
		<comments>http://srobbin.com/blog/humane-is-in-the-details/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 14:37:27 +0000</pubDate>
		<dc:creator>Scott Robbin</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://beta.halobrite.com/blog/?p=71</guid>
		<description><![CDATA[<p>When I first learned to use a computer, my teacher told me to save documents <em>early</em> and <em>often</em>. She warned me of the day when I would be typing an important paper and my computer would crash, causing me to lose all of my work. So, I habituated: every sentence or so, I'd press the keyboard shortcut to issue a <em>Save</em> command. But what happens when you try and do this in a browser-based application?</p>]]></description>
			<content:encoded><![CDATA[<p>When I first learned to use a computer, my teacher told me to save documents <em>early</em> and <em>often</em>. She warned me of the day when I would be typing an important paper and my computer would crash, causing me to lose all of my work. So, I habituated: every sentence or so, I'd press the keyboard shortcut to issue a <em>Save</em> command.</p>

<p>Well, old habits die hard. Despite the increased reliability of text-based programs, auto-saving and operating system stability, I still hammer out <em>Command-S</em> periodically to &quot;protect&quot; my work.</p>

<p>But what happens when I try this in a browser-based application like <a href="http://wordpress.org" target="_blank" title="Wordpress">WordPress</a>? It is a common scenario for me: I'm typing out a draft of my post and reach the end of a complete thought; subconsciously, my fingers press <em>Command-S</em>. Then, I encounter a problem: the browser isn't aware that I'm trying to save my work; it thinks that I'm trying to execute a "Save Page As..." command, and I see this:</p>

<p><img class="alignnone" title="Wordpress Save As" src="http://farm4.static.flickr.com/3419/3233410602_a9fac8ab2f.jpg" alt="" width="500" height="291" /></p>

<p>To make matters even worse, I involuntarily hit the <em>Return</em> key and save a copy of the page to my local drive. Double doh!</p>

<p>Now, imagine that you're the developer or customer support rep who receives this bug report. A common response is to think, "it's the user's fault!" Clearly, the designers had a blogger's best interest in mind when they implemented auto-save and provided a <em>Save Draft</em> button. How could they have anticipated this problem? It seems unreasonable that developers should have to program for every use case...</p>

<p>True. I don't disagree with that statement: programmers cannot foresee <em>every</em> way in which their application will be used. But, this is what separates <em>good</em> UX design from <em>great</em>: an extraordinary attention to detail when accounting for human error.</p>

<p>For example, Google recognized this type of habituation when they created their programs, Google Docs and Gmail. In both applications, if you are drafting content and press Command-S/Control-S, the program will intercept the Save event and execute an auto-save command instead. It anticipates that your intention to save content, not a web page, and creates a <em>forgiving interaction</em>.</p>

<p>And, it makes sense, right? Google is trying to convince users to abandon the traditional desktop programs &mdash; Microsoft Office and Outlook &mdash; where users have become habituated to Command-S functionality. The designers had the foresight to understand users would try and use the browser much in the same way they had used their desktop app, and accounted for any "errors" they might make. Great design!</p>

<h2>Demo</h2>
<p>Rather than have you visit Gmail or Docs, I've setup a small example here. To see it in action, start typing in either text area, then press your keyboard save command (Command-S for Mac, Control-S for Windows and Linux) :
</p>

<div style="background-color: #CCC;padding: 10px">
<label for="save-page" style="display:block">Browser receives the event.</label>
<textarea  style="width: 100%;height:100px" wrap="soft" id="save-page" name="save-page">Type some text, then press your keyboard save command.</textarea>
<label for="save-content" style="display:block; margin-top: 25px">Javascript intercepts the event, then saves the content.</label>
<textarea  style="width: 100%;height:100px" wrap="soft" id="save-content" name="save-content">Type some text, then press your keyboard save command</textarea>
</div>

<script type="text/javascript" src="/js/jquery.transparentmessage-0.1.js"></script>
<script type="text/javascript">
    $("#save-content").keydown( function(e) {
       if( e.which== 83) {
         if(e.metaKey) { $.transparentMessage("Pretending to save your content."); return false; }
       }
    });
</script>

<h2>The Code</h2>
<p>Intercepting key events is easy. If you have jQuery installed, you can use the keydown function:</p>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#element-id&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">keydown</span><span style="color: #009900;">&#40;</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>e.<span style="color: #660066;">which</span> <span style="color: #339933;">==</span> <span style="color: #CC0000;">83</span> <span style="color: #339933;">&amp;&amp;</span> e.<span style="color: #660066;">metaKey</span><span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// Do Something</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>




<p>Note: The example above listens for keydown events tied to the "element-id" object, and responds to Command-S/Control-S keycodes. <a href="http://www.cambiaresearch.com/c4/702b8cd1-e5b0-42e6-83ac-25f0306e3e25/Javascript-Char-Codes-Key-Codes.aspx" target="_blank" title="Javascript Key Codes">Other keycodes can be found here.</a></p>

<h2>Discuss and Contribute</h2>
<p>I'd love to hear of other examples that you consider good design, those that embody small, humane attentions to detail.</p>
<p>As for me, drawing on inspiration from <a href="http://ejohn.org/blog/a-web-developers-responsibility/" target="_blank" title ="John Resig: A Web Developer's Responsibility">John Resig's wonderful article on a Web Developer's Responsibility</a>, I am going to submit "Command-S/Control-S event capture" as a feature request to the WordPress bug tracking system (along with a patch). WordPress is a phenomenal product &mdash; one that I use every day &mdash; and I have been remiss to get involved sooner.</p>]]></content:encoded>
			<wfw:commentRss>http://srobbin.com/blog/humane-is-in-the-details/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery PageSlide</title>
		<link>http://srobbin.com/blog/jquery-pageslide/</link>
		<comments>http://srobbin.com/blog/jquery-pageslide/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 16:04:30 +0000</pubDate>
		<dc:creator>Scott Robbin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://halobrite.com/blog/?p=70</guid>
		<description><![CDATA[<p>As web developers, we spend precious time laying out our pages, using every UI concept in the book to conserve space, while trying to maintain a user's focus on the task at hand. There are many techniques to use — Lightbox, Carousel and Tabs to name a few — and today I hope to offer up another: jQuery pageSlide.</p>]]></description>
			<content:encoded><![CDATA[<p><a class="download-now" title="Download jQuery PageSlide" href="https://github.com/srobbin/jquery-pageslide/zipball/v2.0">Download Now</a></p>

<p>Nowadays, it might be accurate to say that screen real estate is worth more than <em>actual</em> real estate.</p>

<p>As web developers, we spend precious time laying out our pages, using every UI concept in the book to conserve space, while trying to maintain a user's focus on the task at hand. There are many techniques to use &mdash; Lightbox, Carousel and Tabs to name a few &mdash; and today I hope to offer up another: jQuery PageSlide.</p>

<p>jQuery PageSlide was inspired by the UI work of Aza Raskin. In his recent posts regarding concepts for <a href="http://www.azarask.in/blog/post/firefox-mobile-concept-video/" title="Firefox Mobile">Firefox Mobile</a> and <a href="http://www.azarask.in/blog/post/can-ubiquity-be-used-only-with-the-mouse/" title="Mouse-based Ubiquity"> a mouse-based Ubiquity</a>, Aza introduced the idea of sliding (or &quot;throwing&quot;) content aside to reveal a secondary content pane.</p>

<p><img src="http://farm5.static.flickr.com/4005/4690865748_8b047d764f_o.png" style="border: 1px solid black" alt="jQuery PageSlide Screenshot" title="jQuery PageSlide Diagram" /></p>

<p>This plugin allows any developer to recreate a similar interaction on their own website using a few simple lines of Javascript. By attaching the method to an anchor tag, PageSlide adds the ability to move your page and display a secondary interaction pane. The slide is animated whenever the click event is invoked.</p>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
    $<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">pageslide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>




<p>Similar to <a href="http://en.wikipedia.org/wiki/Lightbox_(JavaScript)" title="Lightbox">Lightbox</a>, PageSlide has two major advantages:</p>
<ol>
	<li>The primary window is reserved for content; secondary interactions do not require additional space on the page &mdash; the area they need is created and removed on demand.</li>
	<li>Because the user can see the original window, they have a greater likelihood of retaining focus, and can easily return to the previous task.</li>
</ol>
</p>

<h2>Can I See It In Action?</h2>
<p>Of course, you can! <a href="/demos/jquery-pageslide/secondary_page.htm" class="pageslide" title="PageSlide Demo">Click for a PageSlide demo.</a></p>

<h2>Where Do I Get It?</h2>
<p>I've setup a <a href="http://github.com/srobbin/jquery-pageslide" title="GitHub: jquery-pageslide">GitHub project for jquery-pageslide</a>.</p>

<link rel="stylesheet" type="text/css" href="/css/jquery.pageslide.css" />
<script type="text/javascript" src="/js/jquery.pageslide.min.js"></script>
<script type="text/javascript">
        $(document).ready(function() {
            $('a.pageslide').pageslide({ direction: "left" });
        });
</script>]]></content:encoded>
			<wfw:commentRss>http://srobbin.com/blog/jquery-pageslide/feed/</wfw:commentRss>
		<slash:comments>105</slash:comments>
		</item>
		<item>
		<title>Using Ubiquity to Replace alert()</title>
		<link>http://srobbin.com/blog/using-ubiquity-to-replace-alert/</link>
		<comments>http://srobbin.com/blog/using-ubiquity-to-replace-alert/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 18:22:10 +0000</pubDate>
		<dc:creator>Scott Robbin</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Ubiquity]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://halobrite.com/blog/?p=32</guid>
		<description><![CDATA[Bad habits are hard to break, especially when they're your own, but what about other people's habits....impossible? Difficult, perhaps, but not insurmountable. By using Ubiquity's preLoad_ authoring tool, you can override Javascript's native functions, such as alert(), and replace them with useful interactions like Transparent Messages.]]></description>
			<content:encoded><![CDATA[<p>Bad habits are hard to break, especially when they&#8217;re your own, but what about other people&#8217;s habits&#8230;.impossible? Difficult, perhaps, but not insurmountable.</p>
<p>When we first encounter Javascript programming, the quintessential function that enamors us all is <a href="http://www.w3schools.com/JS/js_popup.asp" title="Javascript pop-up boxes">alert()</a>. Plunk that baby down into a page and, bam (or more accurately&#8230;thwunk!), a magical dialog box appears, grabbing the viewer&#8217;s attention and providing useful/useless information:</p>
<input type="button" onclick="alert('Aw, geez, you clicked me! Thanks.')" value="Click me, click me, click me" style="margin:15px 0 25px 0" id="demo" />
<p>But is this the best way to convey important information? Probably not. For one, the alert box is <a href="http://en.wikipedia.org/wiki/Modal_window" title="Wikipedia: Modal Windows">modal</a>; a user cannot continue with their task until they&#8217;ve clicked OK &mdash; their train of thought is broken.</p>
<p>One solution to this problem is to use transparent messaging. Rather than doing a disservice by re-explaining, I&#8217;ll refer you to read <a href="http://humanized.com/weblog/2006/09/11/monolog_boxes_and_transparent_messages/" title="Humanized: Monolog Boxes and Transparent Messages">Aza Raskin&#8217;s article on Monolog Boxes and Transparent Messages</a>. Or, if you&#8217;d like to see them in the wild, check out <a href="http://songza.com" title="Songza: The Music Search Engine and Internet Jukebox">Songza</a>: we utilize transparent messages to convey the state of media player (play a song, then press the space bar to Pause.)</p>
<p><a href="http://www.flickr.com/photos/srobbin/3151602178/"><img alt="" src="http://farm4.static.flickr.com/3146/3151602178_d8f20bf468.jpg" title="Transparent Message on Songza.com" class="alignnone" width="500" height="246" /></a></p>
<p>Now, that&#8217;s all well and good, you might say, but what about sites that I don&#8217;t have programmatic control over? As a user, I&#8217;m at the mercy of whatever features the site programmer chooses to implement. Not true. Enter <a href="http://labs.mozilla.com/projects/ubiquity/" title="Mozilla Labs: Ubiquity">Ubiquity</a>.</a></p>
<h2>Ubiquity and pageLoad_</h2>
<p>One of the goals of Ubiquity is to extend functionality across websites, regardless of whether or not the original programmer had coded that type of interaction (i.e. language translation, map insertion, word definition, etc). As such, <a href="http://labs.mozlla.com" title="Mozilla Labs">Mozilla Labs</a> has given programmers a bevy of <a href="https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial" title="Ubiquity: Author Tutorial">authoring tools</a>, including the <strong>pageLoad_</strong> prefix. If, in your command file, you create a function that starts with pageLoad_, Ubiquity will execute this code whenever a new page is loaded into the browser window. It is this functionality that allows users to override native Javascript functions, such as alert().</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"> <span style="color: #003366; font-weight: bold;">function</span> pageLoad_overrideNativeFunction<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     CmdUtils.<span style="color: #660066;">getWindowInsecure</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">nativeFunction</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>args<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #006600; font-style: italic;">// Your code here</span>
     <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>By using this pattern, the native function is auto-magically replaced with your customized code each time a new page is loaded. In my case, I&#8217;ve chosen to override alert() with a call to create and show a Transparent Message <em>(Note: I&#8217;ve used a Singleton with lazy instantiation to converse resources on pages that won&#8217;t call the command)</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> pageLoad_overrideAlert<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     CmdUtils.<span style="color: #660066;">getWindowInsecure</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #000066;">alert</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>str<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          TransparentMessage.<span style="color: #660066;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span>str<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>To see a working example, simply <a href="https://ubiquity.mozilla.com/xpi/ubiquity-latest.xpi" title="Install Ubiquity">install the Ubiquity extension for Firefox</a> and <a href="http://halobrite.com/ubiquity/" title="Halobrite: Ubiquity Commands">subscribe to the transparent-message command</a>. From there, you can create a test message by issuing the &#8220;transparent-message&#8221; command, or see how it overrides alert() by revisiting this page and clicking the <a href="#demo">demo button located at the top of this article</a>.</p>
<p><em>Note: Many thanks to <a href="http://binarybonsai.com/" title="Binary Bonsai">Micheal Heilemann</a> for authoring the <a href="http://code.google.com/p/humanmsg/" title="jQuery: Humanized Messages plugin">jQuery Humanized Messages plugin</a>. It&#8217;s what we use on Songza, and was used as a reference to create the transparent-message command.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://srobbin.com/blog/using-ubiquity-to-replace-alert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

