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

Add plugin: Yesterday's note #5159

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trevortylerlee
Copy link

@trevortylerlee trevortylerlee commented Jan 16, 2025

I am submitting a new Community Plugin

Repo URL

Link to my plugin: https://github.com/trevortylerlee/yesterdays-note

Release Checklist

  • I have tested the plugin on
    • Windows
    • macOS
    • Linux
    • Android (if applicable)
    • iOS (if applicable)
  • My GitHub release contains all required files (as individual files, not just in the source.zip / source.tar.gz)
    • main.js
    • manifest.json
    • styles.css (optional)
  • GitHub release name matches the exact version number specified in my manifest.json (Note: Use the exact version number, don't include a prefix v)
  • The id in my manifest.json matches the id in the community-plugins.json file.
  • My README.md describes the plugin's purpose and provides clear usage instructions.
  • I have read the developer policies at https://docs.obsidian.md/Developer+policies, and have assessed my plugins's adherence to these policies.
  • I have read the tips in https://docs.obsidian.md/Plugins/Releasing/Plugin+guidelines and have self-reviewed my plugin to avoid these common pitfalls.
  • I have added a license in the LICENSE file.
  • My project respects and is compatible with the original license of any code from other plugins that I'm using.
    I have given proper attribution to these other projects in my README.md.

@ObsidianReviewBot
Copy link
Collaborator

Thank you for your submission, an automated scan of your plugin code's revealed the following issues:

Required

[1][2]:You should not cast this, instead use a instanceof check to make sure that it's actually a file/folder.


Do NOT open a new PR for re-validation.
Once you have pushed all of the required changes to your repo, the bot will update the labels on this PR within 6 hours.
If you think some of the required changes are incorrect, please comment with /skip and the reason why you think the results are incorrect.

@ObsidianReviewBot ObsidianReviewBot added Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made and removed Ready for review labels Jan 16, 2025
@trevortylerlee
Copy link
Author

I've refactored the code to use the instanceof check to validate if the file/folder exists.

@ObsidianReviewBot ObsidianReviewBot added Ready for review and removed Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made labels Jan 16, 2025
@ObsidianReviewBot ObsidianReviewBot removed their assignment Jan 16, 2025
@ObsidianReviewBot
Copy link
Collaborator

Changes requested by bot have been made, ready for additional review by human.

@Zachatoo
Copy link
Collaborator

"fundingUrl": "https://trevortylerlee.com",
This is meant for links to services like Buy me a coffee, GitHub sponsors and so on, if you don't have such a link remove this line.

return await this.app.vault.read(templateFile);
Prefer to use Vault.cachedRead() over Vault.read() when you aren't going to be modifying the file

const leaf = this.app.workspace.getUnpinnedLeaf();
Prefer to not use deprecated APIs. Please use getLeaf(false) instead.


Is there an expected use case for the Daily Note settings and your plugin's settings to differ? For example, for the Daily Note's date format and your plugin's date format setting to be different? I would recommend either removing settings from your plugin that can be inherited from the Daily Notes plugin settings, or adding a description to each setting that defaults to the Daily Note plugin settings to make it clear that it will inherit the Daily Note plugin setting, and that the user does not need to fill out that setting.

@Zachatoo Zachatoo self-assigned this Jan 29, 2025
@Zachatoo Zachatoo added Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made and removed Ready for review labels Jan 29, 2025
@trevortylerlee
Copy link
Author

trevortylerlee commented Jan 29, 2025

Thanks for the feedback, made the following changes:

  • use Vault.cachedRead() instead of Vault.read()
  • use getLeaf(false) instead of getUnpinnedLeaf()
  • remove unnecessary settings and use default Daily note settings
    • remove custom date format
    • remove custom note location
    • remove custom template

@ObsidianReviewBot ObsidianReviewBot added Ready for review and removed Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made labels Jan 29, 2025
@ObsidianReviewBot
Copy link
Collaborator

Changes requested by Zachatoo have been made, assigning additional human for additional review

@joethei
Copy link
Collaborator

joethei commented Jan 30, 2025

Please remove the "Obsidian" branding from the image in your README, that makes it look like this is an official product.

@trevortylerlee
Copy link
Author

Done.

@trevortylerlee
Copy link
Author

@joethei Changes have been made, can you take another look?

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

Successfully merging this pull request may close these issues.

4 participants