Problem/Motivation
By default there is only one custom block view mode, creating a select list on the configure block modal with only one option. If there's only one option, we shouldn't show the view mode option.
Proposed resolution
Hide the field when only one view mode exists
Remaining tasks
None
User interface changes
Field hidden if not relevant
API changes
None
Original report by @chris_h
By default there is only one custom block view mode, creating a select list on the configure block modal with only one option. If there's only one option, we shouldn't show the view mode option.

Beta phase evaluation
| Issue category | Task because UX |
|---|---|
| Issue priority | Normal because just a UX nicety |
| Prioritized changes | The main goal of this issue is usability. This is a prioritized change for the beta phase. |
| Disruption | None |
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | interdiff.txt | 2.71 KB | dasjo |
| #12 | 2409545-12.patch | 3.84 KB | dasjo |
| #6 | Screen Shot 2015-01-18 at 20.52.13.png | 76.71 KB | chris_h |
| #6 | Screen Shot 2015-01-18 at 20.51.57.png | 190.29 KB | chris_h |
| #6 | Screen Shot 2015-01-18 at 20.50.10.png | 193 KB | chris_h |
Comments
Comment #1
dasjoHiding the possibility makes sense.
We also discussed if there should be a link to manage view modes (admin/structure/display-modes/view) or create a new view mode (admin/structure/display-modes/view/add/block_content). This could be done as an improvement, but would need to check if the current user has the permission to edit view modes.
Comment #2
dasjoComment #3
chris_h commentedI don't think that should be on the configure block form. It would make more sense on manage display:
Comment #4
dasjotaking a stab at this
Comment #5
dasjohere's a patch that will hide the select element if no more than 1 view modes exist. didn't implement the configure link
Comment #6
chris_h commentedThis works as expected. I'll open a new issue re: view modes as it will have to be dealt with consistently in the UI for all view modes.
Before:
After #1:
After #2: (having added a second view mode)
Comment #7
dasjothanks chris_h! could you also link to the follow-up issue once created?
Comment #8
chris_h commented#2409591: Increase discoverability of view modes
Comment #9
alexpottWe can (and should) add a test for this.
Comment #10
dasjoComment #11
dasjophew, it took me a while to figure out that after
we are automatically on the block instance form where we can check the view_mode settings.
i decided to add a second
testBlockContentCreationMultipleViewModestest function, because the inter-dependencies of view modes and the test cases just got a bit too crazy from me when i tried to integrate the multiple check into the existing one :)thanks for reviewing!
Comment #12
dasjosorry now the correct patch version with interdiff
Comment #14
mglamanApplies, works as expected. Should make the form simpler by removing a field not always of concern to a user, because there is one option.
Comment #15
larowlan+1 RTBC - thanks
Comment #16
larowlanAdded beta-eval and used the issue summary template
Comment #17
alexpottThanks for adding the test. Committed 7e57c75 and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation to the issue summary.