Skip to content

Show facet option for the first column on view pages#2810

Open
cycsmail wants to merge 2 commits into
simonw:mainfrom
cycsmail:first-column-facet-2045
Open

Show facet option for the first column on view pages#2810
cycsmail wants to merge 2 commits into
simonw:mainfrom
cycsmail:first-column-facet-2045

Conversation

@cycsmail

Copy link
Copy Markdown
Contributor

Closes #2045

The cog menu was hiding "Facet by this" on the first column of a view. The check used a positional th:first-of-type heuristic to skip the special row-link column, but on a view the first column is a real data column so it got skipped too.

Switched it to key off the data-is-link-column attribute the template already sets for the special link column (the same thing hasMultipleVisibleColumns and the mobile column menu already use), so the link column is still skipped but a view's first column now gets the facet option.

Added a test that drives buildColumnActionItems via node against a minimal fake DOM: the first column of a view now offers faceting, while the link column and a single pk still don't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

First column on a view page has no facet option in cog menu

1 participant