Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

Electron/React rewrite. #51

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Electron/React rewrite. #51

wants to merge 12 commits into from

Conversation

octalmage
Copy link
Owner

@octalmage octalmage commented Sep 24, 2017

This is a ground up rewrite of Markdown using modern technologies. The current stack is NW.js/Polymer/jQuery/localStorage. Together these don't make a maintainable application, especially since it's a very old version of Polymer (pre 1.0) and NW.js (back when it was called node-webkit). Instead we'll use Electron/React/Filesystem.

The new Marknote is much quicker. I've got over a hundred notes and the old Marknote is slow to start for me, and it's also slow to render my larger notes. The new Marknote loads instantly and there's no delay with note rendering.

Resolves #49.
Resolves #48.
Resolves #42.
Resolves #37.
Resolves #36.
Resolves #25.
Resolves #16.

Things that still need to be done:

  • Firebase syncing.
  • Import from old Marknote. The old system used lawnchair (localStorage) to store notes, the new system persists them to the filesystem (which is safer). There needs to be a way to import the old notes. One option is the JavaScript console on the old system, I've done this before. Another option is Firebase, but not all users will want to use that.

A possible solution:

  • In the old Marknote hit the keys Command+Option+i to open the dev tools.
  • Paste this code and hit enter:
clipboard.set(JSON.stringify(JSON.parse(localStorage['records.notes']).notes));

Then in the new Marknote use the same hotkeys as above, and run this code in the console:

MarknoteImportNotes(require('electron').remote.clipboard.readText());
  • Search. The current search system is a hack of the built in browser search system, and it's not great. It would be also to have real search.
  • Checkbox support. The old Markdown supported GitHub flavor markdown and supported checkboxes. This means on click it would re-save the markdown with the checkbox toggled.
  • Update tests and build pipeline. Binaries are built for each platform on tag and published to GitHub. There are also selenium tests. These need to be updated.
  • Drop support for images.
  • External link support, Electron is opening the links in the Electron frame.
  • Auto linking links.
  • Syntax highlighting.
  • Settings dialog for things like word wrap, and sync options.

Things that exist in the old Marknote but aren't implemented (and might not get implemented):

  • Plugin system, this has probably never been used and probably isn't necessary. Docs here: https://github.com/octalmage/Marknote/wiki/Plugin-API
  • Inline JavaScript. Inline script tags don't work, but onClick handlers do. This may be enough.
  • API for inline JavaScript. One nice feature of inline JavaScript was the ability to access functions like createNote, or duplicateNote. But again this might not be needed.

@mjchamplin
Copy link
Collaborator

Awesome work. I've been using Bear but I can't wait to try the new Marknote.

Let me know if you want any UI help with the new updates. ✌️

@octalmage
Copy link
Owner Author

octalmage commented Oct 16, 2017

@mjchamplin Nice man! Bear looks amazing! Also looks like they had the same idea for tags:

#40

I still use Marknote everyday myself, and I'm mostly using React and Electron these days, so I wanted to update it so it's easy for me to continue to work on. The big changes will be performance and stability, the new React UI is much faster. Currently I'm just trying to reach feature parity, which turned out to be more work that I expected.

@octalmage
Copy link
Owner Author

Ugh, I'm trying to use this on a Chromebook today and I thought I already implemented Firebase syncing. The app works with this branch but no notes. :(

@mjchamplin
Copy link
Collaborator

That seems like a pretty key feature 😳

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants