Skip to content

Commit 7592848

Browse files
style(codeblocks): align all copy buttons to the top-right
The mermaid and markmap copy buttons sat top-left while the tree's sat top-right, so the three codeblocks disagreed on placement. Top-right matches Obsidian's own convention for code blocks. Only the copy buttons move. The markmap zoom/fit toolbar stays in the bottom-right — it's a separate control group and doesn't collide.
1 parent d2cdc46 commit 7592848

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
* Restored every missing margin, padding, gap, width and offset across the plugin. The stylesheet imported only Tailwind's utilities layer, but the numeric spacing scale that `p-2`, `gap-1`, `w-48`, `top-2` and friends resolve against lives in its theme layer — so all 39 of those classes, used in 15 files, were silently dropped at build time. Importing the theme layer brings them back. Expect slightly roomier spacing in the settings tab and the side views, and correctly positioned floating buttons in codeblocks. Preflight (Tailwind's browser reset) is deliberately still excluded, so nothing about Obsidian's own styling changes.
1313
* The tree codeblock's copy button now floats in the top-right corner ([#736](https://github.com/michaelpporter/breadcrumbs/issues/736)) instead of rendering on top of the first row's collapse arrow. It was a casualty of the missing spacing scale above: the button was already positioned as floating, but its offsets compiled to nothing, so it fell back to the top-left of the tree.
14+
* Codeblock buttons now sit in the same place in all three codeblock types. The mermaid and markmap copy buttons moved from the top-left to the top-right, matching the tree codeblock and Obsidian's own convention for code blocks. The markmap zoom/fit toolbar stays in the bottom-right.
1415
* Links with a block or heading reference now point at the note itself ([#734](https://github.com/michaelpporter/breadcrumbs/issues/734)). `down:: [[2#^71f2d9]]` in `1.md` used to create an edge to a phantom `2#^71f2d9.md` node, so `1.md`'s tree looked right while `2.md` never showed `1.md` as its parent. The subpath is now stripped before resolving, for both frontmatter and inline fields and in list notes, and regardless of which folders the notes live in. A subpath-only link (`[[#^71f2d9]]`, pointing inside the same note) creates no edge.
1516
* Inline Dataview fields no longer claim links that sit outside them ([#731](https://github.com/michaelpporter/breadcrumbs/issues/731)). `(down:: [[y]]) [[x]]` in `x.md` used to make **both** `[[y]]` and `[[x]]` `down` children — including a self-loop from the note to itself — because the builder attributed every link on a line to whichever field opened that line. Bracketed fields now end at their closing bracket, matching Dataview, so only `[[y]]` becomes an edge and links elsewhere on the line stay ordinary prose. Multiple fields on one line (`(up:: [[p]]) (down:: [[c]])`) are also parsed separately now. Bare line-level fields (`down:: [[y]], [[x]]`) are unchanged — their value is still the rest of the line.
1617

src/components/codeblocks/CodeblockMarkmap.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270

271271
{#if code}
272272
<div class="relative">
273-
<div class="absolute left-2 top-2 z-10 flex">
273+
<div class="absolute top-2 right-2 z-10 flex">
274274
<CopyToClipboardButton
275275
text={code}
276276
cls="clickable-icon nav-action-button"

src/components/codeblocks/CodeblockMermaid.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163

164164
{#if code}
165165
<div class="relative">
166-
<div class="absolute left-2 top-2 z-10 flex">
166+
<div class="absolute top-2 right-2 z-10 flex">
167167
<CopyToClipboardButton
168168
text={code}
169169
cls="clickable-icon nav-action-button"

0 commit comments

Comments
 (0)