Skip to content

fix(ui): property panel alignment, pill clipping, preview popup actions, Comment class dates, EDN import validation - #13899

Open
yuxi-liu-wired wants to merge 6 commits into
logseq:masterfrom
yuxi-liu-wired:fix/dbtest-ui2
Open

yuxi-liu-wired wants to merge 6 commits into
logseq:masterfrom
yuxi-liu-wired:fix/dbtest-ui2

Conversation

@yuxi-liu-wired

@yuxi-liu-wired yuxi-liu-wired commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Five UI fixes from logseq/db-test, one commit each:

Commit Issue Files
79309a9529 fix(ui): align property panel values with their key logseq/db-test#1044 src/main/frontend/components/property.css
51ff57095b fix(ui): stop the expanded property pill from clipping its key logseq/db-test#968 src/main/frontend/components/block.css
8d6c78f27e fix(ui): hide the page title action row in the page preview popup logseq/db-test#1376 (action row only) src/main/frontend/components/page.cljs, new src/test/frontend/components/page_title_test.cljs
b08f48e1c3 perf(import): validate only the imported entities in the EDN import dialog logseq/db-test#994 src/main/frontend/handler/db_based/import.cljs, src/test/frontend/handler/db_based/import_test.cljs
08e31ba15b fix(ui): show block properties in narrow blocks in the web build logseq/db-test#1507 src/main/frontend/components/block.css, src/main/mobile/components/app.css

Not done: #1301 (did not reproduce, see the last section). Not fixed in #1376: the popup closing quickly and the title not rendered as a heading. #1040 (Comment/Comments classes dated 1970) is not in this PR: the repair that stamps those classes is synced under one fixed transaction id, so changing its constant would let clients of different versions write different timestamps under the same id; that is a sync design choice for the maintainers.

logseq/db-test#1044

What the user sees

In the page property panel the text of a text, number or date value sits about 4px higher than its key on the same row.

Cause

.property-key-panel centres its 20px line in a 28px box, while .property-value-panel.ls-block.property-value-container was items-start, so the 20px value line sat at the top of the same 28px. Only the empty, node and checkbox rows had an items-center override.

Change

The value container is items-center for every row. That makes the empty-row rule and the container half of the node and checkbox rules redundant, so they are removed (the node and checkbox rules for the inner element stay). Multi-line values are not centred, because the container is as tall as its content.

Tests

CSS only, so the proof is a computed-layout check in headless Chromium (pattern of scripts/pdf-toolbar-check.mjs): scripts/dui2-css-check.mjs 1044 <style.css> renders the panel row markup (key a.property-k, value .property-value-inner with text) against a built static/css/style.css and compares the vertical centre of the key text and of the value text for a default, a number and a date row.

  • style.css from master: offset -4px on all three rows, exit 1.
  • style.css with this commit: offset 0px on all three rows, exit 0.

The markup of the fixture is copied from property-cp and property-key-cp, not from a running app. The script lives in /home/deadscholar/workspace/logseq-perf/scripts, not in the repo.

logseq/db-test#968

What the user sees

Expanding a block's bottom property pill with several lines of content cuts off the top left of the key: "link:" in the issue's screenshot loses the left edge of the "l".

Cause

.bottom-property-pill is rounded-full with overflow: hidden, and its ::after ring has border-radius: 9999px. The expanded rule only set h-auto items-start. A radius larger than half the box is scaled down to half the box height, so a tall pill gets a large elliptical corner that clips the key.

Change

.bottom-properties-row[data-expanded="true"] .bottom-property-pill and its ::after get border-radius: 12px. Collapsed pills keep the fully rounded shape.

Tests

scripts/dui2-css-check.mjs 968 <style.css> renders the expanded pill markup (key and three-line content) against a built style.css, resolves the effective corner radius (the computed radius clamped to half the box) and tests whether the key's top-left corner lies inside the rounded corner.

  • master: pill 64px high, effective radius 32px, key corner cut off, exit 1; the screenshot shows the clipped "l" of "link:" as in the issue.
  • this commit: radius 12px, key corner inside, exit 0; the screenshot shows "link:" whole.

logseq/db-test#1376 (the action row only)

What the user sees

Hovering a [[page]] link opens a preview popup whose title shows a half-visible "Add icon" / "Set property" row above it.

Cause

page-inner is rendered with :preview? true in the popup but called db-page-title without it, so the title got db-page-title-actions. That row is absolute -top-5 opacity-0, 20px above the title, and the popup's scroll box clips it.

Change

page-inner passes :preview? to db-page-title, which does not attach the action row in a preview.

Tests

frontend.components.page-title-test:

  • page-title-shows-hover-actions-outside-the-preview-popup-test (a full page still gets the action row),
  • page-title-hides-hover-actions-in-the-preview-popup-test (a preview does not).
    Both render db-page-title with renderToStaticMarkup and a block container stub that shows whether it was given :page-title-actions-cp.

Proof: with page.cljs at HEAD the second test fails (1 failure, 2 assertions); with the fix both pass.

Not covered by this change: the popup that "only shows very briefly" (not reproduced; the triage suspected *timer1 not being reset on popup enter, block.cljs:1010-1013) and the title "not rendered as a heading" (no cause found in .ls-preview-popup rules).

logseq/db-test#994

What the user sees

"Import EDN data" with a one-page EDN (an empty page with one tag) takes about 11 seconds on a large graph.

Cause

import-edn-data-from-form (src/main/frontend/handler/db_based/import.cljs) called batch-import-edn! without :validate-scope, so import-edn-data validated every entity of the graph (:graph is the default of validate-import-txs). The MCP/CLI path passes {:validate-scope :tx} since #13388; the dialog was not changed with it.

Change

The dialog passes {:validate-scope :tx} (together with :current-block when importing into a block). The whole-graph EDN import (import-from-edn-file!) keeps the default.

import-edn in src/main/logseq/api/db_based/cli.cljs (the CLI importEdn route) also passes {} and is left alone: it is not the dialog.

Tests

frontend.handler.db-based.import-test/import-edn-data-dialog-validates-only-touched-entities-test: submits the issue's EDN through the dialog handler against a test graph and checks that every validate-local-db! call carries :entity-ids.

Proof: with import.cljs at HEAD the test fails (a call without :entity-ids); with the fix frontend.handler.db-based.import-test passes (2 tests, 13 assertions).

The "Go to page" notification and the progress bar from the issue are features and not part of this change.

logseq/db-test#1507

What the user sees

In the web build on a phone in portrait, a block shows only its pill properties (those positioned below the block). Its other properties, such as the fields of a tag, are missing, and "Show hidden properties" changes its label but shows nothing, also on a zoomed-in block. In landscape everything shows.

Cause

Every .ls-block is a size container named ls-block, and block.css hid .ls-properties-area in any block narrower than 430px (@container ls-block (max-width: 430px)). The mobile app undoes that for its page view in src/main/mobile/components/app.css (.ls-mobile-page .ls-properties-area { display: initial }), but that stylesheet and the .ls-mobile-page wrapper (src/main/mobile/routes.cljs) exist only in the mobile app (tailwind.mobile.css imports src/main/mobile/**, tailwind.all.css does not), so the web build got the hiding rule without the exception.

Change

The hiding rule moves from block.css (in both stylesheets) into mobile/components/app.css, in the same container query as the mobile app's page-view exception. The mobile stylesheet keeps the same rules in the same order; the web stylesheet no longer hides the properties area at any width. This also applies to narrow blocks on desktop (a narrow right sidebar), which hid their properties the same way.

Tests

CSS only, no unit test. pnpm css:build and pnpm css:mobile-build before and after, each loaded into headless Chromium with a block markup (.ls-block > .ls-properties-area.ls-block-properties with a properties panel) 390px wide, once on its own and once inside .ls-mobile-page (scripts/block-properties-narrow-check.mjs in my workspace):

Stylesheet Block on its own Inside .ls-mobile-page
web, before display: none, height 0 display: none, height 0
web, after display: block, height 112px (same as at 600px) display: block, height 112px
mobile, before display: none, height 0 display: inline, height 100px
mobile, after display: none, height 0 display: inline, height 100px

Not done: logseq/db-test#1301

The icon/text misalignment does not reproduce. I rendered the real markup and the real built style.css plus tabler-icons.min.css in headless Chromium with Noto Sans CJK and measured the offset between the icon's centre and the centre of the CJK text's em box (~/tmp/dui2/probe.mjs): the favorites and recent items (a.link-item), the main-menu dropdown item and the settings left panel button are all at the same offset (0.7px, a constant of the metric) as the left-nav a.item that #13326 fixed, and the graph switcher items use the same dropdown item markup. Every row is flex items-center, so a 20px line box and a 16px icon share one centre, and setting the line height (leading-4) does not move the glyphs. Reverting #13326's leading-4 and h-4 on a.item in the same fixture also gives the same offset, so this method cannot show the original bug either. The offset in the issue screenshots probably comes from the Windows CJK font's ascent/descent, which I do not have, and the plugins page was not examined. I did not apply the leading change without a failing check. A comment can say: "Does not reproduce with Chromium and Noto Sans CJK: icon and text share one centre in the favorites/recent items, the main menu, the graph switcher and the settings panel (all flex items-center); need the font (Windows build 2.0.1-alpha+nightly.20260924) or a screenshot with the zoom to fix it."

Validation

  • bash ~/tmp/dui2/prove-all.sh (build without the three code fixes, run the three new namespaces, build with them, whole suite), then, with the final versions of the tests (the db-core test filters on :block/uuid to skip the ident-only maps of the repair data, and the page-title test gives its page a :db/id so db-page-title does not treat it as being edited), bash ~/tmp/dui2/prove-page-title.sh (build without the page.cljs fix: page-title-test fails; build with all fixes: page-title-test, db-core-test and import-test pass), and a final pnpm cljs:run-test with all fixes: exit 0.
  • clojure -M:clj-kondo --lint on the six changed cljs files: 0 errors, 0 warnings. scripts/typos-check.sh: clean.
  • The first whole-suite run had one failure outside my tests: search-build-blocks-indice-in-worker-completes-before-vector-embedding-test (a timeout, passes alone and in the final run).
  • Web build on a phone: block properties hidden in portrait (.ls-properties-area is display: none below 430px, the mobile app's override doesn't apply) db-test#1507 (CSS only): the computed-style check above; scripts/typos-check.sh: clean; pr-conflicts.sh 13899 after the push: 0 conflicting pairs.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread src/main/frontend/worker/db_core.cljs Outdated
(def ^:private built-in-sync-repair-timestamp 0)
;; Not 0: the repaired classes would show 1970-01-01 as their created/updated date.
;; 2026-05-20T00:00:00Z, the day the repair was introduced.
(def ^:private built-in-sync-repair-timestamp 1779235200000)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Mixed-version repair payloads need verification

Older and newer clients can submit different timestamps under the same repair transaction ID. Verify whether sync preserves the newer value when both clients repair one graph.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@yuxi-liu-wired

Copy link
Copy Markdown
Contributor Author

db_core.cljs:649 (mixed-version repair payloads). Right to flag. The built-in repair is uploaded under one fixed transaction id, so an older client would send created-at 0 and a newer one 1779235200000 under the same id, and whether sync then converges is a sync design question, not something this PR should decide. The commit is dropped from this PR, and logseq/db-test#1040 now says that the cause is the 0 constant in that repair and that changing it needs a maintainer's choice (together with what to do for graphs that already carry the 0). The PR keeps the other four fixes.

yuxi-liu-wired pushed a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 30, 2026
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 30, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Oct 31, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 1, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 2, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 3, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 4, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 11, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 12, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 13, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 14, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 15, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 16, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 17, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
@yuxi-liu-wired
yuxi-liu-wired force-pushed the fix/dbtest-ui2 branch 2 times, most recently from b430fae to 0491fce Compare November 18, 2026 14:01
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 18, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 18, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 18, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)
@yuxi-liu-wired
yuxi-liu-wired force-pushed the fix/dbtest-ui2 branch 2 times, most recently from 9c9c663 to 0f85ce7 Compare November 19, 2026 07:41
In the page property panel, the text of a text, number or date value sat about 4px higher than its key on the same row.

The key cell centres its 20px line in a 28px box, but the value container was `items-start`, so the 20px value line sat at the top of the same 28px. Only empty, node and checkbox rows had an `items-center` override.

The value container is now `items-center` for every row, which makes the per-type container overrides redundant, so the empty-row rule and the container half of the node and checkbox rules are removed.

Checked in headless Chromium by rendering the panel row markup against the built style.css and comparing the vertical centre of the key text and the value text: the value is 4px higher on master for default, number and date rows, 0px with this change.

Fixes logseq/db-test#1044
Expanding a block's bottom property pill with several lines of content cut off the top left of the key ("link:" lost its left edge).

The pill is `rounded-full` with `overflow: hidden`, and its `::after` ring has a 9999px radius. A radius larger than half the box is scaled down to half the box height, so a tall expanded pill gets a very large elliptical corner that clips the key at the top left.

An expanded pill now has a 12px radius, on the pill and on its `::after` ring. Collapsed pills keep the fully rounded shape.

Checked in headless Chromium by rendering the expanded pill markup against the built style.css and testing whether the key's top-left corner lies inside the rounded corner: cut off with an effective radius of 32px on master, inside with 12px with this change.

Fixes logseq/db-test#968
Hovering a page link opened a preview popup whose title showed a half-visible "Add icon" / "Set property" row.

`page-inner` knows it is rendered in a preview (`:preview? true`), but did not pass that on to `db-page-title`, so the title got its hover action row. The row is positioned 20px above the title and the popup's scroll box clips it.

`page-inner` now passes `:preview?` to `db-page-title`, which leaves the action row out in a preview.

Test: `frontend.components.page-title-test` renders `db-page-title` and checks that the action row is given to the block container on a full page and not in a preview.

This does not address the other two points of the issue (the popup closing quickly, the title not rendered as a heading).

Fixes logseq/db-test#1376
…ialog

Importing a one-page EDN through "Import EDN data" took about 11 seconds on a large graph.

The dialog called `batch-import-edn!` without a `:validate-scope`, so the import ran `validate-local-db!` over every entity of the graph. The MCP/CLI upsert path already passes `{:validate-scope :tx}` (logseq#13388) and the dialog was not changed with it.

The dialog now passes `{:validate-scope :tx}`, which validates the entities the import touched. The whole-graph EDN import keeps the full validation.

Test: `import-edn-data-dialog-validates-only-touched-entities-test` submits the dialog's EDN for a page with a tag and checks that `validate-local-db!` is called with `:entity-ids`.

The "Go to page" notification and the progress bar asked for in the issue are not part of this change.

Fixes logseq/db-test#994
…ace, so it merges cleanly with logseq#13886

The test this PR added to import_test.cljs sat at the same place as the ones logseq#13886 adds there, so the two PRs conflicted and the nightly merge left one of them out. The test is unchanged; it now lives in frontend.handler.db-based.import-edn-dialog-test, which carries the requires and the sample EDN it needs, and import_test.cljs is back to master's.
In the web build on a phone in portrait, a block showed only its pill properties (those positioned below the block); its other properties, such as the fields of a tag, and the hidden properties revealed by "Show hidden properties" did not appear, even on a zoomed-in block. Rotating to landscape showed them.

Every `.ls-block` is a size container named `ls-block`, and block.css hid `.ls-properties-area` in any block narrower than 430px. The mobile app undoes that for its page view in mobile/components/app.css (`.ls-mobile-page .ls-properties-area { display: initial }`), but that stylesheet and class exist only in the mobile app, so the web build got the hiding rule without the exception.

The hiding rule moves from block.css (built into both the web and the mobile stylesheet) into mobile/components/app.css, next to the mobile app's page-view exception. The mobile app's stylesheet keeps the same rules in the same order; the web stylesheet no longer hides the properties area at any width.

Checked with the built CSS (`pnpm css:build`, `pnpm css:mobile-build`) and a headless page with a 390px-wide block: before, the web stylesheet gives the properties area `display: none` (height 0); after, `display: block` (height 112px), the same as at 600px. The mobile stylesheet gives the same result before and after (hidden outside `.ls-mobile-page`, `display: inline` inside it).

Fixes logseq/db-test#1507
yuxi-liu-wired added a commit to yuxi-liu-wired/logseq that referenced this pull request Nov 19, 2026
…w popup actions, Comment class dates, EDN import validation (squashed: its commits conflicted one by one with the stack)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant