Updated: Comment #0

Problem/Motivation

This is a followup for #1998582: Auto-generate machine_name for Views Blocks using [viewname]_[displayname] rather than forcing manual entry. In that issue, we address a couple usability issues for views blocks by setting the machine name for the block automatically. However, in some cases, the user might wish to customize the block machine name.

Proposed resolution

Instead of setting access to FALSE for the machine name, use the normal pattern of the machine name in small text with a link to edit it that exposes the machine name widget. It will differ slightly from "normal" machine names because there is no source field.

Remaining tasks

  • Consensus?
  • Create patch
CommentFileSizeAuthor
#4 machine_name_collapsed.png10.96 KBxjm
#3 vdc-2019697-3.patch1.75 KBdawehner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

xjm’s picture

Issue tags: +Needs tests, +VDC
xjm’s picture

Status: Postponed » Active
dawehner’s picture

Status: Active » Needs review
FileSize
1.75 KB

This patch at the moment allow you to chance the machine name when you add a new block but not later.
This is the default behavior of every other block, so this is fine.

xjm’s picture

FileSize
10.96 KB

Can we make the field collapsed by default as well? This is what I tried to ask @tim.plunkett about at the post-Portland sprint but he told me in no uncertain terms he was not going to look at this issue. ;)

So it'd look like this:

machine_name_collapsed.png

dawehner’s picture

So this just brings back the default UI of block ... if we want to do that, we should allow that for every block.

xjm’s picture

@dawehner, no, it doesn't. The default behavior is dependent on the title. This is not, because Views' titles are special. Like we discussed in Portland. :)

The idea is that we'd use the auto-hiding feature of the machine name javascript without it being dependent on a source field. Instead, it'd just start out with a default value.

dawehner’s picture

OH right I remember. It is hard to remember so many things at the same time, while not doing durpal.

sdboyer’s picture

Status: Needs review » Closed (duplicate)

sooo, just to wrench things up...the basic goal here is met by #2022897: Shift responsibility for creating unique config id/machine name off of (views) block plugins and onto BlockFormController, which DOES do what @dawehner suggested in #5. it does so more or less by suggesting that title/label is not what block machine name should be coupled to.

i do like the idea of it being collapsed by default, per #4. i'd like to add the support for it over there.

i'm gonna be a little aggressive and mark this a dupe.

sdboyer’s picture

Issue summary: View changes

Updated issue summary.