[2.0] New default frontend template [dev:Yellowled & Don]

Mark threads with "[2.0]" for discussions about features in the longer-term future, "[1.6]" is for short-term. This is not the place for general discussions or plugin or template requests. Only features that are approved to happen by the core team should be listed here for better structuring.
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by yellowled »

Heads up, the demo blog is up and running: http://2k11.yellowled.de.

I am going to be posting in German there since I consider this to be a test blog, not a documentation blog. Documentation on GitHub is in English. Sorry for all the non-German developers and users, but running this as a bilingual blog would be way too much of a hassle for me given the fact that it it likely to be a temporary blog anyway.

YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by yellowled »

I guess the wave of feedback is fading. Apparently, everyone is quite happy with 2k11. Yay. :)

I started an issue tracker in the GitHub repository. As you can see, I have already addressed some issues. Also, some of these a merely reminders for maintenance tasks due before release (those are the ones I assigned myself to). Also, Garvin is already assigned to fixing the core navigation issue.

What's left are some things which need to change in the s9y core, core plugins or spartacus plugins. Most of these things I can't fix myself. Let me walk you guys through these:

1. Rather simple stuff

* The microblogging plugin uses border="0". That's deprecated HTML. Should be covered by CSS if necessary at all. (I guess I could even fix that myself.)
* The comment switch [theaded|linear] produces invalid HTML5. I'm not exactly sure what it is exactly.
* The quicksearch plugin's code is also not HTML5 compliant.

Before we even address code/HTML5 issues, we should maybe discuss how to … erm … organize this. Do we keep seperate HTML5 versions of the plugins and/or the core? Do we implement some kind of switch which makes core and/or plugins emit HTML5 code?

2. A bit more complicated:

* Category/comment nesting: I would love a simpler, better way to implement nesting for categories and threading for comments by emitting both as unordered lists. For example, nested categories should look like this:

Code: Select all

<ul>
<li><a href="#">Parent A</a></li>
<li><a href="#">Parent B</a>
    <ul>
    <li><a href="#">Child B1</a></li>
    <li><a href="#">Child B2</a></li>
    </ul>
</li>
<li><a href="#">Parent C</a></li>
</ul>
I'm not entirely sure whether this should also apply for comments – it would be very easy to style threaded comments that way, but I'm not sure an ul is the proper HTML element for this. Need to discuss this with @levito, who suggested this for comments.

* User styles: I would love to have an update-safe way for users to add their own styles, but the "old" way (BP, adding an additional user.css) is not very desirable since it's an additional HTTP request. Since serendipity.css is generated dynamically, I would assume there is some way to insert user styles, right?

I think that's it for the time being.

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by Timbalu »

yellowled wrote:* User styles: I would love to have an update-safe way for users to add their own styles, but the "old" way (BP, adding an additional user.css) is not very desirable since it's an additional HTTP request. Since serendipity.css is generated dynamically, I would assume there is some way to insert user styles, right?
But *the old way* is truly simple and even a user without knowledge can understand its purpose.
Its one more request for S9y then, what is the difference? Further html calls produce a 304 not modified, which is good. I dont think this really saves us enough of whatever to create another way of includement.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by yellowled »

Timbalu wrote:But *the old way* is truly simple and even a user without knowledge can understand its purpose. Its one more request for S9y then, what is the difference? Further html calls produce a 304 not modified, which is good. I dont think this really saves us enough of whatever to create another way of includement.
It is a performance issue. Additonal HTTP requests significantly slow down page load (yes, even in modern browsers). Since we also reference jQuery and since 2k11 also references an extra stylesheet from Google Webfonts (both in the head, which is even worse), an additonal HTTP request for a user stylesheet is definitely not a good idea, especially given the fact that 2k11 is supposed to support mobile devices to some extent. (Yes, I know – having a proper mobile connection and plan is the user's issue etc.)

It is bad practice, period.

Obviously, s9y plugins can add their own CSS rules to serendipity.css – why shouldn't templates?

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by Timbalu »

yellowled wrote:Obviously, s9y plugins can add their own CSS rules to serendipity.css – why shouldn't templates?
That is not the question. Sure we could find a way as requested.
Well, Plugins append it before the template style is loaded. That is not what you want.
IMHO, the easiest way to follow your request, is to say: "Hi User, if you really want some individual stylesheets, please append them to the end of 2k11_style.ccs".
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by yellowled »

Timbalu wrote:IMHO, the easiest way to follow your request, is to say: "Hi User, if you really want some individual stylesheets, please append them to the end of 2k11_style.ccs".
In my book, that would be the sane way to do this. Unfortunately, that's neither very convenient nor safe in case of an update, both potentially volatile factors for non-advanced users. Then again, 2k11 is never going to be as easy to handle for users as Bulletproof.

Hmmm.

YL
Mangek
Regular
Posts: 85
Joined: Tue Jun 24, 2008 1:08 am
Location: Sweden
Contact:

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by Mangek »

First of all, YL, the skin looks really nice and slick. Well done! :)
Timbalu wrote:"Hi User, if you really want some individual stylesheets, please append them to the end of 2k11_style.ccs".
This may be a silly idea, but would it be possible to include a blank user.css and modify it from the backend where you manage styles? Less hassle with having to upload files, and whatever you'd write there would be added after the default stylesheet. Maybe? :)
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by yellowled »

Mangek wrote:First of all, YL, the skin looks really nice and slick. Well done! :)
Thanks.
Mangek wrote:This may be a silly idea, but would it be possible to include a blank user.css and modify it from the backend where you manage styles? Less hassle with having to upload files, and whatever you'd write there would be added after the default stylesheet. Maybe? :)
No, because that would be overwritten with a blank user.css every time the template and/or s9y is updated. Also, it would still mean an unnecessary HTTP request.

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by garvinhicking »

Hi!

Yeah, the nesting has always been complicated. The problem is that it's REALLY expensive (performance-wise) to perform, and coding-wise also a bit tricky. For categories not so much, because we have a nested tree compatible structure. Nesting comments though might be nearly impossible to resolve without a LOT of headache...
* The comment switch [theaded|linear] produces invalid HTML5. I'm not exactly sure what it is exactly.
* The quicksearch plugin's code is also not HTML5 compliant.
Once you find the exact problem, drop a note :)

What's the current status on HTML5? Are there central issues with older browsers? Ideally I'd like the template to show up in IE6, even though not all functionality or looks would need to be perfect here.

If there's not much that breaks in "HTML5-only" mode, I'd like to only offer that.
* User styles: I would love to have an update-safe way for users to add their own styles, but the "old" way (BP, adding an additional user.css) is not very desirable since it's an additional HTTP request. Since serendipity.css is generated dynamically, I would assume there is some way to insert user styles, right?
Hm, but such a user.css would be HTTP-cachable. I don't see a reason not do do this. In fact, since this enables proper caching, it's even better than a global CSS file that gets rendered/calculated every time (due to event plugins).

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by yellowled »

garvinhicking wrote:Nesting comments though might be nearly impossible to resolve without a LOT of headache...
I guess we can do without the comments – it's working now, as you can see in the demo blog. :) Would be great for categories, though.
garvinhicking wrote:Once you find the exact problem, drop a note :)
Oh, I have it for both search and comment switch, I just have to find the time to write it down properly. :) (Might be hard over the next couple of weeks, though.)
garvinhicking wrote:What's the current status on HTML5? Are there central issues with older browsers? Ideally I'd like the template to show up in IE6, even though not all functionality or looks would need to be perfect here.
I would like to address this in a seperate post. Might take longer.
garvinhicking wrote:Hm, but such a user.css would be HTTP-cachable. I don't see a reason not do do this. In fact, since this enables proper caching, it's even better than a global CSS file that gets rendered/calculated every time (due to event plugins).
I know this sounds very much like a means to an end, but I would really like to stick to best practices as much as possible with this. Referencing more than two stylesheets in the head is not a good practice, period. In fact, I'm still not sure referencing Google's webfonts CSS is a good idea, but at least that's on Google's CDN …

Yes, it is cacheable – but that does not mean any visitor will already have a cached version of it. Also, how much does this really help if the rest of the stylesheet is rendered every time anyway?

I really don't want to open a huge can of worms here, but maybe we should even think about whether serendipity.css itself is still appropriate, if it is not cacheable? (Never really thought about this.) Do we actually need it? Apart from backwards compatibility, is there a good reason to render it dynamically? Why not include a static style.css from the template directory?

YL
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by yellowled »

garvinhicking wrote:What's the current status on HTML5? Are there central issues with older browsers? Ideally I'd like the template to show up in IE6, even though not all functionality or looks would need to be perfect here.

If there's not much that breaks in "HTML5-only" mode, I'd like to only offer that.
Okay. That's a huge topic I didn't think we'd have to discuss again, but here goes.

What is HTML5? It's a new doctype plus a bunch of new elements and some minor things like being able to omit the type attribute on script elements. Most of these things work in any browser. Basically the only issues are the new elements (like header, footer etc.) because older browsers don't know these, meaning they don't have any default styles for them. That's easy to solve – just add default styles to CSS, done. 2k11 does have those styles. It won't be an issue in any of the modern browsers – Firefox, Safari, Chrome, Opera, iOS, Android (basically anything which is updated regularly be the people using it).

Now, IE<9 is a different thing. It needs JS assistance. Basically, we have to "register" the new elements using the http://code.google.com/p/html5shiv/ – 2k11 does have it (via Modernizr). So in an IE<9 with JS disabled, this will break. There's no (sane) way around it. Boohoo.

(In fact, one could avoid JS by not using any HTML5 elements, but then one could stick with XHTML or HTML4 in the first place. I hope no one is seriously considering this an option. I don't. It's 2011, if you're using an old IE and disable JS, please leave the web.)

There are some HTML5 elements which will never work in these browsers unless one uses so-called polyfills to emulate them, i.e. audio/video. Polyfills, to cut it short, are JS fallbacks. So again, no JS, no fun.

Our third component is CSS. 2k11 uses some (layout) techniques which probably won't work in IE6. This means it will probably not be rendered correctly, but it's content may be still accessible. I really don't know because I have no IE6 on any of my machines, and I don't plan on installing one.

There are 2 alternative "solutions" for this. IE6 users can be prompted to install Chrome frame, which will "import" the Chrome rendering engine into IE6 (voodoo!), but I don't think many IE6 users would actually do that. Or IE6 users could be served a purely typographical stylesheet. That means no layout, no colors – no styling, but accessible content.

Let me be blunt: I will not make any effort to make this work in IE6. At all. Ever.

If it works by chance, fine. If it doesn't, I don't care. If this is a reason not to consider 2k11 as a new default, so be it. I also think if we don't switch s9y (and by that I mean core, plugins and default template) to HTML5 in the near future, it doesn't have much of a future.

Google has dropped IE6 support. Drupal has dropped IE6 support. Hell, even Microsoft is dropping IE6 support: http://www.ie6countdown.com/ (Yes, that's a site by MS.)

YL
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by Timbalu »

yellowled wrote:Google has dropped IE6 support. Drupal has dropped IE6 support. Hell, even Microsoft is dropping IE6 support
Yes, and don't forget, even Serendipity, the best blog software, has told us IE6 is dead and dropped some supporting issues this summer. ;-)
So, from my point of view, there is nothing to worry about and no discussion needed. IE6 will just show whatever it is able to. And this will be a lot, as far as I know the quality of YLs work.
E.g., my own html5 template uses the chrome frame drop in.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by yellowled »

Timbalu wrote:IE6 will just show whatever it is able to. And this will be a lot, as far as I know the quality of YLs work.
In fact, I did test the index page with browsershots.org and it did look okay besides the fact that the navigation wasn't properly formatted (no inline-block in IE6). But I didn't take a closer look for obvious reasons.

I want people to see a revamped s9y with a new default frontend (and possibly backend) template and go „Wow! That's great! I have to check it out.“ – in fact I have gotten a few reactions like that on 2k11 from non-s9y users.

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by garvinhicking »

Hi!

CSS needs to be dynamic so that plugins can write to it, period. :-)

I'm not okay with your statement "only one CSS file". In that matter you will not be able to provide update-safe CSS files, unless you create a custom plugin for that. Which is MUCH MORE overhead than a HTTP request for a CSS file that PHP not even touches.

About HTML5: I think that's okay for me then. Any other voices? As long as s9y has means for people to use XHTML/HTML4 templates if they want that, all should be fine.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: [2.0] New default frontend template [dev:Yellowled & Don

Post by yellowled »

garvinhicking wrote:CSS needs to be dynamic so that plugins can write to it, period. :-)
Personally, I see only one reason for that – backwards compatibility. In an ideal scenario (yes, I know we don't have an ideal scenario here), plugin would not provide any CSS styles, those would be covered by templates. Yes, I know it's a pointless discussion.
garvinhicking wrote:I'm not okay with your statement "only one CSS file". In that matter you will not be able to provide update-safe CSS files, unless you create a custom plugin for that. Which is MUCH MORE overhead than a HTTP request for a CSS file that PHP not even touches.
Remember back in the day when we didn't have the option to add a user.css at all? How did we even cope with that? :wink: Besides, I'm not stating "only one CSS file", I am stating "not (up to) three CSS files", which is a (small) difference. Let me mull a little over this.

Oh, by the way – according to Chrome's dev tools (assuming I don't misinterpret them), serendipity.css is fetched from the cache.
garvinhicking wrote:About HTML5: I think that's okay for me then. Any other voices? As long as s9y has means for people to use XHTML/HTML4 templates if they want that, all should be fine.
So what do we do about plugins then? At least some plugin would have to emit HTML5 code as well, otherwise the whole thing would be pointless. Do we maintain seperate legacy versions? Or do plugins have the ability to emit HTML4, XHTML and HTML5 code? Wouldn't that be bloat?

YL
Locked