We should preserve the current functionality of a newly-created view, and put the basic textarea handler into each of the 3 areas by default.

Otherwise, we're making users of 3.x jump through extra hoops in the UI to get what they used to have; this will seem like a retrograde step to people.

CommentFileSizeAuthor
#1 697184-default_area.patch1.09 KBdawehner

Comments

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new1.09 KB

I would really like to get a review of dagmar. I'm not sure whether this might brake the conversation of views2-views.

dagmar’s picture

I'm not sure to completly understand this. As far I know, views 3 already convert old header, empty and footers into new areas.

This code is in views_plugin_display::init()

///....

    // Plugable headers, footer and empty texts are
    // not compatible with previous version of views
    // This code converts old values into a configured handler for each area
    foreach (array('header', 'footer', 'empty') as $area) {
      $converted = FALSE;
      if (isset($this->options[$area]) && !is_array($this->options[$area])) {
        if (!empty($this->options[$area])) {
          $content = $this->get_option($area);
          if (!empty($content) && !is_array($content)) {
            $format = $this->get_option($area . '_format');
            $options = array(
              'id' => 'area',
              'table' => 'views',
              'field' => 'area',
              'label' => '',
              'relationship' => 'none',
              'group_type' => 'group',
              'content' => $content,
              'format' => !empty($format) ? $format : variable_get('filter_default_format', 1),
            );

            if ($area != 'empty' && $empty = $this->get_option($area . '_empty')) {
              $options['empty'] = $empty;
            }
            $this->set_option($area, array('text' => $options));
            $converted = TRUE;
          }
        }
        // Ensure that options are at least an empty array
        if (!$converted) {
          $this->set_option($area, array());
        }
      }
    }
  }

dawehner’s picture

The idea is to have a textarea by default for new views. Currently the user has to click and add a tetxarea.

Island Usurper’s picture

I would argue that when there are more options available, not putting a textarea by default will make more sense. Options like, other Views: #942802: Area handler for embedding views

merlinofchaos’s picture

Status: Needs review » Closed (won't fix)

I agree with #4. I think once you have 3-4 options for area handlers, having nothing there by default is more sensible.