On 02/06/12 10:04, Brion Vibber wrote:
I think there's two main parts to this: chrome and content.
Chrome is usually skin-provided stuff like the menus, sidebars, etc -- and we rearrange that dramatically for mobile, hide it for print, etc. The existing skin system seems to be able to handle this as we're seeing with the migration of MobileFrontend to using skins. Yay!
Content would cover things like numbered [1] links being expanded in a list in print mode -- we accomplish this today by hiding the list of links via CSS in non-print views.
For example, references should really be similarly treated: on desktop/tablet and mobile views they should pop up inline when you click them, while for print we really do want the big lists of refs so they make it to output. Potentially we can also have smarts for dealing with video or animated content with "flat" alternate content for print -- such as separating an animated diagram into multiple diagrams in print version.
This sort of thing can be accomplished by pure CSS -- having standard classes that hide things on mobile or on print -- or slightly more complicatedly with more parser fun having output format knowledge or replacement chunks... I think I recommend using CSS to avoid complicating things. ;)
We *must* hide them only with CSS. Remember that if the user clicks print without going first to printable version, we shall show them all the references.
Printable version is just a way to show in screen something similar to what would be printed. It shouldn't be a View nor have an independent class file. Hey!, printable could even be entirely handled by the ResourceLoader.