Re: I hate complexity in HTML/CSS/JavaScript
Alex Clark <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <[email protected]> |
On 12/29/13, 11:03 AM, Asko Soukka wrote: > >>> On 12/28/13, 1:37 PM, Asko Soukka wrote: >>> >>>>> https://pypi.python.org/pypi/plonetheme.sunburst#how-to-depend-on-sunburst-for-your-custom-theme >>>> >>>> Thanks, one question: what does "Of course, the mycustom_skin needs to >>>> be registered too." mean in this context? I'm guessing this is a >>>> reference to a new-style theme layer and not an old-style portal skin? >>> >>> It means old-style skin, which can be created TTW from properties tab in portal_skins. >>> >>> In new resource registries all resources must be mapped into "bundles". Bundles are then mapped into skins so that each skin can include multiple and overlapping bundles. Cooked css/javascript will then include all resources from all bundles mapped for the currently active skin. Very flexible, but a bit complex and pain to manage both TTW or using GS-XMLs. >>> >>> Of course, all stuff related to skins and resource registries must be managed manually TTW or with GS-XMLs (there's no automation for them in p.a.theming). >> >> So the "best practice" [1] is to copy <head> from content to theme via >> Diazo rule and then make sure the appropriate bundles are included in >> <head>? > > Well, it feels the only sane way, if you need sunburst styles within your theme and don't want to export/sync them manually. The easiest way, of course, is to have unthemed Plone for logged in users, but that would take away Plone's "edit pages in their context" magic. > > And, currently, that rule is there already when you create new theme TTW with p.a.theming's theme editor. > > If it really seems that there is no new solutions for this, besides toolbar, maybe we should add registries+bundles+skins-integration for p.a.theming[plugins?] so that each theme would have implicit skin with the default + theme specific bundles in place when theme is activated. Right. Would it make any sense in the interim to release a plonetheme.sunburst_edit_ui theme that performed the customizations described in https://pypi.python.org/pypi/plonetheme.sunburst#how-to-depend-on-sunburst-for-your-custom-theme ? It seems to me that Plone 5 should consist of a new base theme containing a nice edit UI as well as a new Diazo theme in order to fix these issues. And a new plonetheme.sunburst_edit_ui base theme could get us half way there until Plone 5 delivers the rest. In fact, that seems to me to be the only clear thing that everyone agrees should be done. Both p.a.toolbar and widgets could probably wait to go in the core indefinitely, until there usefulness becomes more apparent, yes? Conceptually this is fairly easy to explain to Diazo theme developers: - Prepare HTML/CSS/JavaScript mockup. - Incorporate your HTML/CSS/JavaScript into a Diazo theme with resources managed entirely by Diazo (i.e. no resource registries, yet) - To use Plone edit UI, nclude a rule to append, before, copy or replace css:content="html head" to css:theme="html head". This should get most folks most of the way, correct? Any issues with JavaScript included in Diazo themes can be easily resolved because everything coming from Plone must be included (including add-on-registered JavaScript.) This will force theme editors to resolve conflicts directly in their Diazo theme (e.g. OOPS I included a jquery version that is too new. Or, OOPS my wacky JS library conflicts with Plone's JS.) It's not as sexy as some of the other proposed fixes, but it feels like something everyone can get their head around. Presumably Mockup HTML/CSS/JavaScript are included in the Plone 5 Base Theme, and in Plone 6 we remove the need for a portal_skins base theme? (No idea, conceptually, how to do that.) > > -Asko > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > -- Alex Clark · http://about.me/alex.clark ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk