Wichert Akkerman | 18 May 2008 16:20
Gravatar

moving description to a viewlet

The way we currently handle the description is a bit painful: Plone uses 
the description as a proper description in places such as folder 
listings and search results, but it also uses the description field as 
introduction text when showing an object. This is awkward when writing 
text: it is very hard or impossible to write text that works well for 
both purposes in many cases.

For this reason it is not entirely uncommon to not want to show the 
description field at all, or to display it somewhere else. This is 
currently not possible since all content view templates have rendering 
of the description field hardcoded. Even using archetypes.schemaextender 
to mark the field as invisible in view mode does not work due to that 
hardcoding.

To improve things a bit I propose that move the rendering of the 
description field to a viewlet and put that in the 
plone.abovecontentbody slot. That is trivial to do, does not change our 
current pages and makes it possible to customize rendering of the field.

Long term I feel that we need to stop showing the description field in 
view templates at all and only use it as a proper description of the 
object, which can be shown instead of the content in places like search 
results. Perhaps something to consider for Plone 4 :)

Wichert.

--

-- 
Wichert Akkerman<wichert@...>    It is simple to make things.
http://www.wiggy.net/                  It is hard to make things simple.

(Continue reading)

Martin Aspeli | 18 May 2008 17:17
Picon
Gravatar

Re: moving description to a viewlet

Wichert Akkerman wrote:
> The way we currently handle the description is a bit painful: Plone uses 
> the description as a proper description in places such as folder 
> listings and search results, but it also uses the description field as 
> introduction text when showing an object. This is awkward when writing 
> text: it is very hard or impossible to write text that works well for 
> both purposes in many cases.

I hadn't thought of that before, but it's a good point.

> For this reason it is not entirely uncommon to not want to show the 
> description field at all, or to display it somewhere else. This is 
> currently not possible since all content view templates have rendering 
> of the description field hardcoded. Even using archetypes.schemaextender 
> to mark the field as invisible in view mode does not work due to that 
> hardcoding.
> 
> To improve things a bit I propose that move the rendering of the 
> description field to a viewlet and put that in the 
> plone.abovecontentbody slot. That is trivial to do, does not change our 
> current pages and makes it possible to customize rendering of the field.

-1

This is a fairly substantial (if subtle) change. As soon as you do this, 
everyone who's got a custom view template that follows the conventions 
(i.e. tons of third party products and custom content types) will start 
to see the description twice. That's unacceptable and will require 
everyone to rewrite.

(Continue reading)

Wichert Akkerman | 18 May 2008 17:58
Gravatar

Re: [Plone-developers] moving description to a viewlet

Previously Martin Aspeli wrote:
> -1
> 
> This is a fairly substantial (if subtle) change. As soon as you do this, 
> everyone who's got a custom view template that follows the conventions 
> (i.e. tons of third party products and custom content types) will start 
> to see the description twice. That's unacceptable and will require 
> everyone to rewrite.

Fair enough.

> Turning a viewlet off for one type only is also a bit awkward. You end 
> up having to customise for the given context type with a viewlet that 
> renders nothing.

Hmm hmm. Perhaps there is an abstraction or hook missing here. It's a
shame the viewlet mechanism does not have an available flag like
portlets do. Still, you could add that to the __call__ method.

> I'd rather just advise people to hide the documentDescription div with 
> CSS if they want it gone site-wide, and to customise if they want it on 
> a per-template basis. It's way easier to customise a template and remove 
> or move a div than it is to find out where the damned viewlet came from. :)

You'ld have to customize every view template for every content type in
your site. That can be quite painful. For a site I'm working on now that
would easily be over 20 separate templates. Creating/overriding a single
viewlet is much simpler and much more maintainable.

> To make this argument a bit more general - viewlet managers are 
(Continue reading)

Martin Aspeli | 18 May 2008 18:37
Picon
Gravatar

Re: [Plone-developers] moving description to a viewlet

Wichert Akkerman wrote:
> Previously Martin Aspeli wrote:
>> -1
>>
>> This is a fairly substantial (if subtle) change. As soon as you do this, 
>> everyone who's got a custom view template that follows the conventions 
>> (i.e. tons of third party products and custom content types) will start 
>> to see the description twice. That's unacceptable and will require 
>> everyone to rewrite.
> 
> Fair enough.
> 
>> Turning a viewlet off for one type only is also a bit awkward. You end 
>> up having to customise for the given context type with a viewlet that 
>> renders nothing.
> 
> Hmm hmm. Perhaps there is an abstraction or hook missing here. It's a
> shame the viewlet mechanism does not have an available flag like
> portlets do. Still, you could add that to the __call__ method.

Limi has some UI ideas that would see portlets and viewlets unify 
somewhat. I think it'd be possible to have such a flag (and the ability 
to more easily move viewlets around different viewlet managers than it 
currently is).

>> I'd rather just advise people to hide the documentDescription div with 
>> CSS if they want it gone site-wide, and to customise if they want it on 
>> a per-template basis. It's way easier to customise a template and remove 
>> or move a div than it is to find out where the damned viewlet came from. :)
> 
(Continue reading)

Reinout van Rees | 19 May 2008 09:04
Gravatar

Re: moving description to a viewlet

Wichert Akkerman schreef:

> I just feel that the description is not part of the content. It is
> metadata: it describes what the object is about. As such it does not
> have business appearing in view templates, especially not in the way
> it does now.

Two thoughts:

Having the metadata so immediately and prominently visible sure does 
invite people to actually use it. Much metadata is never filled in. That 
speaks in favour of keeping it.

Customers sometimes want rich text in the description field. Which 
smells like abuse because of the prominent place. Which speaks in favour 
of getting rid of it.

Reinout

--

-- 
Reinout van Rees          Blog: http://vanrees.org/weblog/
reinout@...          Work: http://zestsoftware.nl/
http://vanrees.org          Video: http://reinout.blip.tv/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Reinout van Rees | 19 May 2008 09:08
Gravatar

Re: moving description to a viewlet

Martin Aspeli schreef:

> I'd rather just advise people to hide the documentDescription div with 
> CSS if they want it gone site-wide, [...snip...]

A good description is often search engine friendly.

I don't know much about google's filters, but wouldn't it be a bit risky 
to hide it with css? You'd have the same search engine friendly text in 
the head's description tag and as hidden text in the page itself. I 
wonder if that could trigger some SEO penalty. I'm probably too 
paranoid, though :-)

Reinout

--

-- 
Reinout van Rees          Blog: http://vanrees.org/weblog/
reinout@...          Work: http://zestsoftware.nl/
http://vanrees.org          Video: http://reinout.blip.tv/

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Encolpe Degoute | 19 May 2008 10:45

Re: moving description to a viewlet

Reinout van Rees a écrit :
> Wichert Akkerman schreef:
> 
>> I just feel that the description is not part of the content. It is
>> metadata: it describes what the object is about. As such it does not
>> have business appearing in view templates, especially not in the way
>> it does now.
> 
> Two thoughts:
> 
> Having the metadata so immediately and prominently visible sure does 
> invite people to actually use it. Much metadata is never filled in. That 
> speaks in favour of keeping it.

+1

> Customers sometimes want rich text in the description field. Which 
> smells like abuse because of the prominent place. Which speaks in favour 
> of getting rid of it.

It's really a rich text  field that they want. The description field is
here then they wanted to use it like they want. If you add a rich text
field called 'summary' or 'leading text' they suddenly not want a rich
text field for description anymore.

Reagrds,
--

-- 
Encolpe Degoute
INGENIWEB (TM) - S.A.S 50000 Euros - RC B 438 725 632
Bureaux de la Colline
(Continue reading)

Danny Bloemendaal | 19 May 2008 11:44
Picon
Gravatar

Re: Re: [Plone-developers] moving description to a viewlet


On 18 mei 2008, at 18:37, Martin Aspeli wrote:
>
>>> An object's description is intimately tied to its schema. A  
>>> "description renderer" probably isn't a useful concept on its own.  
>>> The decision on whether and how to render the description is part  
>>> of the view logic of the object in question and should thus, IMHO,  
>>> remain closely linked into the view template, not indirected away  
>>> to a place where it's harder to manipulate.
>> I just feel that the description is not part of the content. It is
>> metadata: it describes what the object is about. As such it does not
>> have business appearing in view templates, especially not in the way
>> it does now. That is a mistake Plone made long ago, and something we
>> should fix at some point.
>

Yes, it was a bad choice to tie the description to the content back in  
the days. The problem started with placing the description widget at  
the top of the edit form while it should be at the bottom. After all,  
it is just before you save, you have to think of one or two sentences  
to describe WHAT the object is about for when people search for that  
item and see it in the listing. By placing it at the top, people  
always assume it is a lead in. Bad choice. Especially when people use  
it as a lead-in. Lead-ins are usually bad for search overviews. It  
hardly ever describes what the item is about.

> I think with a bit more discussion and input, we could arrive at  
> this conclusion and consider a policy switch, but I think for 3.x  
> the ship's sailed. For a lot of people, the way that Description is  
> being used in views makes it a de-facto part of the "content" schema  
(Continue reading)

Raphael Ritz | 19 May 2008 12:05
Picon
Favicon

Re: moving description to a viewlet

Wichert Akkerman wrote:
>

[..]

> 
> Long term I feel that we need to stop showing the description field in 
> view templates at all and only use it as a proper description of the 
> object, which can be shown instead of the content in places like search 
> results. Perhaps something to consider for Plone 4 :)

+1 for Plone 4

-1 for Plone 3.x

As others have indicated already this is too intrusive a change.

And I also agree with those who consider it a mistake to use
the description field for so many different things simultaneously.

Raphael

> 
> Wichert.
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
(Continue reading)

Jon Stahl | 20 May 2008 06:53
Gravatar

Re: [Framework-Team] Re: moving description to aviewlet

Danny Bloemendaal wrote:
>
> On 18 mei 2008, at 18:37, Martin Aspeli wrote:
> >
> >>> An object's description is intimately tied to its schema. A 
> >>> "description renderer" probably isn't a useful concept on its own. 
> >>> The decision on whether and how to render the description is part 
> >>> of the view logic of the object in question and should thus, IMHO, 
> >>> remain closely linked into the view template, not indirected away 
> >>> to a place where it's harder to manipulate.
> >> I just feel that the description is not part of the content. It is
> >> metadata: it describes what the object is about. As such it does not
> >> have business appearing in view templates, especially not in the way
> >> it does now. That is a mistake Plone made long ago, and something we
> >> should fix at some point.
> >
>
> Yes, it was a bad choice to tie the description to the content back in 
> the days. The problem started with placing the description widget at 
> the top of the edit form while it should be at the bottom. After all, 
> it is just before you save, you have to think of one or two sentences 
> to describe WHAT the object is about for when people search for that 
> item and see it in the listing. By placing it at the top, people 
> always assume it is a lead in. Bad choice. Especially when people use 
> it as a lead-in. Lead-ins are usually bad for search overviews. It 
> hardly ever describes what the item is about.
>
> > I think with a bit more discussion and input, we could arrive at 
> > this conclusion and consider a policy switch, but I think for 3.x 
> > the ship's sailed. For a lot of people, the way that Description is 
(Continue reading)


Gmane