Archive for the ‘HTML/CSS’ Category

Bad Standards

Mar 10
14

Firefox has it’s own layout language called XUL that is used to style and design much of the UI inside Firefox.  If HTML is so great why did Firefox need XUL?  The reason is that HTML and CSS are inneficient at describing user itnerfaces, designer intent and basic design. Google Chrome’s UI? Nope. Safari UI? Nope.  Internet Explorer? Yeah Right.

Standards people, it’s all about standards! Sure.

If the standards are so great and the browser makers claim great performance why aren’t the core bits of browser user interfaces built using the very same tools?

Interface List Design – Drupal

Oct 09
1

This is a quick UI critique on a list design pattern that’s in a proposed stages for Drupal7. The UI being critiqued is not final, as such the feedback is meant to be helpful to both the Drupal team and anyone else designing list based design patterns.

Before:

drupal_content_list

Example image from drupal 7 content list

Key points with this screen:

  • The title areas don’t tell you what you’re supposed to do on this screen. In fact there are at least three competing title areas. “Content” as a title, “Content” as a tab, “Add new content” as a secondary title and two group boxes that cover filtering and updating. The actual title of the screen doesn’t reflect the modal nature of dialog. You’re actually adding content to something else and it’s not clear what that is.
  • The information is presented in the wrong reading order.  The content table should be first.  You first have to read the list to see what you’re dealing with before you decide to either filter it or update it.
  • An empty list is a dead-end. It tells you there is no content but doesn’t direct you on how or where you should go to create some.
  • The X in the upper doesn’t make it clear what it would close. The tab? The dialog? A simple cancel button or a standard cancel button or a close button in the upper right would be more obvious.

After

drupal content list updated

Key points

  • Title should say what you’re doing.
  • Filters should sit above column headers whenever possible. No additional button action should be needed and multiple filters can be applied at the same time.
  • It should be easy to reset the filters and hide them. Hidden should be the default.  The filters should give you a clue as to the number of items in each filter bucket:  Articles (3)  Posts (120). This makes it easier to select the right filters.
  • If the table is empty it should be easy to get to a content creation page.
  • Buttons along the bottom of a dialog provide clear ways to exit or complete the task.
  • Things that don’t map to the core task should be hidden.  In the original mockup there were options to update the status of content from published to unpublished. This type of functionality belongs in a management section, not when you’re “adding content.” It should be removed or hidden in a similar way that filters can be hidden.

CSS Zen Garden of Dreams

Apr 08
11

A reader, Josh Weinberg, wrote in to comment on my CSS Sucks article. The article gets a ton of traffic mostly from people typing: “CSS Sucks” into google. I think I’m onto something.

Josh put together a number of example of how broken CSS is by showing examples of the CSS Zen Garden with different content. He literally took the CSS markup with no modification and simply changed the content to be smaller. The results broke some designs beyond recognition other designs had varied results. Take a look.

The point here is that CSS Zen Garden is an artificial utopia that doesn’t exist in the real world

  • Content is dynamic
  • You can’t rely on the content length or it’s presence
  • You can’t expect a custom class for every text element
  • You can’t do image replacement if the text is dynamic

Thank you CSS Zen Garden for helping prove my point that CSS still sucks.

Top mistakes made creating tables of data and how to avoid them

Jan 08
8

Interfaces design is all about managing data input and output. Input is done through various forms. Output is done most often through tables of data. There are a number of basic things that can be done with a simple HTML or application data table to make the data easier to read and understand.

Table Basics

  • The table should have a title telling users what the table is about. Don’t forget about this and don’t label the table with the non descriptive noun such as: “users” or “groups” try to use a label that tells users what they should do with the table of data… “Edit user permissions and create new accounts” or “Add and remove people from groups.” Whatever the table of data try to construct a simple title to explain the purpose of the table.
  • Use clear and descriptive column headers, avoid acronyms. If you can’t avoid acronyms provide tooltips.
  • Make the column headers sortable, on all tables and on all columns.
  • When sorting by a column show an indication of what column is sorted. Use a triangle icon and point it in the direction of the sort. Make sure that users can visually tell the column can be sorted either by using a standard column look or by using a hover effect.
  • Use horizontal lines or subtle alternating colors if you want to help people read across, use vertical lines or alternating colors if you want people to read down. Border=1 is almost always the wrong answer.
  • If you have a detail page the hyperlink goes in the first column with the name of the item. Underline the hyperlink. Avoid hyperlinks in other columns as this can be confusing. Alternatively make the entire row one big hyperlink if appropriate.
  • If the row can be deleted use a delete icon in the last column. Consider confirming the deletion if the deletion is hard or impossible to recover.
  • Align the header and the text of a column to the left if it’s normal text. Align to the right if it’s a number. Use a fixed number of decimal places so your numbers line up vertically.
  • If you’re displaying a date use the right date format based on the data you are using. Use as short a form as possible but no shorter. You don’t need to use UNIX timestamps for everything.
  • Avoid scrolling the table along the horizontal.

Table Paging

  • If your table has 100′s of results or more add the ability to page your results. (50-100 per page seems to work well)
  • Consider virtualized scrolling if this is available. This is the ability to make the scrollbar larger and dynamically fetch items as they are scrolled into view.
  • It’s usually not necessary to give users the option of how many results they should see per page. If you need to provide this option you should keep it within an options page and not directly under every table cluttering your main interface.
  • Paging elements should be at the bottom of the table. You can optionally place paging controls at the top of the table if users are likely to jump around.
  • The following should be present in the paging area: Current Page, Next Page, Previous Page, Total Page Count.
  • Users may not go past the the first couple pages of results, if your users need to flip through more than this make sure you have alternatives for finding data such as filters or search.

Table Filtering (optional but necessary for long lists)

  • Design your filters to narrow long lists down quickly and eliminate large portions of the data. Filtering is not the same as searching you’re trying to get the list down to be a smaller list it’s not trying to find a specific item.
  • Consider filters that match the logical roles that people perform on the data, filter by User, Region, Job-Title, Permissions, Sevarity, Priority, etc.
  • Usually people want to filter by the data columns that you present. If you want to filter by a column that isn’t shown consider showing the column so users can sort by it.
  • It should be obvious when the list is filtered and when it isn’t. Make it easy to clear any filters. If a filter is a narrowing choice make it easy for users to change their mind and pick another choice without needing to use the back button.
  • Filters can be placed under the columns (as in Excel) or in a module to the left, right or above the table. Avoid putting filters bellow a table as it may not be seen.
  • When possible consider in-place typing filters that filter the data as you type.

Selection

  • If you need to provide selection within a list consider either the shopping list metaphor where you add list items to a growing collection or a checkbox selection where you can check off multiple items and perform an action.
  • If using check box selection avoid having hyper links in the list as users may inadvertently click the link trying to click the check box.
  • Provide simple command buttons or checkboxes to select all or clear the selection.
  • If you provide keyboard access try to address traditional keyboard selection shortcuts (CTRL/Shift/Arrow/Spacebar selection).

Creating great tables in your application will make the data easier access. Many people forget that a very large percentage of peoples time is spent trying to view analyse and manipulate data within the interface. Having great tables across your appication is a good start.

Web Design Acid Test – Is not what you think

Dec 07
21

For several years the bar that is used to measure web-browsers has been the Acid Test. This test is a measure of standards compliance with HTML, CSS. Unfortunatly the test is somewhat useless. Some would have you believe that passing this test means that your web-browser meets some level of quality. While passing the test does mean that the browser adheres to aspects of the W3C standards it also means that your browser is unable to render quality designs because the standards are woefully poor to express designer intent. Just because IE8 will pass the acid test doesn’t mean that browser hell has frozen over.

Here are the things needed for a web designer acid test. One that’s based on how designs should look on screen, not parsing, css selectors or semantic markup.

Holiday Web Design Wishlist:

  • Fonts – Please give me the ability to specify any font as part of the design of a page. Witout needing some Flash or substitution hack.
  • Rotation – Let me rotate box level elements, logos, fonts and other elements don’t always belong horizontal.
  • Vector graphics – (SVG please)
  • Masking – Give me the ability to obscure part of the page or part of an image with a masking element
  • Additional controls – Every website doesn’t need to re-invent the calendar control, the menu and tabs. These should be standard. This is good for accessibility and semantic markup.
  • Columns – Give me the ability to layout and display multiple columns without using a custom Javascript function.
  • Effects -All those nice things I can do in Photoshop… Shadow, Reflections, Flips, Gradients, Bevels… on and on.
  • Aliased content – When an image is scaled it gets pixelated because most browsers use nearest neighbor scaling. I’d like my images and text to be anti-alised for a smoother look and feel.

Happy Holidays.

iTip – A Tip Calculator for the iPhone

Oct 07
2

UPDATE: We have a new and improved tip calculator. Get details and download the best iPhone tip calculator available.

Itip - Tip Calculator

Last night I coded up a simple tip-calculator for the iphone using the ‘web sdk.’ It’s very basic and allows you to easily calculate the tip and figure out how to split a bill between multiple people. It was mostly a learning exercise but it turns out to be somewhat useful. Add it to your bookmarks for easy access on the go.

  • The iphone uses a strange meta tag called a viewport to determine if content should be scaled.
  • You need to use the style default-width; and default-height to get the window to fill the screen.
  • If you give text fields special names like ‘zip’ you’ll get a number mode keyboard if you use ‘mobile’ you’ll get a telephone input keyboard. (no longer true)
  • Since the iphone has no text selection model there seems to be no way to move the text input cursor. I wanted to use the ‘telephone pad’ for all numeric input and then auto- place the decimal point into but I couldn’t get Safari to behave.
  • Webkit has some nice effects like rounded rectangles, shadows and more. Too bad it’s not part of all modern web browsers.
  • You can get the Address bar to disappear by placing an onload event on the body:
    onload=”setTimeout(function(){ window.scrollTo(0, 1);}, 1)”
    Note: This only seems to work if the window is large enough to scroll.
  • The EDGE network is slow enough without needing to load external files. Minimizing external calls to import CSS and Javascript and things will load faster, especially for one-page applications like this one.
  • Hope you like it. If you have tips for my tip-calculator leave comments.
UPDATE: We have a new and improved tip calculator. Get additional details and download the best iPhone tip calculator.

JavaScript rubber band

Aug 07
12

This is a simple Javascript rubber band funciton that I wrote. Typically an animation function moves directly from point A to point B. This gives a very mechanical feel. I wrote a very simple rubber band funciton. This animates an object with velocity. The object can overshoot the destination and bounce back. The further you drag the farther it bounces.

Grab this and drag

Tested and seems to work in FF, IE and Safari.

RIML – Reduced Instruction Markup Language

Aug 07
9

Traditional HTML is a “complex instruction set” language. It’s got tons of tags, properties, and semantic definitions.

What if there was a reduced instruction set markup language. The idea would be to come up with primitives that could be used to layout a page and try to design the language with the minimal set to express complex designs.

My primitives:

  • Point
  • Line
  • Box
  • Polygon
  • Circle
  • Text
  • Image

Pretty simple so far. Each has a set of properties some specific to the element some global:

  • Position (top/left/right/bottom)
  • Height/Width
  • Color
  • Rotation
  • Semantic description (optional)
  • Data (Rich text data, Image data, font data)
  • Actions (Hover/Click/Drag/Etc defined in a scripting language)

Any element can be nested within another element or within a set of elements. Existing styles and elements can be referenced across a page. Note: I’m not specifying common controls. These would be pre-defined styles using the same core-elements and actions.

Using this type of simple language you could build the foundation of a new type of web rendering engine.

This simplifies the implementation of the browser. This means you can express more complex designs in a simpler and more straight forward way. The core ‘brains’ of the design would happen at design time in a design tool rather then at run-time. The relationships, positions and attributes are not interpreted, cascaded or defaulted. This means you have a tool that better represents designer intent.

Why is this in my head today? Once again I’m frustrated by the lack of browser support for key design oriented features. Did I mention that I don’t think CSS is so hot? I also read the proposal for new HTML 5 spec and it’s more of the same. I’m not impressed. Designers deserve better.

Designing for column width

Apr 07
25
A newspaper column width is typically just under two inches. A paper back book is usually under 4 inches wide per page. The size of a typical computer display is climbing over 17 inches and this is isn’t necessarily a good thing.

Newspapers and books are designed to reduce eye strain and make it easy to read for longer periods of time. They do this by allowing several muscle groups in the eye to relax. In a newspaper your eye will track vertically down a column without needing to jog back and forth. The column width should be narrow enough to scan down. As your eye reaches the end of a line it moves straight down without slowing down. Because the lines are short you can ‘skim’ an article quickly without moving your eye left to right.

A computer article on the other hand isn’t as simple. The eye has to track horizontally across the width of the page. The movement isn’t smooth because when you reach the end of a line you have to change direction and scan back to find were the next line begins. Reading large amounts of content is much more difficult this way and can cause blurry eyes and general eye strain.

There are four core technologies that are needed to properly design for column widths. The first is the ability to layout and balance columns, the second is hyphenation. Recently the New York Times released an application that does both. This application fills a gap that CSS and the web haven’t been able to fill (yet).

Balancing columns means that you take two or more columns and you balance the number of lines in each column so that the combined columns form a box. This is a useful design tool because it allows you to have an easy to read block of text that’s sized to the available screen space.

When you start using columns you realize that there’s a problem. Long words will tend to end-up on a line by themselves. This looks silly and makes the document harder to read. The solution is hyphenation. When a long word is close to the edge of a column a hyphenation dictionary can determine where the word can be broken. A typical dictionary shows these possible hyphenation points as dots in the definition: hy·phen·ate. The hyphen gives the columns a better appearance and again helps your eye track to the next line.

The last missing piece are page jumps. What happens if you have too much text in a column? On the web the solution is to scroll. In a newspaper it’s a jump. A jump is a link to the place were the text continues. This allows you to put the important content up-front and keep the article details deeper in the site without needing to scroll.

Columns, hyphenation, balanced columns and jumps are all great design tools and they can be used in designs to make text easier to read.

Now if we could only get these features into the browsers ;)

Microformat UI

Feb 07
28

I’ve been having an interesting conversation with Alex Faaborg on the UI for Microformats. The UI explorations that he’s done are interesting but there is a problem. Not all Microformat UI should be presented the same way. In fact a uniform UI may limit the places that a web-designer can use Microformats. Instead of making the browser responsible for figuring out the right placement of the UI allow the page author to determine where the controls belong and provide the architecture to make consistency easy. In fact Alex illustrates this point very well in this article. Users want Microformat UI controls in the browser content and they want to control what it looks like.

In HTML there is a longstanding tag called <input> the tag gets input from the user and presents standard buttons, controls, etc. I would propose a complimentary tag called <output>. This would allow a page author to designate a location on the page that can output data to an external application such as a calendar, contact, etc.
This will allow the page author to specify where these features are and how they work to create the best user experience for that specific page. If the web-page is the application then the page author needs the flexibility to control the user experience. This will really help the adoption of both Microformats as well as a forward thinking browsers that supports such a tag.

What could such a tag look like?
<Output for=ID3 type=contact action=addContact showIcon=true iconWidth=16 iconHeight=16 value=”Add this contact to your address book” />

An alternative could be an extension of the Anchor tag…
<A for=ID3 type=contact action=addContact > <img type=contact width=16 height=16> Add this contact to your address book </a>
The ‘for’ is similar to the label attribute ‘for’ and associates the action with the microformat data. The action would be a pre-defined set of recognized and supported Microformat actions. The showIcon allows the browser to display the standard icon for an application. Note that the page author doesn’t know what application is being used so privacy is preserved.

Some possible issues that Alex brought up…

Consistency?
We need consistency and this is important but it should be a guidline not a rule. (Like the RSS icon). The browser chrome should stay out of the way of applications. Maps.google.com should be able to present contacts differently from people.yahoo.com. The page designer should be able to promote/demote the importance of a microformat action. If we paint all UI with the same brush it may hinder adoption. We can encourage UI consistency by providing good default styles and icons. We can also provide a standard and consistent menu such as File->Export ->Contacts as a fall back. If we force a particular type of browser UI into the page we will loose the possibility for consistency across browsers.

Barrier to entry?
By adding a single tag we have a very low barrier to entry. Sites that want to add it can do so easily.

Compatibility?
Non-compatible browsers will drop tags that they don’t recognize so the above examples can be backward compatible. You could go a step further and do something like:
<Output ><tag A/><tag B/> <NoOutput><A href=”AlternativeLink”> Download this contact </a> </NoOutput></Output>
Then A & B are used by browsers that understand the concept of Output and the link is shown by legacy browsers. This is the same trick that was used for Frames & NoFrames.

Security?
I agree that we need to think through the security vectors to make sure that we’re not exposing any applications to web vulnerabilities. However ‘security’ should not dictate how the design should work. The key thing for Microformat UI security is that an application can’t be launched through script, it has to be through a user action. (Like the file browse dialog or an RSS subscription). Don’t make the same mistake as Vista. Say no to confirmation dialogs, users don’t understand these and they get complacent and always press yes.

One final thought… We need to think about how a website can act as a Microformat consumer (not just a provider.) For example a site like LinkedIn or Basecamp should be able to be both a provider of Microformat data as well as a consumer of it. I haven’t seen anything on website being able to register to recieve Microformat actions but this seems like the logical step for Microformat UI,