BoostIO/Boostnote

Editor themes aren't working since the new release #3018

jacekdudziec posted onGitHub

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


I have the same issue.

posted by crockels almost 6 years ago

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.

posted by CLGREEN94 almost 6 years ago

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.

posted by roottool almost 6 years ago

Jep, same issue for me.

posted by Qryptoc almost 6 years ago

I can confirm... it's broken

2019-05-22_15h43_33

posted by TobseF almost 6 years ago

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

posted by jvaldiviezo9 almost 6 years ago

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}`
    }
  }))
posted by bwarfson almost 6 years ago

This doesn't happen on Linux.

posted by ZeroX-DG almost 6 years ago

Broken for me too on Windows 10.

posted by Ljiee almost 6 years ago

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

image

posted by GreaTDog almost 6 years ago

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.

posted by GreaTDog almost 6 years ago

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

posted by Ljiee almost 6 years ago

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.

posted by GreaTDog almost 6 years ago

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

posted by Ljiee almost 6 years ago

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.

posted by GreaTDog almost 6 years ago

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

posted by atezhill almost 6 years ago

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);
    });
posted by Octen almost 6 years ago

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

posted by grandslammer almost 6 years ago

Same here on Windows 10 after installing the latest release.

posted by irokin almost 6 years ago

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

posted by ebony0319 almost 6 years ago

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.

This worked for me on windows 10. But the line was 2436 for release 11.17.

posted by refactoredjello almost 6 years ago

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's solution worked for Boostnote version 11.16. When updated to ver 11.17, the fix no longer works sadly. I'm running on windows 10.

posted by amizan8653 almost 6 years ago

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's solution worked for Boostnote version 11.16. When updated to ver 11.17, the fix no longer works sadly. I'm running on windows 10.

my version is 0.11.17 and Octen's solustion is still work for me. I'm running on windows 10 too.

posted by Loner233 almost 6 years ago

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's solution worked for Boostnote version 11.16. When updated to ver 11.17, the fix no longer works sadly. I'm running on windows 10.

my version is 0.11.17 and Octen's solustion is still work for me. I'm running on windows 10 too.

Worked for me also..!

posted by guruathwal almost 6 years ago

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's solution worked for Boostnote version 11.16. When updated to ver 11.17, the fix no longer works sadly. I'm running on windows 10.

my version is 0.11.17 and Octen's solustion is still work for me. I'm running on windows 10 too.

Worked for me also..!

Ah.... I tried Octen's solution again on my home windows 10 computer and it works... I probably just did something stupid on my work computer, like changing the file boost\app-0.11.16\resources\app\compiled\main.js instead of boost\app-0.11.17\resources\app\compiled\main.js. Sorry guys

posted by amizan8653 almost 6 years ago

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}`
    }
  }))

I was unable to export file as html, this update worked for me as well. Note, path for version used was "C:\Users\zhumphrey\AppData\Local\boost\app-0.11.17\resources\app\compiled".

Boostnote version 11.16 updated to version 11.17 on Windows 10.

posted by wacsintegra almost 6 years ago

@boostio has funded $80.00 to this issue.


posted by IssueHuntBot almost 6 years ago

Changing the path as suggested also worked for me on win 10.

Should this be provided as a PR? Any reasons why this is not done yet?

posted by michaelw85 almost 6 years ago

@michaelw85 There's a PR for that (waiting to be merged): https://github.com/BoostIO/Boostnote/pull/3048

posted by ZeroX-DG almost 6 years ago

@ZeroX-DG Ok great! I overlooked the PR linked to this issue, it's somewhere in the middle of the thread 😅.

posted by michaelw85 almost 6 years ago

Great! Octen's Solution also worked for me. Thank u very much.@Octen Running Boostnote 0.11.17 on Windows 10.

posted by RunningIkkyu over 5 years ago

Thanks, @Octen. Your fix worked for me (0.11.17, Win 10). This had been bothering me for at least a couple of weeks now.

posted by mukilkrishnan over 5 years ago

@elliptic-shiho has funded $20.00 to this issue.


posted by issuehunt-app[bot] over 5 years ago

The fix for this #3048 has been merged and will be part of the next release 0.12.0

posted by Flexo013 over 5 years ago

@rokt33r has rewarded $90.00 to @awolf81. See it on IssueHunt

  • :moneybag: Total deposit: $100.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $10.00
posted by issuehunt-app[bot] over 5 years ago

Fund this Issue

$100.00
Rewarded

Rewarded pull request

Recent activities

awolf81 was rewarded by rokt33r for BoostIo/Boostnote# 3018
over 5 years ago
elliptic-shiho funded 20.00 for BoostIo/Boostnote# 3018
over 5 years ago