I want to simplify the editorial experience of my website so people only have to chose the view they want to render and since I leave only one block display to chose I don't want to bother them with that useless choice.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

rodrigoaguilera created an issue. See original summary.

rodrigoaguilera’s picture

Status: Active » Needs review
StatusFileSize
new2.21 KB

Here is a patch that does exactly that.

I did a small coding standard fix and made the message that is shown when there is no displays translatable.

rodrigoaguilera’s picture

Status: Needs review » Needs work

I coworker tried the patch and reported that is not working with fields inside paragraphs. I did not test that use case so that needs to be fixed

purushotam.rai made their first commit to this issue’s fork.

purushotam.rai’s picture

Status: Needs work » Needs review
purushotam.rai’s picture

StatusFileSize
new2.83 KB
purushotam.rai’s picture

StatusFileSize
new3.01 KB

We have to update default display_id in itemResetValues as well. It was creating a issue, hence updated the patch.

jeffschuler’s picture

sassafrass’s picture

Applied the latest patch and it hides a single Display as expected. However, I was wondering if it also makes sense to hide the View selection if there is only one View as well? Or to give users the option to hide those fields?

scott_euser made their first commit to this issue’s fork.

scott_euser’s picture

Status: Needs review » Needs work

See my comment on the MR + now that we have tests, the tests assume the default behaviour, so we should update the test coverage to cover a View with 2+ displays and a View with only 1 display.

scott_euser’s picture

Status: Needs work » Fixed

Added tests myself rather than let this sit another 8 years :) Thanks all for the help!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

scott_euser changed the visibility of the branch 2932381-hide-display-id-regression to hidden.

scott_euser changed the visibility of the branch 2932381-hide-display-id-regression to active.

  • scott_euser committed c78f3181 on 8.x-2.x
    fix: #2932381 Resolve regression for "Hide the choice for a view display...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.