WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12902 closed enhancement (fixed)

Ticking the boxes for Twenty Ten: Some areas for improvement

Reported by: demetris Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Themes Keywords:
Focuses: Cc:

Description

Not all of us had envisioned the new default theme in the same way, but, I think, there are a few characteristics that, more or less, all would consider essential in it.

The new default theme should be:

  • modern
  • simple
  • customizable
  • educational...


... and, of course, something that people will enjoy using.

With these aims in mind, I have noted a few areas where I think Twenty Ten can be improved easily.

1.

Busy typography. While the design of 2010 is simple, clean, and modern, typography seems busy to me at this point: There are too many combinations of font-family (serif and sans-serif), size, style, and colour. See this example post:

http://op109.net/2010/01/html-elements/

There are also inconsistencies: Some headings are styled in serif, others in sans-serif.

2.

Fancy strings. A basic theme, that, among other things, wants to be as easy to translate as possible, should not say things like “This entry was posted in x and tagged y, z”, etc. It should prefer simplicity and clarity: “Categories: Cooking, Eating. Tags: salad.” etc.

3.

Fancy functionality. “Also tagged x, y, z” (in 2010’s tag archives). What’s the practical benefit of that? If we wanted to offer a useful extra, there are lots of better things to do. For example, a function that adds a CSS class to the tag whose archive is viewed. But even that would be too much for the basic, default theme, whose functions.php should not be overcrowded.

4.

More fancy and unneeded functionality. Does the default theme need to modify the default length of the autogenerated excerpt? What do we have plugins for?

5.

Uninviting code. header.php is one of the first theme files people look at. In Twenty Ten it greets you with a large block of conditional logic that is not attractive to look at. If we want to make good use of functions.php, here is a good candidate. (And we don’t need to reinvent the wheel for that. There are already several good implementations for assembling the document title conditionally. See, for example, Tarski’s filterable tarski_doctitle, or Thematic, which starts from Tarski’s function and offers its own alternative.)

See also this ticket: #12370.

6.

More uninviting and illegible code.

"<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">"

What the ...? Who cares how the generated HTML aligns?

7.

Options page. More and more themes have an options page, yet there is no simple authoritative implementation for theme authors to start from. Twenty Ten is ideal for this role: An options page that uses the Settings API and offers a few selected no-nonsense options. E.g., a textarea to edit the footer, and an option to separate pingbacks from comments (along with a nicely coded function in functions.php).

Interesting fact about the penetration of the Settings API: I searched the themes repo for register_setting and found only twenty (20) themes using it. Some of them do not appear on WordPress Extend. Three of theme are coded (or, at least, their options pages are coded) by Automattic folks.

8.

WP icon. I do not like that we force an extra HTTP request upon innocent, unsuspecting people just to promote the WP identity. Is the followed link to wp.org not enough?

If Twenty Ten used icons in its design, we would use a sprite, add the WP icon there, and it would not make any material difference. But, as it is now, I would like to see the icon go.

9.

Obligatory header image. I would like to see an option to use no header image at all. (And have its space collapse.) Not offering this option feels restrictive to me.

IN CONCLUSION

I tried to stay in the spirit of 2010 as I understand it, a simple and clean theme, and I believe the changes I suggest would make Twenty Ten simpler and cleaner without reducing its functionality.

The front-end does not need much work; it’s almost there. (If it weren’t for the busy typography, I would say the front-end is perfect.)

The back-end needs some work, but for the most part it’s only small things here and there that would have a good return in total.

What do you think?

Change History (18)

comment:1 nacin4 years ago

1 is a matter of the designer's preference. As is 2 and 3.

4 as well. 4 also serves as a good example of a filter.

  1. I wish that code didn't need to exist, but wp_title() is weak.
  1. I agree.
  1. Disagree. No need for complicated settings panels, at least not in our first default theme in years. Instead, we've done things like making the custom background API and improving the custom header API, which are very beneficial to other themes (and not just as an example).
  1. Disagree.
  1. Agree.

comment:2 nacin4 years ago

(In [14037]) Remove unnecessary quote escaping and \n\t indentation in twentyten. see #12902

comment:3 demetris4 years ago

Thanks for taking the poll! :-D

About 1, 2, and 3, I disagree they are a matter of the designer’s preference.

Clean typography is a matter of functionality, not just styling.

The “Also tagged” and “Also posted in” is also a matter of functionality. I suppose there is a reasoning behind it (maybe the idea some people have that a hypelink should not refer to itself), but it inconveniences me when I browse category or tag archives: I have to look up to the browser’s window title to remember what category/tag I’m in.

Also, their fanciness begets more complexity that we have to deal with: E.g., if a post is only in one category, in that category’s archives you get a redundant vertical line like this:

| Tagged blah, blahblah | ...

Last but not least, all this fancy and not necessary functionality results in a functions.php file that has grown out of proportion for a basic, default theme.

If all this stuff is necessary for a basic theme, then why it’s not in the core?

comment:4 nacin4 years ago

Quick hits:

You can take up 1, 2 and 3 up with MT and Ian, I won't be arguing those.

If you forget what site you are on, I suppose you'll have to look up at the title bar for that too. "Also tagged" is not just about eliminating links to itself, it's about eliminating redundant information. I've always found it redundant, and so did the designers. I've been looking into ways to prevent us from completely reinventing the wheel there and instead adding and using some well-placed hooks in the_tags() and the_category() (and the functions they use.)

The vertical bar shouldn't be there. We can look into that.

No one ever said this was a basic theme. Default yes, basic no. This is a theme that uses a good portion of the theme API, from filters and actions to lots of cool functionality in functions.php, editor styles, etc. If this was a basic theme, we'd ship a non-i18n version for the en_US crowd. That was decided against.

comment:5 follow-up: Otto424 years ago

I'd like to add a number 10: The existence of "loop.php" makes baby Jebus cry.

I mean, that is one seriously powerful set of if/else/if statements in there. And quite a lot of it is just to work around the fact that the loop has been pulled out of the templates and combined into one file.

comment:6 nacin4 years ago

Now that I look through loop.php, maybe category-gallery.php and category-asides.php would be good spin-offs.

comment:7 ryan4 years ago

Typography and design are not going to change. Design-wise, twenty ten is decided.

#12343 has some work on adding color selection instead of images for custom headers. I don't know if it will make 3.0.

We might have a more standard theme options page some day, but not for 3.0.

The excerpt length filter could clash with some plugins. Is Twenty Ten reliant on that particular excerpt length?

comment:8 iammattthomas4 years ago

I understand the typography choices may seem inconsistent, but they're actually quite the opposite. :) Only two typefaces are used, aside a monospace for code and pre. Colors are quite consistent -- black for headers, grey for body text, blue for links. I agree that any comprehensive page including nearly every HTML element is going to look busy, but I think in practice Twenty Ten has achieved pretty good typographic balance, and I don't see much need for change at this point.

Ian may want to weigh in on some things, I imagine there was some thoughtful consideration behind items like 2, 3 and, and 4.

As to point 8 -- it's smaller than a favicon and I'm not sure why an extra HTTP request is that big of a sin here, but I'm not attached if it really needs to go.

I agree that a no-image header as suggested in point 9 would be a nice addition.

As to everything else, I'm pretty agnostic.

comment:9 nacin4 years ago

4 can get removed, as ryan points out modifying the excerpt 'just because' can screw with some plugins trying to do the same.

comment:10 in reply to: ↑ 5 ; follow-up: westi4 years ago

Replying to Otto42:

I'd like to add a number 10: The existence of "loop.php" makes baby Jebus cry.

I mean, that is one seriously powerful set of if/else/if statements in there. And quite a lot of it is just to work around the fact that the loop has been pulled out of the templates and combined into one file.

I disagree - it reduces the repeating of similar code and at the same time makes it easy for a child theme to override the loop in a specific case.

comment:11 in reply to: ↑ 10 ; follow-up: Otto424 years ago

Replying to westi:

I disagree - it reduces the repeating of similar code and at the same time makes it easy for a child theme to override the loop in a specific case.

I would say that the repeating of similar code is not undesirable, considering that having it in multiple places makes it easier to customize for each individual place.

Customizing it individually in specific templates via large blocks of if/else/ifs is far more cluttered and confusing than simply separating it out into clean loops that each have their own design, even if they do have duplicated parts between them.

We have things like category-slug.php and search.php templates for a reason. Using is_category() for things that should be in separate templates is silly.

comment:12 demetris4 years ago

Replying to ryan:

Typography and design are not going to change. Design-wise, twenty ten is decided.

Ryan and Matt,

I don’t know if it came out how I meant it, but I was only talking about fine-tuning, not about changes. To give an example of what I mean:

At the top, site title and site description are different in five ways:

  • size
  • weight
  • style
  • family
  • color


I think that’s excessive. They don’t need to be that different to be sufficiently distinguished. When I look at Twenty Ten, something clashes in my eyes, and I think it’s the abundant variety of font styling.

Overall, I do like the styling of the theme; a lot. But I have been trying to pinpoint what is it that has this clashing effect to my eyes, and I think it must be the font-styling.

(Those who know me from here will also know that I don’t mince my words. If I did not like the overall styling, or if I thought it was not good for the default theme, I would say so.)

Another thing:

Some of the things that I’m complaining about, like points 2 and 3, were inherited to 2010 by its ancestors, Sandbox and Thematic. Like many others, I’ve been a great fan of both Sandbox and Thematic, I have been using both for quite a while, and I have supported both actively.

But I always saw things in both that did not seem quite right; things a bit excessive, or little idiosyncracies. While I was fine with such idiosyncracies in Sandbox and Thematic, I don’t like seeing them passed down to the default theme of WP, which I had envisioned as something simple and straightforward.

comment:13 mikeschinkel4 years ago

  • Cc mikeschinkel@… added

comment:14 in reply to: ↑ 11 johnonolan4 years ago

Replying to Otto42:

Replying to westi:

I disagree - it reduces the repeating of similar code and at the same time makes it easy for a child theme to override the loop in a specific case.

We have things like category-slug.php and search.php templates for a reason. Using is_category() for things that should be in separate templates is silly.

+1, otherwise we might as well run an entire theme from index.php

index.php / archive.php / category.php are pretty much all identical now: getheader, getloop, getsidebar, getfooter - they even have (almost all) the same divs in between.

comment:15 dd324 years ago

Customizing it individually in specific templates via large blocks of if/else/ifs is far more cluttered and confusing than simply separating it out into clean loops that each have their own design, even if they do have duplicated parts between them.

We have things like category-slug.php and search.php templates for a reason. Using is_category() for things that should be in separate templates is silly.

The issue at heart (and the reasoning for it) is that its to provide different posts within a single loop with a different styling.

Create a Post in the "Gallery" category and it'll be styled differently to one in the "Asides" category, which is different again to any other post.

without introducing yet another get_template_part() call inside loop.php for each individual post (looking for post-single-category-1.php, post-single-category2.php, etc) one large if block is unfortunately needed.

comment:16 follow-up: otto424 years ago

I have not examined it thoroughly, but we have body_class() and post_class() for making styling changes based on category. You generally don't need php if blocks to do that.

comment:17 in reply to: ↑ 16 mikeschinkel4 years ago

Replying to otto42:

I have not examined it thoroughly, but we have body_class() and post_class() for making styling changes based on category. You generally don't need php if blocks to do that.

That presumes the only styling changes would be CSS, vs. different HTML generated.

comment:18 ryan4 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.