logseq / logseq/db-test

Page links only render the last segment of a hierarchy

Open
#1,134 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Search first
  • I searched and no similar issues were found
What Happened?

In the DB version a link to a page inside a hierarchy renders only the last segment. [[Superhuman/Docs]] shows as Docs, and [[Superhuman/Billing/Invoices]] shows as Invoices. There is no way to turn this off.

It looks like only rendering the last segment is a regression based on the following:

  • logseq/db-test#166 asked for the hierarchy to be shown inline, and was closed as fixed on the grounds that "namespaced pages do show their full path in page references".
  • logseq/db-test#698 reports that they don't. That still matches what I see on 2.0.1.
  • #12277 asks the same thing and hasn't been answered.
Reproduce the Bug
  1. In a DB graph, type [[Superhuman/Docs into a block.
  2. Pick "New page Superhuman/Docs" from the autocomplete.
  3. Press Escape to leave the block.
  4. The link renders as Docs. Clicking back into the block shows its text is now [[Docs]] too.
  5. Repeat with [[Superhuman/Billing/Invoices]], which renders as Invoices.
Expected Behavior

An option to render the full path — Superhuman/Docs and Superhuman/Billing/Invoices — while leaving the stored block text alone.

The shape I'd suggest: a display-only setting, off by default, :ui/show-hierarchy in config.edn with a toggle under Settings → Editor. When it's on, page links and tags show the full path instead of the last segment. Nothing is written to the page — only the rendered label changes, and the block still holds the same text when edited.

Happy to adjust the shape — including dropping the Settings toggle and shipping only the config.edn key — if that fits the direction better.

Screenshots

Two links, both inside the Superhuman hierarchy, rendering as just Docs and Invoices:

Links showing only the last part of the page name: Docs, Invoices
Desktop or Mobile Platform Information

macOS, Logseq Desktop 2.0.1. Also reproducible on a local build of master in the browser.

Additional Context

Related reports are in the db-test tracker (logseq/db-test#698, logseq/db-test#166) and in discussion #12277.

Are you willing to submit a PR? If you know how to fix the bug.
  • I'm willing to submit a PR (Thank you!)

An implementation is ready in #13015.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by reproducing the DB-graph steps with [[Superhuman/Docs]] and [[Superhuman/Billing/Invoices]], then inspect the page-link and tag rendering path and the Editor settings entry point. Done means a display-only option shows full hierarchy paths, preserves the stored block text, and covers both links and tags without changing their editable content.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.