Repository navigation
Conversation
The column menu skipped whichever column came first in the header. On table pages that is the Link column or the single primary key, but a view has neither, so its first column could not be faceted from the menu. Skip the link column itself instead. Fixes simonw#1785
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1785.
The column menu hid "Facet by this" for whichever column came first in the table header:
On a table page that first column is either the
Linkcolumn (rowid or compound primary key tables) or the single primary key, so skipping it was right there. A view has neither: its first header is an ordinary column, and that column could not be faceted from the menu. For example, on/fixtures/paginated_viewthe menu forcontentonly offered sorting, whilecontent_extraoffered "Facet by this".The check now skips the link column itself, using the
data-is-link-columnattribute that_table.htmlalready sets. The single primary key case is still covered by the existingisSinglePkcheck, so table pages offer the same items as before.Tests
Two Playwright tests in
tests/test_playwright.py:test_facet_by_this_offered_for_first_column_of_view: thecontentmenu onpaginated_viewoffers "Facet by this", and clicking it adds_facet=content. It fails onmain.test_facet_by_this_not_offered_for_single_primary_key: thepkmenu onfacetablestill has no facet item.black --check,ruff checkandprettier --checkpass.