Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get locking information for note and add GitHub action for automatic deploying #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MortalHappiness
Copy link

@MortalHappiness MortalHappiness commented Aug 15, 2023

This PR does the following things:

  • Add a github action for automatic deployment to the gh-pages branch.
  • Getting locking information in Editor.tsx so that we can disable our editor if the note is locked. See the following video.
standardnotes-template-screencast.mp4

I had a hard time figuring out how to implement the second feature because there is little documentation. I think other people will find this feature useful while implementing their own editor.

To achieve the second feature, there are a few changes:

@moughxyz
Copy link
Member

Nice work! We do use yarn for everything in our repos so it would be ideal to stick with that. We can remove the engine requirements from the package.json file. I think it would also be better to update editor-kit with the version of the models package that you need, rather than overriding here, to make things simpler.

@MortalHappiness
Copy link
Author

@moughxyz Thank you! I'll update this PR to use yarn and remove the overrrides filed.
Should I wait for you to remove the engine requirements and the version of the models package or should I submit PRs for them?

@moughxyz
Copy link
Member

Done here standardnotes/app@5bfc608

@MortalHappiness
Copy link
Author

Hi. I still get the following error message:
image
Because the "@standardnotes/models" version is hard-coded as "1.34.3" in the following file:
https://github.com/standardnotes/editor-kit/blob/c554d9f41423b9d4e8bfda847f541554d9aaf3d2/package.json#L21
Maybe it's better to change that to "^1.34.3".

@moughxyz
Copy link
Member

The version of models with the removed engine requirement would have to be higher than the version it was in the fix commit, which was 1.47.8.

@MortalHappiness
Copy link
Author

@moughxyz Yes. I know the engine check has been removed in @standardnotes/models version 1.47.8. However, the problem is that the package @standardnotes/editor-kit, whose latest version is 2.3.1, hard-codes the version of the models dependency in this line.
https://github.com/standardnotes/editor-kit/blob/c554d9f41423b9d4e8bfda847f541554d9aaf3d2/package.json#L21
So whenever I try to install the models package without overwriting the dependency version of the editor-kit package, Yarn will try to install @standardnotes/[email protected] for me, which prevents me to install the latest version of models package and triggers the engine check. Therefore, as I mentioned in the previous comment, maybe it's better to change it to "^1.34.3".

@moughxyz
Copy link
Member

What about upgrading models package in editor kit?

@MortalHappiness
Copy link
Author

Yes. That's another solution. But actually, I think it will be better not to hard-code the dependency version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants