It might be helpful to have a fourth radio button that simply said "Show on all pages". I know you can duplicate that functionality easily enough, but as a complete n00b, I clicked a radio button, freaked out that it would mean I wouldn't be able to see my block on my testing pages, and then had to investigate to find out what the options actually did, which led me here. Good learning experience, but it could have waited until later if there'd only been an obvious way to turn off the page restrictions.

Do all the options show all pages if you don't enter anything in the text field? Or does "show only on the listed pages" mean the block doesn't appear anywhere?

Comments

Bojhan’s picture

I saw this suggested somewhere else as well. I think this is a good one.

Bojhan’s picture

Priority: Normal » Critical

Marking this critical hoping someone will pickup, it seems to set off a lot of first time users - thinking they HAVE to pick something.

amc’s picture

Issue tags: +block

Tagging.

dave reid’s picture

Assigned: Unassigned » dave reid

Working on a patch now. Since we'll now have four different visibility settings, it would be a lot better if we defined constants for these options now instead of magical comparisons to integers. Also, I had a crazy idea to hide the 'pages' textarea if the 'always show' option is selected. I'll need a usability review on this since I'm changing (minorly) the work flow for page visibility.

Also, the block page visibility code in block_admin_configure() is horrid.

dave reid’s picture

Status: Active » Needs work
StatusFileSize
new7.04 KB

Still needs some work plus some tests. Plus if a jQuery guru could take a look at the additions to block.js, that would be awesome.

dave reid’s picture

Issue tags: +Needs usability review, +Needs tests
StatusFileSize
new103.66 KB
new96.39 KB
new102.36 KB

Initial screenshots

Bojhan’s picture

Usability wise, this is looking good to me.

webchick’s picture

Version: 6.12 » 7.x-dev

I would remove the word "below", since there is no "below" showing initially.

Also, fixing version.

Bojhan’s picture

Title: "Show block on specific pages" confusing » "Show on all pages" - block specific settings

Changing title, still critical issue.

timmillwood’s picture

StatusFileSize
new6.72 KB

I have tested this Dave's patch and it works well.

I have removed the word below as webchick's request and re-rolled the patch.

davyvdb’s picture

Can I have your attention for http://drupal.org/node/556390 ? It uses vertical tabs for block visibility.

Bojhan’s picture

Status: Needs work » Needs review

If it passes, this is RTBC.

dries’s picture

Status: Needs review » Needs work

Sentences need to start with a capital letter for consistency.

timmillwood’s picture

Status: Needs work » Needs review
StatusFileSize
new6.72 KB

rerolled with caps.

dries’s picture

Wondering ... because the text says 'below' and reference something which the user can't see, it feels slightly better to always show the text area but to just grey it out when you select 'On every page'. Thoughts?

Bojhan’s picture

Status: Needs review » Needs work
StatusFileSize
new6.9 KB

There we go, On every page - is now the default.

Bojhan’s picture

Status: Needs work » Needs review

why did it change status? ugh

Status: Needs review » Needs work

The last submitted patch failed testing.

adamdicarlo’s picture

I think that the "On every page." setting should be faked on the back-end so that it is rendered as chosen when the user chooses "On every page except..." but leaves "Pages" blank.

I think that might make more sense to users. If I were to click "On every page except..." but leave "Pages" blank, I'm really choosing "On every page." So, after form submission, shouldn't the choice be shown as "On every page."? It doesn't really make sense to me to have one setting be shown two different ways.

This would also make "On every page." be the default selection.

I can fix up the patch tomorrow evening if I get some feedback.

sun.core’s picture

Status: Needs work » Needs review
arianek’s picture

path applied w/message:
(Stripping trailing CRs from patch.)
patching file modules/block/block.admin.inc
(Stripping trailing CRs from patch.)
patching file modules/block/block.js
(Stripping trailing CRs from patch.)
patching file modules/block/block.module

tested it and the configuration options/interface work well and make sense to me.

but when i go to add a new block (/admin/structure/block/add), i had the following errors:

*  Notice: Undefined index: pages in block_admin_configure() (line 249 of /Users/arianek/Sites/drupal7/modules/block/block.admin.inc).
* Notice: Undefined index: custom in block_admin_configure() (line 313 of /Users/arianek/Sites/drupal7/modules/block/block.admin.inc).

AND if i select option 2 (On every page except those specified.) and save it, it works but when i come back to that block's config page, option 1 (On every page.) is now selected (perhaps the default is resetting?).

setting option 3 (On only the pages specified.) remained after navigating away and back to the block config, so works fine, it is just option 2 that is affected.

davyvdb’s picture

Status: Needs review » Needs work
davyvdb’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

adamdicarlo’s picture

Status: Needs work » Needs review
StatusFileSize
new7.49 KB

This should fix the patch and apply to today's HEAD.

The patch previously failed testing because it introduced a new database value for block visibility, but did not change the code which determines whether a block should be considered visible. I've made the patch change the user interface but store no new database values so that the visibility determination code need not change.

Status: Needs review » Needs work

The last submitted patch failed testing.

adamdicarlo’s picture

StatusFileSize
new8.25 KB

OK. It seems my last attempt failed testing because of an assumption in block.test that the default option for block visibility is 0, i.e. "On every page except those specified." This is no longer true (which is the point of this patch), so I've rolled in an add-one-line update to block.test (line 126):

$edit['visibility'] = '0'; // 'On every page except...'

This test having failed raises the question -- will changing the default visibility selection to "On every page" break some code? AFAICT, it would only break code that did automated POSTs to the block add or configuration pages without explicitly setting the visibility field.

timmillwood’s picture

The latest patch doesn't work.

It stops JavaScript working on the block settings page.

Apart from that, it seems to work as I would expect.

arianek’s picture

i didn't see any response to my comments in #21 - has this been fixed?

adamdicarlo’s picture

Status: Needs work » Needs review
StatusFileSize
new8.78 KB

@arianek: I don't get the error you described in #21. However, if you select "On every page except those specified" and you don't specify anything, the selection will indeed revert to "On every page" -- that is intended.

Apologies for the JS error. I had removed a small bit in tableDrag that seemed unrelated to this issue (whoops).

This fixes the JavaScript error in last patch version which caused JS not to work at all on a block's configuration page. (Also re-rolled to apply to current head.)

adamdicarlo’s picture

Has anybody tried the latest patch? Is it possible for this to make it into D7?

francewhoa’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new41.05 KB
new28.63 KB

Confirming that patch in #30 works. Thanks adamdicarlo

I tested the following.
-Creating new block. Display on all page.
-Select "On every page except those specified".
-Select "On only the pages specified".
-Delete block.
-Issue in #21 is fixed.

Tested with.
-Drupal 7 (September 9, 2009 - 05:11) fresh install.
-Garland theme.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Bojhan asked for my 2 cents. I think this is a good change but the wording of the last two options needs some work. They tell me I can 'specify' things but don't tell me how, so currently the screenshot in #32 looks like a bug, since there is no textfield.

I'm all for progressive revealing of info, but the labels need to be more clear that that's what's going to happen.

Bojhan’s picture

From feedback received from webchick I am moving this back to needs work. The other two radio's now lack context, since they refer to a text area that is not visually there anymore. Lets work on making this apparent.

francewhoa’s picture

Status: Needs work » Needs review
StatusFileSize
new87.5 KB
new80.13 KB
new80.16 KB
new70.9 KB

@webchick: When looking at #32 screenshot it does look like a bug. But when looking and using the Drupal site it doesn't look like a bug. Because the textfield is dynamic. I mean it is hidden when option 1 is selected. And display when end user clicks on option 2 or 3. When clicking any of the option the wording is self explain. Plus end user gets more information below the textfield when option 2 or 3 is selected. Find below screenshots to clarify (option 1, 2, 3). To avoid confusion for the next issues I'll attached screenshot of all options.

Another way would be when option 1 is selected to disable and fade out the textfield. Find attached mockup to clarify. But I see two down sides to that. First, end user might try clicking on the fade out disabled textfield then think it bugs. Sometime end users are interesting creatures from another world who click on everything that seems clickable ;) Second for better usability less item on a page = better usability. Displaying item only when needed = better usability.

My vote goes for leaving patch in #30 as is.

@all: What do you think?

francewhoa’s picture

Status: Needs review » Reviewed & tested by the community

Following #35 setting status to 'reviewed & tested by the community' so it can be notice by webchick or someone else. And maybe ported.

arianek’s picture

Status: Reviewed & tested by the community » Needs work

I think that the suggestion in #35 for a greyed out field in option 1 is actually a really good solution. Anyone around who can make such a thing happen (I'm not advanced enough) - I don't think webchick will commit this before something more clear is there UI wise.

yoroy’s picture

But then consider the scenario where you have added some pages to the text field and switch back to 'show on all pages'. Greyed out text area that still shows the pages that were added to it? Now it would communicate that these items are 'locked'. Maybe edge case, but would definately be confusing. Just remove the text area content then?

Another approach is rewriting the labels for the last 2 radios:

o On every page except those specified (show list)
o On only the pages specified (show list)

which is a bit ugly repetitive, but could behave similar to the machine name pattern. not sure if this link should also actually select the corresponding label. Maybe not a link at all but just tell people it will be all right if you click this:

o On every page except those specified (will show a list)
o On only the pages specified (will show a list)

arianek’s picture

That seems really clunky (repetitive and not very intuitive especially for newer users) to me...

Doesn't greyed out w/radio button unselected imply that though the content entered is saved it is inactive? It seems pretty logical to me that one would not expect the pages in a deactivated list to be affecting anything.

Bojhan’s picture

Anyone worked on this recently?

jolidog’s picture

Status: Needs work » Needs review
StatusFileSize
new8.75 KB

After reading this issue, I realized that comment #33 by webchick would be resolved by abstracting the phrases. So I changed the patch from #30 to reflect this.

The wording is now:

  • On every page.
  • Except on specific pages.
  • On specific pages.

This IMHO connects well with the help text below the text field that appears:
"Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths ..... " etc.

Needs review!

Status: Needs review » Needs work

The last submitted patch, 514256-block-visibility-D7-41.patch, failed testing.

jolidog’s picture

Hum... I'm guessing this is connected to issue #556390: Vertical Tabs on block visibility settings...

I have no ideia how to solve this...

jolidog’s picture

Priority: Critical » Normal

Marking this has Normal since this does not break the site.

yoroy’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: -Needs usability review

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

wylbur’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)
Issue tags: +#Nashville2018

This patch is no longer relevant to D8.

This patch is also no longer relevant to D7.

Marking as outdated. Reopen if appropriate.