Skip to content

feat: add Markdown copy functionality and enhance UI interactions#1150

Open
yilmazemrepala wants to merge 1 commit intoblinkospace:mainfrom
yilmazemrepala:feat/multi-format-copy
Open

feat: add Markdown copy functionality and enhance UI interactions#1150
yilmazemrepala wants to merge 1 commit intoblinkospace:mainfrom
yilmazemrepala:feat/multi-format-copy

Conversation

@yilmazemrepala
Copy link
Copy Markdown
Contributor

@yilmazemrepala yilmazemrepala commented Mar 29, 2026

Summary

Adds multi-format copy options for notes: HTML (rich text), plain text, and Markdown.

Changes

  • Added "Copy" option with HTML + plain text support
  • Added "Copy as Markdown" option for raw Markdown export
  • Implemented NoteCopyDropdown component
  • Refactored BlinkoCard and FullscreenEditor for new copy functionality
  • Enhanced CommentButton toolbar grouping
  • Updated translations (EN, TR, CN - Chinese pending verification)

Testing

  • Tested copying to Word/Google Docs (rich text format)
  • Tested copying to plain text editors (macOS Notes, Notepad)
  • Tested Markdown export to Markdown editors (Obsidian, Typora)
  • Verified fallback mechanisms for unsupported browsers
  • Checked UI/UX in both light and dark modes
  • Tested attachment URLs are properly included in all formats

Notes

Chinese translations need verification by native speaker.

- Added "Copy as Markdown" and "Copy" options in the context menu for notes.
- Implemented NoteCopyDropdown component for copying note content and attachments.
- Updated translations for English, Chinese (TODO: verify)  and Turkish, and to include new copy options.
- Refactored BlinkoCard and FullscreenEditor components to integrate the new copy functionality.
- Enhanced CommentButton to support toolbar grouping for better UI consistency.
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Mar 29, 2026
Copy link
Copy Markdown
Collaborator

@blinko-space blinko-space left a comment

Choose a reason for hiding this comment

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

Review: Changes requested 🔧

Thanks for this — the core design is nice: clean lib/component split, lazy-loaded marked, proper ClipboardItem fallback chain. A few things to address before merge:

Blockers

  1. Unrelated change in server/package.json — adding the prisma:generate script isn't part of "markdown copy". Please remove from this PR and open a separate one if you want it.

  2. Non-English comments in shared codeapp/src/lib/noteClipboard.ts:73,83 has Turkish JSDoc (Zengin (HTML + düz metin) not kopyası, Yalnızca ham markdown). Please translate to English so future contributors can read it.

  3. New marked dependency (~200KB) — the app already bundles vditor which has its own markdown parser. Please check whether you can reuse that (or another already-present parser) before adding a second one. If a separate parser is genuinely needed, briefly justify it.

  4. i18n is incomplete — you've added copy-markdown, copy-standard, copy-success to en, tr, zh only, but the project ships 15 locales. Users on de/fr/es/ja/ko/... will see raw translation keys. Either:

    • Add at least English-fallback copies of these keys to every locale file, or
    • Confirm in a comment that i18next is configured with EN fallback for missing keys (I can check if you want).
  5. No tests — per CLAUDE.local.md this project requires test coverage for feature PRs. Please add at least:

    • Unit tests for buildFullPlainTextForNote, buildAttachmentUrlsFromNote, markdownToHtmlFragment (pure functions — easy)
    • An integration sanity check that the clipboard lib doesn't throw on empty notes / notes with no attachments / very large notes.

Nits

  • z-[10060] (NoteCopyDropdown/index.tsx:43) — hard-coded z-index. If there's a project z-index token, use it.
  • Clipboard HTML sanitizationmarked.parse(...) output is written to the clipboard unsanitized. Low real-world risk because most paste targets (Gmail, Word, Docs) sanitize incoming HTML, but if notes can contain untrusted content (shared/public notes, AI-generated content), consider running the HTML through DOMPurify before handing it to ClipboardItem.
  • Chinese translations — PR body says they need native-speaker verification. Please resolve before merge (happy to ask the maintainer team).
  • commentButton.tsx toolbarGrouped prop — borderline scope creep but acceptable since the new toolbar layout needs it.

Runtime verification

I'll run the full feature in the Blinko dev server with browser-use on the next review round once the code-level issues are addressed. Happy to verify: Word paste, Obsidian/Typora paste, attachment link appending, light/dark mode, keyboard fallback, and Tauri desktop webview (where ClipboardItem support is spotty).

Once the blockers are resolved, ping me and I'll re-review + do the live testing. 👍

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

Labels

enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants