Local extension development issues
siralmat opened this issue · comments
I forked the repo to make a few changes (e.g. adding keyboard shortcuts) and ran into some teething problems while getting a local build up and running. I got there in the end, but wanted to share my experiences and suggest adding a short development section to the readme to help others get started.
- The April commit 338f01b replaced
browser-polyfill.js
with its npm package; previously the compiled library was included. I assumed this was unintentional and just dropped in the updated library. - When running in a dev environment, the extension uses a different port range to connect to the desktop client. I fixed this by specifying the port in the extension options, but I think a note in the readme would be helpful. A couple of related points:
- Viewing the current port from inside the client (MacOS) is a little non-obvious. I found it by opening the backend log and scrolling back to the server startup message. I can't see a way to change the port within the UI either.
- It seems that the port scan will trigger every 60s indefinitely, which seems unnecessary when Trilium will likely remain available on the same port. After finding a client, shouldn't the extension persist the port for the session and only trigger a new scan if a connection fails? Can local scans be disabled for cases where the user only has a server instance?
- The release scripts depend on
sponge
,jq
, and the GNUdate
utility (the iso-8601 option is not supported on MacOS). Of course, not an issue for anyone other than the project owner anyway... just including for the sake of completeness 😜
Thanks for all your hard work on Trilium and this extension! I have keyboard shortcuts working (shockingly simple to implement) and am planning to submit a PR if that's OK, though the default shortcuts need testing to make sure they're valid for other platforms.
Hi, I haven't looked at the web clipper project in a while. What you're writing makes sense, if you feel like fixing some of those issues, then feel free to drop some PR.
I will be also eagerly awaiting the PR for keyboard shortcuts :-)