BoostNote-Legacy icon indicating copy to clipboard operation
BoostNote-Legacy copied to clipboard

Editor themes aren't working since the new release

Open dudziecjacek opened this issue 7 years ago • 35 comments

Issuehunt badges

Since new release, editor themes are not working anymore. Only the default one is working.


IssueHunt Summary

awolf81 awolf81 has been rewarded.

Backers (Total: $100.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

dudziecjacek avatar May 22 '19 12:05 dudziecjacek

I have the same issue.

crockels avatar May 22 '19 12:05 crockels

I am also having this issue as well, the only one that seems to be working is the default 🙃

Example of the problem: Boostnote_2019-05-22_14-10-21

I am also seeing the following, not sure if that is normal or part of this issue?: Boostnote_2019-05-22_14-10-59

Settings page: image

OS: Windows 10 The version of Bootnote: Not sure how to pull this info but it asked me to update today.

CLGREEN94 avatar May 22 '19 13:05 CLGREEN94

I have the same issue. This reason is that the file path is wrong. the issue

FYI: I think that is due to the following two lines. https://github.com/BoostIO/Boostnote/blob/d5d564f789fc7b59abf9f253102297f6cfaf363d/browser/main/lib/ConfigManager.js#L138 https://github.com/BoostIO/Boostnote/blob/d5d564f789fc7b59abf9f253102297f6cfaf363d/browser/main/lib/ConfigManager.js#L180 I think that this issue will be fixed if ../ will be removed.

roottool avatar May 22 '19 13:05 roottool

Jep, same issue for me.

Qryptoc avatar May 22 '19 13:05 Qryptoc

I can confirm... it's broken

2019-05-22_15h43_33

TobseF avatar May 22 '19 13:05 TobseF

It's Broken on my side too, exact same issues! Windows 10

jvaldiviezo9 avatar May 22 '19 16:05 jvaldiviezo9

Broken for me too. I messed with it for a bit today and was was able to get it working by making a small change to consts.js.

const themes = paths
  .map(directory => fs.readdirSync(directory).map(file => {
    const name = file.substring(0, file.lastIndexOf('.'))

    return {
      name,
      path: path.join(directory.split(/\//g).slice(-3).join('/'), file),
      className: `cm-s-${name}`
    }
  }))

Changed path to:

const themes = paths
  .map(directory => fs.readdirSync(directory).map(file => {
    const name = file.substring(0, file.lastIndexOf('.'))
    return {
      name,
      path: path.join(CODEMIRROR_THEME_PATH, file),
      className: `cm-s-${name}`
    }
  }))

bwarfson avatar May 22 '19 22:05 bwarfson

This doesn't happen on Linux.

ZeroX-DG avatar May 23 '19 04:05 ZeroX-DG

Broken for me too on Windows 10.

Ljiee avatar May 23 '19 11:05 Ljiee

Got the same issue (also source code theme is not working):

image

GreaTDog avatar May 23 '19 11:05 GreaTDog

On windows 10, I find it can be fixed in \boost\app-0.11.16\resources\app\compiled\main.js line 2823 change to "editorTheme.setAttribute('href', theme.path);"

Thanks Ljee - it worked for me.

GreaTDog avatar May 23 '19 12:05 GreaTDog

However, I find it only works when I open boostnote. If I go to the preference and set the theme, it is invalid again.

Ljiee avatar May 23 '19 12:05 Ljiee

However, I find it only works when I open boostnote. If I go to the preference and set the theme, it is invalid again.

Have the same. Themes stop working after first preferences save.

GreaTDog avatar May 23 '19 12:05 GreaTDog

The same file, line 2867, change to "editorTheme.setAttribute('href', theme.path);" @GreaTDog, I think that might works.

Ljiee avatar May 23 '19 12:05 Ljiee

The same file, line 2867, change to "editorTheme.setAttribute('href', theme.path);" @GreaTDog, I think that might works.

Preferences 'Save' button now seems to be unresponsive. But it saves settings - need to restart boostnotes app to see changes. However the app is usable now - thanks again.

GreaTDog avatar May 23 '19 12:05 GreaTDog

I have same issue for me on Windows 10 since the new release

atez avatar May 23 '19 16:05 atez

Fix in new release for Windows 7, on the advice of @bwarfson

Edit \boost\app-0.11.16\resources\app\compiled\main.js

Find :

	var themes = paths.map(function (directory) {
	  return fs.readdirSync(directory).map(function (file) {
	    var name = file.substring(0, file.lastIndexOf('.'));

	    return {
	      name: name,
	      path: path.join(directory.split(/\//g).slice(-3).join('/'), file),
	      className: 'cm-s-' + name
	    };
	  });
	}).reduce(function (accumulator, value) {
	  return accumulator.concat(value);
	}, []).sort(function (a, b) {
	  return a.name.localeCompare(b.name);
	});

Changed path to:

	var themes = paths.map(function (directory) {
	  return fs.readdirSync(directory).map(function (file) {
	    var name = file.substring(0, file.lastIndexOf('.'));

	    return {
	      name: name,
	      path: path.join(CODEMIRROR_THEME_PATH, file),
	      className: 'cm-s-' + name
	    };
	  });
	}).reduce(function (accumulator, value) {
	  return accumulator.concat(value);
	}, []).sort(function (a, b) {
	  return a.name.localeCompare(b.name);
	});

Octen avatar May 23 '19 16:05 Octen

Same issue for me. It's affecting Boostnote on both PCs I use.

grandslammer avatar May 25 '19 10:05 grandslammer

Same here on Windows 10 after installing the latest release.

irokin avatar May 26 '19 22:05 irokin

This is a very bad bug.why not fix it.

ebony0319 avatar May 27 '19 00:05 ebony0319