Overview

The goal of this module is to add better usability and a few gimmicks to the core views module in a table view. There are two main features: Select which filters should be active and change the order of the columns in the view.

From the project page:

This module adds better usability and some improvements to the Core Views module by providing some new features:

  • Views format plugin: Flexible Table
  • Exposed Filter: Visible Column Selector
  • Exposed form style: Manual selection

With the flexible table and column selector plugins, the users can choose which columns they want to see or to hide. You can define different compositions of columns in a views table layout.

With the Manual Selection exposed filter plugin, the user can choose exposed filters from a select list. This way a view with a lot of exposed filters keeps to be clean and clear. You only choose the filters you need. Additionally, you can define filters which should be always visible.

Documentation: https://www.drupal.org/docs/contributed-modules/flexible-views

Project link

https://www.drupal.org/project/flexible_views

Git instructions

git clone --branch 2.x https://git.drupalcode.org/project/flexible_views.git

CommentFileSizeAuthor
#3 3150404-3.patch70 bytesdeepak goyal

Comments

daveiano created an issue. See original summary.

shaktik’s picture

Status: Needs review » Needs work

Hi @daveiano,

kindly fix below ERROR.

FILE: ...odules/flexible_views/src/Plugin/views/filter/ColumnSelector.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 24 | ERROR | Class property $no_operator should use lowerCamel
    |       | naming without underscores
----------------------------------------------------------------------

FILE: ../modules/flexible_views/flexible_views.theme.inc
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 178 | WARNING | Unused variable $index.
----------------------------------------------------------------------

Time: 286ms; Memory: 8Mb
deepak goyal’s picture

Status: Needs work » Needs review
StatusFileSize
new70 bytes

Hi @shaktik
Fixed above changes please review.

daveiano’s picture

Hi @shaktik @Deepak Goyal,

first, thanks for the input!

The $no_operator is a class property Iam inheriting from Drupal\views\Plugin\views\filter\FilterPluginBase, see https://git.drupalcode.org/project/drupal/-/blob/8.9.x/core/modules/view...

avpaderno’s picture

The task of reviewers is reporting what needs to be changed in the project used for the application, not providing patches. Also, it's the user who is applying who can change the status to Needs review, when the project has been changed, or when what reported doesn't require any change (for example because the report is not correct).

avpaderno’s picture

It's true that the $index variable in the following code isn't used, but there are developers (including Drupal core maintainers) who prefer write a foreach loop this way.

    foreach ($columns_reverse as $index => $column) {
      if (!in_array($column, $column_order) && $options['info'][$column]['default_visible']) {
        $original_position = $fields[$column]->position;

        if ($original_position >= count($column_order)) {
          array_push($column_order, $column);
        }
        else {
          array_unshift($column_order, $column);
        }
      }
    }
avpaderno’s picture

sadashiv’s picture

Status: Needs review » Needs work

Hi @daveiano

phpcs shows one errors.

FILE: /Users/sadashivdalvi/public_html/git/flexible_views/src/Plugin/views/filter/ColumnSelector.php
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
 24 | ERROR | Class property $no_operator should use lowerCamel naming without underscores
----------------------------------------------------------------------------------------------------

Time: 471ms; Memory: 10MB

Thanks,
Sadashiv.

daveiano’s picture

Status: Needs work » Needs review

@sadashiv

Please see #4 and #5

jimmy_sebastian’s picture

Status: Needs review » Needs work

hi @daveiano,

I see that phpcs shows few errors.

FILE: ...lic/sri8/modules/flexible_views/src/Plugin/views/filter/ColumnSelector.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
24 | ERROR | Class property $no_operator should use lowerCamel naming without
| | underscores
--------------------------------------------------------------------------------

Time: 281ms; Memory: 10MB

daveiano’s picture

Status: Needs work » Needs review

@jimmy_sebastian Please read the comments.

See #4 and #5

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Needs review » Fixed

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewers as well.

avpaderno’s picture

Status: Fixed » Closed (fixed)

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