Repository navigation
Show facet option for the first column on view pages - #2810
Merged
Merged
Conversation
Contributor
Author
|
just checking in on this one, all checks are green. happy to rebase or tweak anything if that makes it easier to review. |
Owner
|
Looks good! I'm going to replace the test with a playwright test. |
# Conflicts: # tests/test_table_html.py
Replaces the test that ran table.js in Node against a fake DOM with a Playwright test that opens the column menu on real pages: the first column of a view offers "Facet by this" and faceting by it works, the primary key of a single primary key table does not offer it, and the link column of a compound primary key table has no menu at all. Refs simonw#2045 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2810 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 81 81
Lines 14762 14762
=====================================
Misses 14762 14762 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
simonw
added a commit
that referenced
this pull request
Nov 23, 2026
…upgrade guide sections Release notes for the null, empty string and binary primary key work (#3112), the SpatiaLite KNN count fix (#1611), the insert API fixes (#3081) and the first column facet on views (#2810), which landed without any. The summary paragraph now mentions primary keys and view filters. New upgrade guide sections for datasette.urls.modify(), keyword-only arguments, format_bytes(), TestClient and primary key values, linked from their changelog entries. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
simonw
added a commit
that referenced
this pull request
Nov 23, 2026
Refs #1048, #1342, #1479, #1553, #1611, #1627, #1630, #1671, #1674, #1822, #1841, #1873, #1914, #1919, #1973, #2045, #2073, #2145, #2253, #2356, #2419, #2713, #2805, #2807, #2810, #2826, #2942, #2967, #3070, #3074, #3075, #3078, #3079, #3081, #3082, #3083, #3084, #3085, #3087, #3088, #3089, #3090, #3091, #3092, #3093, #3097, #3098, #3099, #3100, #3101, #3102, #3103, #3104, #3105, #3106, #3107, #3108, #3109, #3111, #3112, #3113, #3115
This was referenced Nov 23, 2026
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.
Closes:
The cog menu was hiding "Facet by this" on the first column of a view. The check used a positional
th:first-of-typeheuristic 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-columnattribute the template already sets for the special link column (the same thinghasMultipleVisibleColumnsand 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
buildColumnActionItemsvia 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.