Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Sorting a tag table by a checkbox gives the same order ascending and descending

Closed Beginner friendly
#1,321 0 comments 0 reactions 0 assignees View on GitHub

@tiensonqin is already working on this.

Since Sep 27, 2026.

  • #13486 by @tiensonqin — open
  • #13609 by @yuxi-liu-wired — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
clojure

Research direction

Start in deps/db/src/logseq/db/common/view.cljs at sort-eids-by-sorting, especially the value-map construction described in the issue. Run or inspect the model-based property test for table views and compare tag-table sorting with query-table sorting. Done means unchecked checkbox values sort as false, with opposite ascending and descending orders.

Written by the indexing model from the issue text.

Description

Steps

  1. Create a tag Topic with a Checkbox property "done".
  2. Tag 2 blocks with #Topic: "checked", with "done" checked, and "unchecked", with "done" checked and then unchecked.
  3. On the Topic page, sort the table by "done" ascending, then descending.

Expected

The 2 directions give opposite orders: unchecked, checked ascending, and checked, unchecked descending. A query table over the same blocks sorts ascending as unchecked, checked.

Actual

The tag page lists checked, unchecked in both directions. An unchecked box sorts like a block without the property, last in both directions.

Cause

sort-eids-by-sorting in deps/db/src/logseq/db/common/view.cljs builds its value map with (if-let [v (eid-sort-value db schema eid)] (assoc! acc eid v) acc). if-let skips the value false, so an unchecked box counts as a missing value.

Found with a model-based property test of table views (ascending against descending, tag table against query table), replayed on upstream master 16c4ed1a0.

Dominant language
No language data
Stars
28
Forks
2
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from logseq/db-test

All issues in logseq/db-test

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.