[PR #691] [CLOSED] Add initial open note-link functionality (#313) #848

Closed
opened 2026-03-03 00:23:28 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BoostIO/BoostNote-App/pull/691
Author: @Komediruzecki
Created: 11/18/2020
Status: Closed

Base: masterHead: feature/link-to-another-note


📝 Commits (2)

  • 3b25256 Add initial open note-link functionality (#313)
  • 6fa751d Fix CI failing, prettier

📊 Changes

17 files changed (+524 additions, -23 deletions)

View changed files

📝 src/components/App.tsx (+48 -4)
📝 src/components/atoms/CodeEditor.tsx (+10 -0)
📝 src/components/atoms/MarkdownPreviewer.tsx (+81 -6)
📝 src/components/molecules/FolderNoteNavigatorFragment.tsx (+8 -0)
📝 src/components/molecules/NoteItem.tsx (+37 -6)
📝 src/components/molecules/NoteNavigatorItem.tsx (+48 -2)
📝 src/components/molecules/StorageNavigatorFragment.tsx (+2 -0)
📝 src/lib/CodeMirror.ts (+5 -0)
src/lib/addons/hyperlink.js (+186 -0)
📝 src/lib/db/FSNoteDb.ts (+7 -0)
📝 src/lib/db/PouchNoteDb.ts (+7 -0)
📝 src/lib/db/consts.ts (+2 -0)
📝 src/lib/db/createStore.ts (+47 -0)
📝 src/lib/db/utils.ts (+20 -3)
📝 src/lib/nav.ts (+13 -0)
📝 static/main-preload.js (+2 -1)
📝 tsconfig.json (+1 -1)

📄 Description

Add note-link functionality (#313)

Add copy note link menu option (NoteItem.tsx)
Update db API for creating a note link (createstore, FSNoteDb, PouchNoteDb)
Add codemirror hyperlink addon
Add codemirror hyperlink addon css style (CodeEditor.tsx)
Initialize hyperlink addon (CodeMirror.ts)
Add event handling of editor ctrl+click link with ipc (App.tsx)
Add regexes for note link shortId (MarkdownPreviewer.tsx)
Add handling of rendering and clicking of note link in md preview
Fix invalid logic in prependNoteIdPrefix (should return prefixed noteId when no prefix is found)

Fix electron only API
Fix getWebContentsById to be initialized
Fix hyperlink to use electron only API
Fix macos binding in hyperlink

Copy link option:
CopyNoteLink

Hovering over note link inside editor:
EditorNoteLinkPopup

Hovering on note link in markdown preview:
HoverOnLinkMd

Test:
In electron Linux App (dev)
In electron Linux App production version (appImage)

Improvements:

  • See if we can use similar logic as linkify-remark to get links and then remove our prefixes (:note: etc) instead of directly removing note content for md preview to be able to consider it a link
  • Style the md preview link better
  • Add note link copied message
  • Add status in status bar (when comes) that something is in clipboard
  • Add better export (how to handle?) of links to another note

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BoostIO/BoostNote-App/pull/691 **Author:** [@Komediruzecki](https://github.com/Komediruzecki) **Created:** 11/18/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feature/link-to-another-note` --- ### 📝 Commits (2) - [`3b25256`](https://github.com/BoostIO/BoostNote-App/commit/3b252565d54315486425653f0946cf0c64aad7a0) Add initial open note-link functionality (#313) - [`6fa751d`](https://github.com/BoostIO/BoostNote-App/commit/6fa751de757fb99fdf433e50c52cea35c78b5706) Fix CI failing, prettier ### 📊 Changes **17 files changed** (+524 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `src/components/App.tsx` (+48 -4) 📝 `src/components/atoms/CodeEditor.tsx` (+10 -0) 📝 `src/components/atoms/MarkdownPreviewer.tsx` (+81 -6) 📝 `src/components/molecules/FolderNoteNavigatorFragment.tsx` (+8 -0) 📝 `src/components/molecules/NoteItem.tsx` (+37 -6) 📝 `src/components/molecules/NoteNavigatorItem.tsx` (+48 -2) 📝 `src/components/molecules/StorageNavigatorFragment.tsx` (+2 -0) 📝 `src/lib/CodeMirror.ts` (+5 -0) ➕ `src/lib/addons/hyperlink.js` (+186 -0) 📝 `src/lib/db/FSNoteDb.ts` (+7 -0) 📝 `src/lib/db/PouchNoteDb.ts` (+7 -0) 📝 `src/lib/db/consts.ts` (+2 -0) 📝 `src/lib/db/createStore.ts` (+47 -0) 📝 `src/lib/db/utils.ts` (+20 -3) 📝 `src/lib/nav.ts` (+13 -0) 📝 `static/main-preload.js` (+2 -1) 📝 `tsconfig.json` (+1 -1) </details> ### 📄 Description **Add note-link functionality (#313)** Add copy note link menu option (NoteItem.tsx) Update db API for creating a note link (createstore, FSNoteDb, PouchNoteDb) Add codemirror hyperlink addon Add codemirror hyperlink addon css style (CodeEditor.tsx) Initialize hyperlink addon (CodeMirror.ts) Add event handling of editor ctrl+click link with ipc (App.tsx) Add regexes for note link shortId (MarkdownPreviewer.tsx) Add handling of rendering and clicking of note link in md preview Fix invalid logic in prependNoteIdPrefix (should return prefixed noteId when no prefix is found) **Fix electron only API** Fix getWebContentsById to be initialized Fix hyperlink to use electron only API Fix macos binding in hyperlink Copy link option: ![CopyNoteLink](https://user-images.githubusercontent.com/18196945/99583026-30ebb200-29e3-11eb-95ce-e6d4a13eaf51.png) Hovering over note link inside editor: ![EditorNoteLinkPopup](https://user-images.githubusercontent.com/18196945/99583047-3a751a00-29e3-11eb-9bf2-ec4789556630.png) Hovering on note link in markdown preview: ![HoverOnLinkMd](https://user-images.githubusercontent.com/18196945/99583066-4234be80-29e3-11eb-94b3-7f5059ae48f1.png) **Test:** In electron Linux App (dev) In electron Linux App production version (appImage) Improvements: - [ ] See if we can use similar logic as linkify-remark to get links and then remove our prefixes (:note: etc) instead of directly removing note content for md preview to be able to consider it a link - [ ] Style the md preview link better - [x] Add note link copied message - [x] Add status in status bar (when comes) that something is in clipboard - [ ] Add better export (how to handle?) of links to another note --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 00:23:28 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/BoostNote-App#848
No description provided.