Skip to content

Added placeholder for active items and headers/lists/etc#5104

Closed
elstua wants to merge 2 commits intomainfrom
placeholder-in-daily-notes
Closed

Added placeholder for active items and headers/lists/etc#5104
elstua wants to merge 2 commits intomainfrom
placeholder-in-daily-notes

Conversation

@elstua
Copy link
Copy Markdown
Collaborator

@elstua elstua commented Apr 20, 2026

Now on all empty page we show placeholder about / command

Also when user uses command line or menu — we show placeholder for active item

CleanShot 2026-04-20 at 09 58 04@2x CleanShot 2026-04-20 at 09 33 42@2x

Note

Medium Risk
Touches shared editor plugin decoration logic and selection-dependent rendering, which could cause placeholder regressions or cursor/decoration edge cases across all editors.

Overview
Adds context-aware placeholders across editors: daily notes now provide a custom dailyPlaceholder and session raw notes expand their Placeholder to label empty headings, code blocks, list/task/quote paragraphs, and show / guidance on empty documents.

Updates the shared placeholderPlugin to pass parent into PlaceholderFunction and to also render a widget placeholder for the currently active nested empty block (not just empty nodes found during doc.descendants). Styles daily-note placeholders to a lighter gray via .is-empty::before.

Reviewed by Cursor Bugbot for commit 8f5b552. Bugbot is set up for automated code reviews on this repo. Configure here.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 20, 2026

Deploy Preview for fastrepl ready!

Name Link
🔨 Latest commit 8f5b552
🔍 Latest deploy log https://app.netlify.com/projects/fastrepl/deploys/69e5ee928e8b4e0008437ca5
😎 Deploy Preview https://deploy-preview-5104--fastrepl.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 20, 2026

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 8f5b552
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/69e5ee92c4cf2a000899317a
😎 Deploy Preview https://deploy-preview-5104--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 20, 2026

Deploy Preview for char-cli-web canceled.

Name Link
🔨 Latest commit 8f5b552
🔍 Latest deploy log https://app.netlify.com/projects/char-cli-web/deploys/69e5ee9222f55f0008d9bf46

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 20, 2026

Deploy Preview for unsigned-char ready!

Name Link
🔨 Latest commit 8f5b552
🔍 Latest deploy log https://app.netlify.com/projects/unsigned-char/deploys/69e5ee924602da0008793fb6
😎 Deploy Preview https://deploy-preview-5104--unsigned-char.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8f5b552. Configure here.

}

return "";
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicated placeholder logic across two files

Low Severity

dailyPlaceholder and Placeholder in raw.tsx share identical logic for mapping node types to placeholder strings — the heading level check, codeBlock"Code", and the listItem/taskItem/blockquote parent-type checks are copy-pasted. If a new block type is added, both functions need updating independently, risking inconsistency. A shared helper accepting only the doc-level paragraph text as a parameter could eliminate this.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8f5b552. Configure here.

@yujonglee yujonglee closed this Apr 22, 2026
@yujonglee yujonglee deleted the placeholder-in-daily-notes branch April 22, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants