BoostIO / BoostNote-Legacy

This repository is outdated and new Boost Note app is available! We've launched a new Boost Note app which supports real-time collaborative writing. https://github.com/BoostIO/BoostNote-App
Other
17.06k stars 1.47k forks source link

Note content not being displayed #553

Closed justin-calleja closed 7 years ago

justin-calleja commented 7 years ago

I'm trying to create notes outside of Boostnote and load them into Boostnote.

The storage is being added, and I'm seeing the note in the NoteList. However, the contents are not being displayed. I'm getting the default "Command + N to create a new post".

Here's the setup:

In a directory called "programming" I have the boostnote.json file:

{
  "folders": [
    {
      "key": "electron",
      "color": "SkyBlue ",
      "name": "Electron"
    }
  ],
  "version": "1.0"
}

In a sibling notes directory I have a file electron-links.cson:

type: "MARKDOWN_NOTE"
folder: "electron"
title: "Electron related links"
content: '''
  # Links

  - https://github.com/maxogden/menubar
  - https://github.com/sindresorhus/awesome-electron
  - https://github.com/electron-userland/electron-prebuilt-compile
  - https://github.com/electron/electron-compile
  - https://www.npmjs.com/package/electron-osx-appearance
  - https://www.npmjs.com/package/auto-launch
  - https://www.npmjs.com/package/electron-sudo
  - https://www.npmjs.com/package/electron-localshortcut
  - https://www.npmjs.com/package/babel-preset-electron
  - https://github.com/hardchor/electron-redux
  - https://github.com/felixrieseberg/ember-electron
  - https://electron.atom.io/spectron/
  - https://github.com/sindresorhus/awesome-electron
  - https://github.com/maxogden/electron-microscope
'''
tags: []
isStarred: false
createdAt: "2017-04-24T15:50:15.689Z"
updatedAt: "2017-04-24T17:34:41.156Z"

Do you see anything wrong in this setup? If there's something wrong... why is the storage loaded, note shown in the list... but content not displayed?

Thanks!

asmsuechan commented 7 years ago

@justin-calleja Because your storage is invalid. https://github.com/BoostIO/Boostnote/blob/v0.8.9/browser/main/Detail/index.js#L42

- must not be included the file name. Because a hash used internally has a style like <storageKey>-<noteKey>. And the file name is located in <noteKey> https://github.com/BoostIO/Boostnote/blob/v0.8.9/browser/main/Detail/index.js#L38:L40

After I changed the file name electron-links.cson to electronlinks.cson, it works fine. screen shot 2017-05-05 at 10 16 32

Obviously, It's not expected use case. So it's self-responsibility. And you should not do this if you cannot solve yourself.

justin-calleja commented 7 years ago

@asmsuechan many thanks!