iPad Keynote issues

May 14th, 2010
KeynoteImage via Wikipedia

A lot has been said about why Keynote on the iPad is bad. I agree that most of the issues mentioned are a problem, but there are just a few I really care about:

  1. No presenter notes. I like my numbers in notes and not on slides. In case anybody asks I’d like to be able to check the screen and tell them. How about a drawer similar to the slide index that comes from the bottom of the screen? Oh, and not removing notes on import…
  2. Can’t see which slide I’m on. I have the problem of checking the projection as it is, I don’t need the software to make me do it even more. This is also problematic when using “the laser pointer” – you have no idea what you’re pointing at unless you check the projection. I could do with a faded slide in the background.

Most of the others would be nice to have, but these are just a big pain. Until they’re fixed the iPad to VGA connector was just a waste of money…

Enhanced by Zemanta

Update

May 4th, 2010
Image representing iPad as depicted in CrunchBaseImage via CrunchBase

I’ve been trying to write something for some time now. As I obviously suck at blogging I decided to just post this short list of stuff that happened in between.

  1. I now work part time at Zemanta. I’ve also downgraded to Head of Frontend as knowing everything as VP Engineering would be kind of hard. This gives me more time to work on my own projects.
  2. I’ve been to Seattle for An Event Apart and I have proof. It was a great conference and I’m writing a review post. It’s taking more time than I expected. I should have known better.
  3. I’ve been to Phoenix for IASummit. Another great conference and a great community. The closing plenary by Whitney Hess made me want to go again next year and help out. I promised to write a rookie review, but haven’t yet. I also hope to make it a review post.
  4. I have an iPad. I love it. I should write a post about it but I probably won’t. First observations? I tweet more. I attribute that I’m chattier on Twitter to that and to the conferences. I need to upgrade my blog so I can blog from it. Maybe then I’ll blog more.
  5. At An Event Apart Jeremy Keith said that it would be lovely if somebody made a tool that would check HTML5 for more than the validator does. I did the first version on the plane (SEA-PHX and PHX-ZUR). Marko Samastur wrote most of the Django app and it’s now online at http://lint.brihten.com. It has an API and will be opensourced soon. It is the first MMM project.
  6. I started thinking of doing something very cool next year due to Andy Budd‘s convincing at the IASummit karaoke, hosted by the very cool Kevin M. Hoffman. I shall disclose the details at a later date, but it will be also a MMM thing.
  7. EuroIA call for papers is open and it will only be open until Sunday, May 16 24:00 CET. The conference will be in Paris in September and I think you should check it out.

Enough about me, how about you? Who am I kidding, there’s no one out there…

Enhanced by Zemanta

jQuery 1.4 and 1.4.1 considered harmful – use jQuery 1.4.2!

February 24th, 2010

I never thought I’d write a “considered harmful” post, but this is really way too serious.

Do not use jQuery 1.4 or 1.4.1 with user generated content!

jQuery 1.4 branch added some great stuff, but let a really ugly bug through. Something that you could call jQuery injection.

replaceWith: function( value ) {
	if ( this[0] && this[0].parentNode ) {
		// Make sure that the elements are removed from the DOM before they are inserted
		// this can help fix replacing a parent with child elements
		if ( !jQuery.isFunction( value ) ) {
			value = jQuery( value ).detach();
		}
...

With previous versions you could easily do $('#myElement').replaceWith('some text'); to replace the selected node with a text node. In jQuery 1.4 and 1.4.1 you can’t – but just failing does not constitute a huge bug.

If you take a good look at the code above you can easily find that if value passed is a string that looks like a selector, it will detach nodes from the document. Consider calling $('#myElement').replaceWith('html'); – the screen goes blank and everything the user has been working on is gone.

Fortunately…

jQuery 1.4.2 fixed this issue by properly using detach only when value is not a string. If you are using jQuery 1.4 or 1.4.1 and for some reason cannot upgrade to 1.4.2 (or just don’t want to), you can still just copy the whole replaceWith method from jQuery 1.4.2 to your version.

Reblog this post [with Zemanta]

Setting innerHTML wraps content with DIVs!?

February 24th, 2010

Trying to add some HTML to an element with innerHTML and weird stuff happens in Firefox (3.5, 3.6)?

var elm = document.getElementById('myElement');
elm.innerHTML = 'Test';
alert(elm.innerHTML);
// alerts '<div xmlns="http://www.w3.org/1999/xhtml">Test</div>'

I just figured out the problem is that one of myElement ancestors is attached to a table as a non-table element. In my case there was a div attached to a tr. Changing that div to td fixed the problem.

And they say web development isn’t full of surprises…

Reblog this post [with Zemanta]

Screwing up conversion rates

January 31st, 2010

By far the best way to screw up your conversion rates is to go mainstream.

Traffic - conversion graph

The traffic graph is the number of visitors per day while the conversion rate is the percentage of the visitors converted. When you go mainstream your traffic will spike and plateau at a lower level a few days later. This will screw up your conversion rate. Don’t worry though – figure out who the visitors are and fix your landing pages to target them as good as you can.

This graph obviously focuses on start-ups that have a huge conversion rate at the beginning as most of the conversion happens on tech-news sites and only already “converted” people get to your page – conversion rates of 80% are common in such cases. It should also be valid for later stage companies, but you need to adjust the conversion rate numbers. Another fact of conversion rates is that as your number of visitors grows your conversion rate will drop due to the fact that more users will be “just browsing” (think about a store in a mall).

If you don’t belive me think about the what the Twitter homepage looked like in time. The first one I saw had the public stream on it – geeky as hell. They changed that into a still somewhat geeky homepage that explained what Twitter is and helped you register. The latest one is almost non-geeky and focuses on real-time search and has a prominent sign up button.

Reblog this post [with Zemanta]

Fluid searchbox

October 4th, 2009

There’s been a lot of fluid layouts recently. When you use a fluid layout it’s hard to make everything fluid as you need to stretch certain elements and have other elements fixed.

I was approached some time ago by a designer who was working on a fluid design but was having problems with a HTML/CSS only solution for a fluid searchbox. The idea to create a searchbox that grows when the window grows is simple, but becomes a tad more difficult when you add stuff to the left and right of it, some being fixed width (width in px or em) and some fluid width (width in %).

As I like challenges I took it on and produced a sample that worked on most modern browsers in a single evening. They didn’t like it because it didn’t work in IE7 (cause I never checked it) even though the fix for IE (it was only IE7 that didn’t work) was trivial. After a while I went back and checked it out again, changed the code a bit and I think it’s much better now.

The simple form

Creating a fluid search box when you only have a single element next to it is trivial. What you do is wrap the input in an element and use padding to create space for the fixed element, then position the fixed element absolutely (or relatively) in the space created by the padding.

HTML:
<fieldset>
	<div>
		<input type="text" name="q" value="" />
	</div>
	<input class="s" type="submit" value="Search" />
</fieldset>
CSS:
fieldset {position:relative;padding:0;}
div {padding-right:6em;}
div input {width:100%;}
input.s {width:5em;font-size:1em;position:absolute;right:0;top:0;}
Sample

You could target the input with input[type=submit] but that wouldn’t work in older browsers.

A complex form

The complex form from the intro includes a title, a search type drop-down (select element), the input box and a submit button. This gives us four elements, two of which are fixed and two fluid – and more stuff to hack around.

HTML
<fieldset>
	<div class="l">
		<span>Find</span>
		<select name="type">
			<option>in Books</option>
			<option>in DVDs</option>
		</select>
	</div>
	<div class="c">
		<input type="text" value="" name="q" />
	</div>
	<div class="r">
		<input type="submit" value="Search" />
	</div>
</fieldset>
CSS
fieldset {margin:0;padding:0;position:relative;border:0;}
fieldset .l {height:0;}
fieldset .l span {width:3em;display:inline-block;}
fieldset .l select {width:10%;}
fieldset .c {margin:0 60px 0 4em;padding:0 .7em 0 10%;}
fieldset .c input {width:100%;}
fieldset .r {position:absolute;right:0;top:0;}
fieldset .r input {width:60px;}
* html fieldset .l {float:left;width:100%;margin-right:-100%;}

The basics

I created three elements that help me align elements. I’m using classes l for left, c for center and r for right. The left element includes the title and the type, the central element includes the search box and the right element includes the submit button.

fieldset .l {height:0;}
fieldset .r {position:absolute;right:0;top:0;}

The left element has its height set to 0 so it seemingly doesn’t take any space. The central element includes the input and needs no special positioning, while the right element is positioned similar to the simple solution – absolute and set to right.

The surrounding elements

You can set the width of these elements in any unit you like. I set the width for the span element in em, type drop-down in % to make it fluid and submit button in px.

fieldset .l span {width:3em;display:inline-block;}
fieldset .l select {width:10%;}
fieldset .r input {width:60px;}

The only thing you need to do in CSS is set the width to these elements. You need to set the display property on the span element to work around the fact that inline elements don’t allow setting of width.

The fluid input

fieldset .c {margin:0 60px 0 4em;padding:0 .7em 0 10%;}
fieldset .c input {width:100%;}

The input needs its width set to 100% so it will stretch the whole available width of the parent. That happens due to the fact that block-level elements will grow to 100% automatically and the margin and padding will “shrink” its contents. This allows setting the spacing in two different units – one for margin and one for padding. If you look at the CSS rule, you’ll see that the widths are similar to those set for the surrounding elements – of course with some spacing added.

  • Right: 60px margin (width of the submit button), .7em padding (spacing)
  • Left: 4em margin (3em for the title + spacing), 10% padding (type select width)

The browsers

You can check out a sample page with the complex form. Working on Windows I’ve tested it in these browsers:

  • Firefox: 2.0, 3.0, 3.5
  • Opera: 10
  • Safari: 4
  • Google Chrome: 3
  • Internet Explorer: 8 (with its rendering of IE7 Standards and Quirks)

As always at least one browser had to fail – IE6 did. The problem was height:0; as IE6 will render elements as high as their content. We can work around this by changing the way we make it zero width/height so it doesn’t affect the central element.

* html fieldset .l {float:left;width:100%;margin-right:-100%;}

I’m using the IE6 CSS filter to target IE6, you can use conditional comments or whatever you like best. The rule floats the element left, making it 100% wide, but resets the position by setting the right margin to -100%.

As I’m using display:inline-block; this will work a bit different on browsers that don’t support inline-block. In Firefox 2.0 you can use display:-moz-inline-box; in the rule for the span, but make sure you put it before the inline-block.

fieldset .l span {width:3em;display:-moz-inline-box;display:inline-block;}

Last words

You might want to fix some stuff in some browsers so everything aligns nice. The techinque used is derived from the multi-unit any-order column layout by Eric Meyer as it opens your mind on how to use multiple units in a single layout without fuss. I’ve tried all the browsers I have on my dev machine and I’m not saying it works everywhere. If you find a browser where it doesn’t post a comment; if you find a better way of doing things also post a comment.

Reblog this post [with Zemanta]