Skip to content

Margin comment cards vanish entirely when the note pane is narrower than line width + 320px (Live Preview) #83

Description

@LLllCCC

Environment

Document Comments 0.1.15, Obsidian 1.13.7, Windows 11
Display 1920×1080 @ 125% scaling (≈1536×864 CSS px), window maximized
Reproduces on the default theme (also on Blue Topaz), no CSS snippets enabled
Steps to reproduce

Add two comments to a note so margin cards render.
With sidebars closed, the cards display normally to the right of the text.
Open the right sidebar (any view). At this window size, once the note pane gets narrow enough (e.g. with the left file explorer also open), all margin cards disappear; the inline highlights remain.
Drag the sidebar narrower: cards only come back once the pane is wide enough again.
What I verified

Not right-dock-specific: docking the comments panel in the left sidebar reproduces it too; the sidebar's content (outline, backlinks, comments) makes no difference. The trigger is purely the note pane width.
Reading view renders the cards fine at the same pane width — only Live Preview loses them.
There is no squeezed/partial state: below the threshold the cards simply vanish.
Not a disable/re-enable artifact; happens in a fresh session.
Expected Graceful degradation on narrow panes (e.g. cards overlapping the text, or falling back to anchored popovers) instead of disappearing entirely.

Where I think it is .doc-comment-margin is absolutely positioned inside the pane with left: min(calc((100% + var(--file-line-width) - 320px)/2), calc(100% - 320px)) under an overflow: hidden ancestor (styles.css, together with the .cm-sizer cap). When the pane is narrower than the clamp math assumes, the column seems to land outside the visible area. The reading view uses the same math but behaves differently, which may be the key clue.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions