Repository navigation
fix(views): an unchecked checkbox sorts as false, not as a missing value - #13609
Closed
yuxi-liu-wired wants to merge 1 commit into
Closed
yuxi-liu-wired wants to merge 1 commit into
yuxi-liu-wired wants to merge 1 commit into
Conversation
sort-eids-by-sorting built its value map with if-let, which skips the value false: an unchecked box counted as a block without the property and sorted last in both directions, so sorting a tag table by a checkbox gave the same order ascending and descending (db-test logseq#1321).
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 6, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 8, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 11, 2026
Contributor
Author
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 13, 2026
yuxi-liu-wired
added a commit
to yuxi-liu-wired/logseq
that referenced
this pull request
Oct 16, 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.
Fixes logseq/db-test#1321.
Create a tag Topic with a Checkbox property "done", tag 2 blocks with #Topic, one with "done" checked and one with it unchecked, and sort the Topic table by "done": ascending and descending both list checked, unchecked. An unchecked box sorts like a block without the property, last in both directions.
sort-eids-by-sortingindeps/db/src/logseq/db/common/view.cljsbuilt its value map with(if-let [v (eid-sort-value db schema eid)] (assoc! acc eid v) acc);if-letskips the valuefalse. It now skips onlynil.New test
checkbox-sort-orders-unchecked-before-checked-test: it fails on master and passes with the change.logseq.db.common.view-small-set-sort-test,logseq.db.common.view-testandfrontend.components.views-testpass.