Problem/Motivation

We previously had a similar issue, which resulted in the introduction of additional values:
https://www.drupal.org/project/drupal/issues/3083379

While those changes improved the flexibility of Views block management, we still lack several basic options, specifically, values like 8 or 9.

It's a common practice to use grid layouts with 3 or 4 columns. In such cases, having the ability to display 8 items (2 rows of 4) or 9 items (3 rows of 3) is essential for creating comfortable layouts. Currently, this isn't possible, as there are no available values between 6 and 10.

The only workaround is to set the number of items (8 or 9) in the default view configuration. However, this isn't a viable solution when the same view block is reused in multiple places with different layout needs.

Proposed resolution

Extend the list of available values to include all integers from 1 to 10. This change would give site editors more flexibility and allow for commonly used layouts like 3×3 or 2×4 without relying on workarounds.

Issue fork drupal-3534658

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

terry_kolodiy created an issue. See original summary.

terry_kolodiy’s picture

Here is the simple patch with this improvement

cilefen’s picture

Version: 10.5.x-dev » 11.x-dev
Status: Needs review » Needs work
Issue tags: +Needs merge request
terry_kolodiy’s picture

Assigned: Unassigned » terry_kolodiy

terry_kolodiy’s picture

Assigned: terry_kolodiy » Unassigned
Status: Needs work » Needs review
terry_kolodiy’s picture

Issue tags: -Needs merge request
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs subsystem maintainer review, +Needs tests

Probably something that will need sub-maintainer sign off.

But probably should have test coverage too.

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

terry_kolodiy’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Changes look good to me. will try and get sub-maintainer to take a look.

quietone’s picture

I see that @smustgrave asked for tests but I am not convinced that the test in this MR is needed. It is only testing that the '#options' of a 'select' item are displayed. Surely that is tested elsewhere.

terry_kolodiy’s picture

Hi @quietone,
I’ve removed the test, so the MR now only includes the plugin change. I believe it’s ready to be merged.
Please review it and let me know if anything else is expected from me :)
Thank you!

catch’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -Needs subsystem maintainer review

Agreed we don't need a test here. This has been RTBC for a while and is a trivial change, so going to go ahead and remove the subsystem maintainer review tag, don't think it's controversial.

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

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

Maintainers, please credit people who helped resolve this issue.

  • catch committed 42e96e74 on 11.x
    Issue #3534658 by terry_kolodiy, abhijith s, quietone: Extend the...

Status: Fixed » Closed (fixed)

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