{"id":16414,"date":"2010-06-01T20:36:14","date_gmt":"2010-06-02T03:36:14","guid":{"rendered":"http:\/\/blogs.adobe.com\/jnackdev\/2010\/06\/feedback-please-html5-layers-in-photoshop.html"},"modified":"2024-06-19T14:06:18","modified_gmt":"2024-06-19T21:06:18","slug":"feedback_please_html5_layers_in_photoshop","status":"publish","type":"post","link":"https:\/\/jnack.com\/blog\/2010\/06\/01\/feedback_please_html5_layers_in_photoshop\/","title":{"rendered":"Feedback, please: HTML5 layers in Photoshop?"},"content":{"rendered":"<p>Let&#8217;s start by acknowledging that A) I&#8217;m possibly totally crazy, and B) what I&#8217;m describing may well never happen.  I want, however, to present an idea that you might find interesting.  Whether it&#8217;s worth pursuing is up to you.<\/p>\n<p>What if Photoshop implemented native HTML as a layer type?  Just like the app currently supports special layer types for text, 3D, and video, it could use the WebKit engine (which CS5 already <a href=\"http:\/\/blogs.adobe.com\/jnack\/2009\/12\/webkit_creative_suite_extensibility.html\">embeds<\/a>) to display HTML content.  Among other things you&#8217;d get <strong>pixel-accurate Web rendering <\/strong>(text and shapes); the ability to <strong>style objects via CSS<\/strong> parameters (enabling effects like dotted lines); <strong>data-driven 2D and 3D graphics<\/strong>; and <strong>high fidelity Web output<\/strong> (HTML as HTML).<\/p>\n<p>On a really general level, I&#8217;m proposing that Photoshop enable <strong>programmable layers<\/strong>, opening the door to things like much smarter objects&#8211;everything from intelligently resizing buttons (think 9-slice) to smart shapes <a href=\"http:\/\/www.youtube.com\/watch?v=2qZgT3fnwOU#t=1m26s\">as seen in FreeHand<\/a> and Fireworks.<\/p>\n<p>If this sounds interesting, please read on in this post&#8217;s extended entry.<\/p>\n<p><!--more--><\/p>\n<hr>\n<p>For a real-world example, let&#8217;s say that Finn (designer) and Henry (coder) are collaborating on the design of a Web site.  Here&#8217;s how I&#8217;d imagine their interactions:<\/p>\n<ol>\n<li>Finn comes up with a design for a great new UI elements (e.g. a calendar).  He creates the artwork in Photoshop but doesn&#8217;t try to get into assigning behaviors to it.  Instead he hands the assets to Henry.<\/li>\n<li>Henry uses an HTML editor to turn art into art + logic.  (You do <em><strong>not<\/strong><\/em> use Photoshop for writing code.)  This will now be the standard calendar implementation they&#8217;ll use many times over.<\/li>\n<li>Henry puts the widget into a location that Finn can browse from within Photoshop (e.g. via a Library panel or Mini Bridge).<\/li>\n<li>Finn can now drag instances of this widget onto PSDs.  When he resizes it, it does whatever the right thing is according to its rules (e.g. popping open to reveal a second month).<\/li>\n<li>Photoshop should be good at editing appearances, not at tweaking code.  If Finn wants to re-skin the calendar, he can do one of two things:\n<ul>\n<li>Pop open the graphical pieces, editing them just as one would edit bitmaps linked from any other piece of HTML.<\/li>\n<li>Use the Photoshop properties inspector to tweak whatever parameters Henry has chosen to expose.  We could possibly also enable parametric editing of CSS values, using a UI much like the one in Dreamweaver.<\/li>\n<\/ul>\n<\/li>\n<li>Upon finishing a design, Finn can <strong>hand it off and keep code intact<\/strong>.  That is, instead of Photoshop delivering a picture of something, it would actually <strong>emit <em>the thing itself<\/em><\/strong>.  A critical distinction is that it would <strong>not be trying to generate code<\/strong>; rather, it would be simply giving you back your code with whatever parametric tweaks you permitted (scale, CSS values).<\/li>\n<\/ol>\n<p>As for &#8220;intelligent&#8221; artwork&#8211;shapes that contain internal logic&#8211;here are some examples:<\/p>\n<ul>\n<li>Buttons that automatically resize to match text contents.<\/li>\n<\/ul>\n<ul>\n<li>A rectangle knowing that it&#8217;s a rectangle, such that it can correctly preserve the radii of rounded corners).<\/li>\n<li>A scrollbar featuring scroll arrows &amp; a scroll thumb, where the thumb moves\/scales appropriately as the scrollbar is resized.<\/li>\n<li>Arrowheads that can scale and orient themselves according to path size &amp; direction.<\/li>\n<li>Gradients that can be made to fit object boundaries.<\/li>\n<li>Objects that include multiple states (e.g. buttons that can be set to &#8220;enabled&#8221; or &#8220;disabled&#8221;).<\/li>\n<li>A tab bar that automatically grows\/shrinks\/hides content based on overall dimensions.<\/li>\n<\/ul>\n<p>Desired characteristics:<\/p>\n<ul>\n<li>It should be easy to add instances of objects, either by choosing items from a list (e.g. a library) or by drawing them directly on canvas.<\/li>\n<li>It should be easy to modify objects by directly interacting with them on canvas (e.g. free transforming; clicking a point and dragging to modify a corner radius).<\/li>\n<li>It should be similarly easy to modify objects through a properties inspector (e.g. changing number of nodes in a shape; changing the values or data source of text fields).<\/li>\n<li>The set of objects should be easily extensible.  You want to go to Y! UI or Ajax Rain and grab some great accordion?  Done: now that&#8217;s an intelligent element in Photoshop, and its developer could easily define the set of parameters she&#8217;d like to expose in the properties inspector.<\/li>\n<\/ul>\n<p>With HTML we&#8217;d be embracing an <strong>open, and open-ended, system<\/strong>.  Instead of trying to make just nicer rounded rectangles, or some other closed handful of objects, Photoshop would be ingesting whatever components one can develop for a modern Web browser.  We&#8217;d get various advantages like network awareness (e.g. I could pull data feeds into a live chart on a layer, or maybe embed a Flickr query or a Google map) plus Web-browser-standard text rendering.  As things like the Canvas tag grow richer, so too will what these layers can display.  Who says they have to be limited to showing simple widgets?  Why couldn&#8217;t one create a particle system-based drawing tool that plugs into PS?<\/p>\n<p>Note that HTML layers are by no means the only way to enhance Photoshop&#8217;s design chops, and we know that there are plenty of other improvements (adding type styles, improving vector drawing tools, etc.) to be made.  If you like this idea, though, please speak up; same goes if you think it would be a waste of time.  We&#8217;d be grateful for your comments below, and I&#8217;ve posted a <a href=\"http:\/\/www.surveymonkey.com\/s\/ps_html_layers\">two-question survey<\/a> to gather quick feedback.<\/p>\n<p>Thanks,<\/p>\n<p>J.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let&#8217;s start by acknowledging that A) I&#8217;m possibly totally crazy, and B) what I&#8217;m describing may well never happen. I want, however, to present an idea that you might find interesting. Whether it&#8217;s worth pursuing is up to you. What if Photoshop implemented native HTML as a layer type? Just like the app currently supports [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[34,1],"tags":[],"_links":{"self":[{"href":"https:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/posts\/16414"}],"collection":[{"href":"https:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/comments?post=16414"}],"version-history":[{"count":1,"href":"https:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/posts\/16414\/revisions"}],"predecessor-version":[{"id":21970,"href":"https:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/posts\/16414\/revisions\/21970"}],"wp:attachment":[{"href":"https:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/media?parent=16414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/categories?post=16414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jnack.com\/blog\/wp-json\/wp\/v2\/tags?post=16414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}