bgarrels / textpattern

Automatically exported from code.google.com/p/textpattern
0 stars 0 forks source link

Class 'empty' on write page - comments panel and custom fields panel #411

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Turn off comments in preferences, or remove any custom field usage from 
system.
2. Go to the article write/edit page.

What is the expected output? What do you see instead?

Currently the <section> tag is still left in place, with a class="empty" 
applied to it (the CSS property is display: none;). There is no content within 
this tag - it's just <section></section>.

This breaks document outlining - section tags have to include a heading tag. 
It's also messy code. The better way to achieve this would be to not render the 
<section> tags at all in these scenarios - NOT rely on CSS to do it.

Original issue reported on code.google.com by flaming....@mac.com on 24 Apr 2014 at 4:45

GoogleCodeExporter commented 9 years ago
I seem to recall that the reason for class="empty" was so that the callback 
hooks remained in play. Just because someone removes all _core-defined_ custom 
fields or turns off commenting does not mean that a plugin isn't still attached 
to the hooks to provide alternative functionality.

When it was all <div>s it didn't matter so much, but now it's <section>s then 
things are more complicated. There's probably some way we can put valid markup 
onto the page from the output of the UI callbacks such that there remains an 
empty container for plugins to use. Haven't looked at the code closely there 
for a while.

What would be a valid / your preferred markup structure in these scenarios?

Original comment by stefdawson on 20 May 2014 at 11:24