S5 1.1a5
Published 20 years, 3 days past
Hey, we’re moving quickly: S5 1.1a5 is now up. The current testbed file uses XHTML 1.0 Transitional, the better to accomodate the “allow external links to open in new window” feature I added with prompting from Peter Murray and assistance from Dave Marks. I’m thinking about generalizing the routines to just mark any link that starts http://...
as an external, window-spawning link, but that to me seems a little too intrusive. I tend to think it’s better to let the author mark which links should spawn new windows, and which should not. If I’m wrong, let me know.
Among other bug fixes: incremental slides now wind and unwind correctly, and don’t leave the last point on the slide stuck in the “current” state even when you loop through the slide show more than once. The show/hide for the controls has a slightly different behavior now, so I’m looking for feedback there.
The last bug I want to squash before exiting the alpha stage is that in Safari, when you click on an “external” link, it still advances the slide show one step. All other browsers I tested (IE/Win, Firefox) didn’t, as was the intent. I can’t quite figure out how to fix Safari’s problem, which seems to center on the new hasValue()
function.
(singing) Beta slide show, here we come…
Comments (24)
Trackback ::
box of chocolates: Derek Featherstone's blog, where you never know what you're going to get
S5 and Incremental Rendering of Graphics
Summary: A technique to use S5 to incrementally render graphics for presentations.
Some time ago, I stumbled upon a piece of javascript, which used the rel property to make external links, keeping the document strict-valid.
Sorry to say, I can’t find it again, but maybe someone else seen it (or something like it).
It made all links with rel=”external” open in a new window – don’t know whether or not it’s something you’d consider using in S5 – just thought I’d mention it.
Kind regards
See my post on the last post Michael
Michael: What Dave said, or look at the JS source on the current version, which contains that very routine. (Thanks to Dave, who pointed it out to me!) I dropped back to XHTML 1.0 Transitional because Firefox appeared at one point to be refusing to deal with
target
attributes ona
elements in a Strict document. If I find that they work now, I may ramp back up to Strict in the beta phase.Feature request: some clever way to handle blockquotes and attribution, where the attribution isn’t necessary a URL (I don’t really know why the cite attribute is defined as a URL).
A little more detail about what you’re requesting would be helpful, Bruce. It won’t show up in 1.1, but there’s always 1.2…
I’ve, in the past, have had troubles w/ Safari obeying me when I tell it to “e.preventDefault()”. That might be something to consider when looking into your external link bug.
My favorite way to make links popup is to use a little onclick modifier. <a class=”externallink” href=”whatever.html” onclick=”window.open(this.href); return false”>popup in new window</a>
If you really wanted to, you could use some DOM javascript to getElementsByTagName(“a”) and check the className property to assign the onclick function.
Have you considered some kind of plugins mechanism? Some people may want effects (such as wiping transitions and other such oddities) which aren’t really suitable for the core distribution but would work well as plugins. If there was a simple, understood mechanism for implementing these (add the class “plugin-fadewipe” to a slide div, then link in “plugins/fadewipe.js” for example) people could start writing their own extensions separate from the main distribution.
Eric: on blockquotes and attributions, I’m just looking for the cleanest (simple, and semantic) way to get output something like this on a slide:
I currently am doing by using a div with a “quote” class, and then within that having another “attribution” div with a cite element. I’m thinking there’s likely a more elegant way, however. I’ve seen a few things on the web, for example, that use some clever CSS to take the content in a blockquote cite attribute and render it after the quote. I don’t have the url handy, but can dig it up later if need be.
Oh, BTW, it’d be nice to have a preview option on comments. Am not sure how this is going to render.
This gets around the Strict validation…
function popup(url) {
window.open(url);
return false;
}
<a href=”http://www.mydomain.com” onclick=”return popup(this.href);”>my domain</a>
… not exactly what you’re looking for, but it’s a start.
Not sure if this is intended, but once you’ve backed up from a slide that the first element is set to inc, you’ll have to click (or press right arrow) twice to get pass the first element
Step To Reproduce (in IE 6 and Firefox 1.0 on Win2000) :
– Load the testbed
– Right Arrow (or Click) twice, now your at the slide “Operatic Origins”
– Right Arrow once, now you have highlighted “Allows a single XHTML document to be turned into a PowerPoint-like slide show”
– Left Arrow once, now you’re back at the slide “What Is S5?”
– Right Arrow once, you’re at “Operatic Origins” with “Allows a single XHTML document to be turned into a PowerPoint-like slide show” highlighted
– Right Arrow once more, the “Adding screen and print style sheets allows for multi-medium views of a single document” should be highlighted but instead it’s still at the first one, you’ll have to Right Arrow once more to get to the one you intended
You can do the same thing slide 3 so I don’t thins it’s related with psf
Bruce: I’ll have to think about that after 1.1 is finished. Sorry about the lack of preview, but I haven’t had time to find a plugin that will do it on my hacked-up copy of WP. I have these dreams that WP 1.3 will just have the capability built in and ready to turn on…
WysG: Hm, yes. That was unintended, and will need to be fixed. Great catch!
When I open the testbed in Firefox, reveal the controls in the lower right corner, click the toggle button (or whatever it is called), I end up in the ‘Basic Page Style View’. There, I cannot find a toggle button to go back to the ‘Slide View’. I found that going in the Firefox menus selecting View/Page Style/No style, revealed the toggle button, but it doesn’t do anything.
So, there’s no way to go back to the slides without going back to your blog entry and reloading the testbed.
This is not how it was before, is it?
Michaël: It may not have been that way before. That was caused by a desire to not have all of the “layout” stuff appear in the outline view. I’ve adjusted
outline.css
to let the toggle button show even in outline view. Note, however, that you can always toggle the views with the “T” key on the keyboard, whether or not the link is visible.The CSS would have been more straightforward if the controls
div
were outside the footer, structurally speaking, instead of inside it. Theme authors: would it be a major problem for you if I move the controlsdiv
out of the footerdiv
in v1.1? If it will be, or you aren’t sure, say so and I’ll push the change off until later. I think it’s going to have to happen eventually, so if you can make the change easily, it seems to me that now is the time to do it.Please don’t use the
target
attribute! I will decide when I want a new window to open, not you. I wrote a rant about the target attribute recently, which covers many reasons why it should not be used, but also gives a solution for those that are annoyed by it as I am. I recommend you return to a strict DOCTYPE, and indicate external links using some other means, such as an icon, different colour, italics or whatever alternate style you like. HTML 4.01 Strict would be best, though I’m sure you would have read all the arguments for and against serving XTHML astext/html
, so I won’t bother ranting about that too.i’m getting [] [inc] and [current] showing up in light red during the slideshow. they cannot be selected but are present. i have a screen cap if needed, i’ve cleared my cache and the problem remains, and disabled obvious extensions that may have been the cause such as linkification.. but still remains.. or am i supposed to be seeing them on the test bed?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Matt, they are supposed to be there, obviosuly for development purposes. This line of CSS at the end of pretty.css adds displays the class within square brackets after each list item, as you are seeing.
li:after {content: " [" attr(class) "]"; color: #F88;}
thanks Lachlan, not to up on my css, and when i checked the page in IE (sp2) they didn’t show up at all.
Lachlan: sorry, but the external-link window spawning stays, as it is entirely in keeping with the goals of this project. The external-link window spawning’s purpose is to allow a presentation author, who is most likely the person that will be using the file, to define which links are external to the slide show, and should thus spawn new windows. As Peter Murray pointed out in posts on 1.1a4, not doing so means that if you follow an external link and then hit “Back” to return to the slide show, it resets itself to the title slide, which is clearly unacceptable.
In other words: the author is, most of the time, the user, and decides when he will spawn a new window. Obviously, when you create your own presentation, you can choose to not mark any of your links as external, and handle the “reset avoidance” problem your own way. Granted, if a presentation is put online for public consumption, the spawning may be inflicted on others. For those who really dislike spawning, there are the solutions you documented. Theme authors could also distinctively style external links if they like in order to provide some warning. Perhaps I’ll add a class to any external link so that IE/Win will be able to style such links.
Remember, the goal of S5 is to provide a lightweight presentation solution, not to be a well-behaved (for certain definitions of “well-behaved”) Web denzien. Its primary use case is to be operated by the file’s author on a known machine with a known resolution. The only reason I added font scaling was to account for unexpected projector resolutions (“Oh no, I wrote this for 1024×768 and the projector only goes up to 800×600!”). It had basically nothing to do with the variegated nature of user agents on the Web.
Matt: no, those won’t show up in IE/Win, because it doesn’t support generated content. It doesn’t have to, since as Lachlan pointed out, those class names are diagnostic– they help me see how the JS is altering class names on incremental slides– and won’t appear in the final version.
This validates as strict, and degrades gracefully:
<a href=”http://www.example.com/” onclick=”if (window.open) {window.open(this.href);return false;}”>Example Destination</a>
Also, yes the author should be able to pick which links open in a new window.
Re: controls outside the footer – absolutely! I’d like to be able to eliminate the header/footer on slide#0 and that’s much harder to do if the controls are embedded in one of them. The layout of the zero slide is often standard for the event it’s given for, but the content slides are at the presenter’s discretion.
First off, really great work on this project Eric.
I’d like if holding down the right/left arrow acted for multiple strokes – at the moment if you hold it counts for a single hit. Changing this would make it more user-centric IMO.
Good luck with the project.
Yeah, Good luck with the project. Keep it up!! :)