andrejilderda / joplin-macos-native-theme

Native looking macOS theme for note taking app Joplin
MIT License
279 stars 14 forks source link

Versions ≥1.3.15 missing note list highlight color with Joplin ~2.9 #125

Closed ernstki closed 5 months ago

ernstki commented 5 months ago

@andrejilderda, nothing here requires your attention, because I'm using an old and probably unsupported version of Joplin, and the correct answer is probably just "update Joplin" However, I am stubborn and didn't want to.

I thought this would be a fun thing to try and puzzle out, and I'm just documenting the process for posterity—in case any other upgrade-averse weirdos end up in this situation—after which I'll close the issue.

Thanks for your efforts making this stellar theme!

The problem

The active note in the notes list is missing the highlight color, with the macOS theme, blue highlight, light mode in main Joplin settings (Joplin 2.9.17).

Animated GIF showing the act of selecting one note and then the other -- there is no highlight color

I had been running 1.3.13 of the joplin-macos-native-theme plugin. I want to revert to that version, but as explained in this Joplin forum post, that can be tricky, unless the .jpl file is published as an asset alongside the GitHub releases, which not all plugin projects do. (No judgements—these are free-time hobby projects!)

Context

Somewhere around release 1.3.15, probably to keep pace with a Joplin update, the CSS for the selected note in the notes list was changed in a way that was backward-incompatible with Joplin circa 2.9.

There are no tagged releases earlier than 1.3.15, so some digging in the Git history was required.

Another wrinkle is that I use an LTS version of an Ubuntu-based OS (elementaryOS Jólnir), whose nodejs package tops out at 10.something. I don't need Node.js, so I'm resistant to installing any more packages just to build this one .css file. Life is far too short to go down another JavaScript rabbit-hole unless absolutely necessary.

This is a job for Docker.

Workaround

Uninstall the current version of the plugin, then build and install version 1.3.13. If you already have Node.js ≥12, you can just git checkout 0c6ba0e, then follow the build instructions from the README.

I chose to use node:12-slim from Docker Hub and throw away the container after npm run dist is done, instead of installing OS-level Node.js packages.

$ cd ~wherever/you/put/source/code
$ git clone https://github.com/andrejilderda/joplin-macos-native-theme.git

$ git log --oneline | grep 'Initial commit'  # where to start looking (ba898c3)

$ git log -L 1,5:package.json ba898c3..v1.3.15  # find 1.3.13 (0c6ba0e)

$ git checkout 0c6ba0e  # check out that revision

$ docker run --rm -it --user=$UID -v .:/src node:12-slim \
              bash -c 'cd /src && npm install && npm run dist'

Then note the path to publish/com.andrejilderda.macOSTheme.jpl and install that within Joplin:

Animated GIF showing the process for installing the `.jpl` file in Joplin's settings

Helpful links

ernstki commented 5 months ago

Closing as stated in the description above.

andrejilderda commented 5 months ago

Thanks @ernstki for figuring this out and documenting this. 👌

For getting the .jpl's of older versions of this plugin this is the easy way:

This will download a tarball you can unzip that contains the .jpl-file in the publish folder.

ernstki commented 5 months ago

This will download a tarball you can unzip that contains the .jpl-file in the publish folder.

Ha! I suspected that might be the case, but this was good training. ;)

Thanks again, love the theme, and appreciate all the work you and contributors have done keeping it going.