Provide class on the parent of rows

Created on 5 January 2019, almost 6 years ago
Updated 13 June 2024, 5 months ago

Sometimes for proper styling we need to add a class on the rows parent div. This div already has the "row" class but that is too generic, and overriding views-bootstrap-grid.html.twig template is my only option. So, let's provide a new Views settings for the Grid style.

✨ Feature request
Status

Fixed

Version

5.4

Component

Code

Created by

πŸ‡·πŸ‡ΈSerbia gnikolovski Subotica, Serbia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¦πŸ‡·Argentina tguerineau

    I've successfully tested 0001-updating-parent-class-3024039.patch the patch on my local environment with Drupal 10 and I can confirm it works as expected. Here's a brief rundown of what I did:

    - I ran PHP_CodeSniffer using the Drupal standard on the updated ViewsBootstrapGrid.php file to ensure it conforms to Drupal's coding standards. The file passed without any errors.

    - I tested the functionality in a Drupal 10 environment to ensure that the 'rows_parent_class_custom' field appears in the views UI, and that its value is added as a class to the parent of rows. Everything functioned correctly.

    - Additionally, I inspected the changes in the .twig file and manually checked that it followed Twig's standards.

  • Status changed to RTBC over 1 year ago
  • πŸ‡¨πŸ‡ΏCzech Republic milos.kroulik

    milos.kroulik β†’ made their first commit to this issue’s fork.

  • Pipeline finished with Success
    8 months ago
    Total: 174s
    #126223
  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    @aburrows any change to get this merged soon? Would be really helpful.
    If you need Co-maintainer help, feel free to ping we, so our team is willing to support.

    Thank you!

  • @anybody it's already included in the current 5.x beta

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    I can't see any commit message or merge here. Should it be closed fixed then @aburrows?

  • πŸ‡ΊπŸ‡ΈUnited States shelane

    The 5.4 branch and 5.5 branch are separate branches supporting different versions of Bootstrap. Even if this is fixed for 5.5 doesn't mean it's fixed for 5.4. @aburrows has been supporting the 5.4 branch, but if he's not available, I can take a look in a couple of weeks.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Thanks for the clarification @shelane, I wasn't aware of that.

  • πŸ‡ΊπŸ‡ΈUnited States shelane

    shelane β†’ changed the visibility of the branch 3024039-carousel-item-wrapper to hidden.

  • Merge request !26adds grid class field β†’ (Merged) created by shelane
  • Pipeline finished with Skipped
    6 months ago
    #186324
  • Pipeline finished with Skipped
    6 months ago
    #186326
    • shelane β†’ committed b8c9f3d6 on 5.4.x
      Issue #3024039 by shelane, gnikolovski, pixiekat, tguerineau: Provide...
    • shelane β†’ committed ee296463 on 8.x-4.x
      Issue #3024039 by shelane, gnikolovski, pixiekat, tguerineau: Provide...
  • Status changed to Fixed 6 months ago
  • πŸ‡ΊπŸ‡ΈUnited States shelane

    This is not the same implementation that exists for the Bootstrap 5 version. I really don't want to add a third custom class option. The change made for this version is the parent of the row. For the Bootstrap 5 version, the custom class is applied directly to the row class. There are many means of achieving this goal. So, as far as this request is concerned, it is done as requested. The Bootstrap 5 version, you will have to use other means of applying to a parent row.

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

  • Pipeline finished with Success
    4 months ago
    Total: 130s
    #236611
Production build 0.71.5 2024