Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h2. Basic concept

An _area_ is a structural block of a web page and collects one or more paragraphs. Web developers commonly sub divide a page into a number of areas to group together similar content in order to improve usability, legibility and, in general, the overall structure of a page.

Currently, basic tempting in Magnolia does not know the concept of an area. A page merely consists of a number of paragraphs. With STK, the area has made its first appearance. The list of paragraphs an area supports and the template it uses to render itself are configurable. STK 2 will continue to use areas.

In Magnolia 5, _Area Editing_ is introducing the concept of an area on the editing level as well. The idea is to hide all editing related elements of an area such as newBars or editBars when an area is not currently edited to solve [the main areas of concern|Areas of concern of preview-based page editing] of current page editing.

*Area Editing improves page editing* as it:
* clearly visualizes the page structure as defined by the site designer and thus improves your understanding of the page
* avoids disorientation by providing too many editing bars at once
* focuses the attention on just the area a user is currently working on
* improves the preview during page editing, since the browser does not have to render all edit controls and thus disturbs the DOM tree less

The following image shows the comparison of the current page editing vs. Visual Page Editing of Magnolia 5 with Area Editing.

!AreaEditing old vs new.png|width=884,height=380!

\\
h2. How Area Editing works

Magnolia 5 allows to select an area or a paragraph by selecting its edit bar. This emphasizes the bar and de-emphasizes a possibly previously selected bar.

When you select an area, its edit bar is visually emphasized, while the bars of its siblings are visually dampened (e.g. drawn in a darker color). At the same time, all edit bars of its direct sub paragraphs become visible. If the area contains additional areas, their edit bars become visible as well, but those of their children remain hidden. As for the edit bars of the parents of a currently selected area, those remain visible to visualize the chain of containing paragraphs and areas.

_Collection paragraphs_ \- normal paragraphs containing other paragraphs \- are treated like implicitly defined areas: their edit bars are shown, those of their children are not, unless you select their parent. Note, however, that collection paragraphs shall be called "paragraphs" in the UI and must not be referred to as "areas" - this term is reserved for actually defined areas.

h3. Only one bar

To further reduce the number of bars visible, *Area Editing shall combine the edit bar and the new bar of a region* by mounting the actions to add a paragraph and to edit a region onto the same bar.

h3. Empty areas occupy space

If an area has not been added to a page yet or if it has been added, but is currently empty, it should nevertheless occupy some space on the page, both physically with a configurable default height and visually by inking it with a background color. This is necessary to expose the overall page structure on an empty page already.

The height and background color of an empty or not yet added area could be specified with a new attribute on the tag declaring the edit bar of an area.

h3. No need to add an area first

*It should not be necessary to add an area first* before adding any sub paragraphs. Currently, you first have to add e.g. a news list paragraph before you're able to add its first news item. It is highly desirable to add a news paragraph together with the news list area being added implicitly when adding its first sub paragraph.

If an area requires the user to provide values for mandatory parameters, the forms collecting them will have to show up before the forms asking for parameter values of the actual paragraph. These forms must explain why additional values have to be given - please see the mockups below for [an example how this shall look|#Requesting mandatory values when adding an area].


h2. Mockups

{mockup:Mockup - RegionEditing - Overview|3}

The above mockup shows a home page with four main areas: a side column for ads, one for extras, a central main area and a footer. The bars of the containing paragraphs are hidden. 

h3. Region Editing on a new page

{mockup:Mockup - RegionEditing - empty page|3}

h3. Selecting a region

{mockup:Mockup - Region inline editing - variant 1|2}

{mockup:Mockup - Region inline editing - variant 2|2}

All edit elements of its sub paragraphs fade in or slide in. Care must be taken that any such transition is smooth and does not disorient the user, while still feeling snappy as to not hold up editing for too long.

I've tried solutions using an overlay dialog for editing a region instead of inline editing, but these won't work. The interface becomes too jumpy and rendering problems are very likely due to only a part of the DOM tree being visible. The team currently favors the fade-in variant over the grayed-out edit bars (shown below), since it doesn't render any bar at all. 

{mockup}

:width=857,height=338

h3. Requesting mandatory values when adding an area

{mockup}