Repository navigation
Fix checkbox sort treating unchecked as missing - #13486
Conversation
53bcf7a to
647ee39
Compare
|
End-to-end app-UI verification of the checkbox Before (master) — sorting After (this branch) — same graph reloaded after the worker recompiled; ascending correctly puts Descending + extra evidenceFix descending: On master, descending gave Verified in the Logseq dev app; recordings of both runs are attached to the verification session. |
Tag-table sorting by a checkbox should reverse unchecked/checked and keep an unset property last. Query tables over the same valued rows already do this. Co-authored-by: Tienson Qin <[email protected]>
sort-eids-by-sorting used if-let, which skipped false, so an unchecked box sorted like a missing property and did not reverse with direction. Co-authored-by: Tienson Qin <[email protected]>
647ee39 to
c3b12bb
Compare
Fixes logseq/db-test#1321
Problem
Sorting a tag table by a checkbox used the same order for ascending and descending. An unchecked box (
false) was treated as a missing property and sorted last in both directions.sort-eids-by-sortingbuilt its value map withif-let, which skipsfalse. The entities path (get-value-for-sort) keepsboolean?values, so query tables over the same valued rows already sorted unchecked before checked.Change
if-somesofalseis a real sort value.Tests
Added
get-view-data-class-objects-checkbox-sort-treats-false-as-a-value-testcovering tag-table asc/desc, the missing-property last contract, and query-table alignment.Link to Devin session: https://app.devin.ai/sessions/9c56667e89964af98b7414426bb36471
Open in Devin Desktop: https://app.devin.ai/desktop/session/9c56667e89964af98b7414426bb36471?variant=devin
Requested by: @megayu