obsidian-releases
obsidian-releases copied to clipboard
Add plugin: Calendarium
I am submitting a new Community Plugin
FYI, Calendarium is a partially rewritten version of the archived Fantasy Calendar plugin.
Repo URL
Link to my plugin: https://github.com/javalent/calendarium
Release Checklist
- [x] I have tested the plugin on
- [x] Windows
- [x] macOS
- [x] Linux
- [x] Android (if applicable)
- [x] iOS (if applicable)
- [x] My GitHub release contains all required files
- [x]
main.js
- [x]
manifest.json
- [x]
styles.css
(optional)
- [x]
- [x] 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
) - [x] The
id
in mymanifest.json
matches theid
in thecommunity-plugins.json
file. - [x] My README.md describes the plugin's purpose and provides clear usage instructions.
- [x] I have read the developer policies at https://docs.obsidian.md/Developer+policies, and have assessed my plugins's adherence to these policies.
- [x] 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.
- [x] I have added a license in the LICENSE file.
- [x] 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
.
Hello!
I found the following issues in your plugin submission
Warnings:
:warning: The authorUrl
field in your manifest should not point to the GitHub repository of the plugin.
This check was done automatically. Do NOT open a new PR for re-validation. Instead, to trigger this check again, make a change to your PR and wait a few minutes, or close and re-open it.
Thank you for your submission, an automated scan of your plugin code's revealed the following issues:
Required
[1][2]:You should change all instances of var
to either const
or let
. var
has function-level scope, so it can easily lead to bugs if you're not careful. Here's a pretty good guide with examples of why not to use var
: why var
is obsolete
[1]:Using innerHTML
, outerHTML
or similar API's is a security risk. Instead, use the DOM API or the Obsidian helper functions: https://docs.obsidian.md/Plugins/User+interface/HTML+elements
[1][2]:Obsidian's configuration directory isn't necessarily .obsidian
, it can be configured by the user. You can access the configured value from Vault#configDir
[1]:You should not cast this, instead use a instanceof
check to make sure that it's actually a file/folder
[1]:The command name should not include the plugin name.
[1]:Lookbehinds are not supported in iOS versions before 16.4
Optional
[1]:Casting to any
should be avoided as much as possible.
Do NOT open a new PR for re-validation.
Once you have pushed all of the required changes, the bot will reevaluate your PR within 6 hours.
If you think some of these results are incorrect, please include /skip
in your comment and the reason why you think the results are incorrect.
/skip any cast is due to worker context interop with esbuild
This plugin was quite easy to review, good organization and a clean code style. I did find a few things though:
Copyright (c) 2021 valentine195 Update the year.
interface Plugin { This declaration is no longer necessary, the correct function is now exposed.
async handleConfigFileChange() { This is also no longer necessary, but you should increase the minAppVersion, as there was a bug on Windows up until 1.5.7.
name: "Rescan Events",, name: "Rescan Events for Calendar",, .setTooltip("Launch Quick Creator"), this.titleEl.setText(this.editing ? "Edit Event" : "New Event");, , ${this.creating ? "Create" : "Modify"} Month
);, this.titleEl.setText(${this.creating ? "Create" : "Modify"} Weekday
);, name={"Display Moons"}, moon={{ ...moon, phase: "First Quarter" }}, name={"Show Intercalary Months Separately"}, name={"Delete All Events"}, name={"Support Inline Events"}, item.setTitle("Go to Day").onClick(() => {, ${$displayWeeks ? "Hide" : "Display"} Week Numbers
,, $displayMoons ? "Hide Moons" : "Display Moons",, $displayDayNumber ? "Hide Day Number" : "Display Day Number",, item.setTitle("Edit Event").onClick(() => {, item.setTitle("Delete Event").onClick(() => {
Use sentence case in UI
console.log(, console.log(
Is there a reason why these two are console.log
and not console.warn
/console.error
?
Both functions look to be doing exactly the same thing here.
import {
This entire file should no longer be requred, we now expose the AbstractInputSuggest
interface that, when implemented will serve the same purpose.
this.app.workspace.on("calendarium-settings-external-load", () => Don't forget to register this event.
this.containerEl.createEl("h2", { text: "Calendarium" }); Don't include a header with the plugin name in the settings
Optional
if (file && file instanceof TFile) {
Just a small tip, there is getFileByPath
now, which removes the need for the instanceof
(You don't need to change this)
"@types/node": "^20.6.3", The oldest Obsidian version that still receives updates is using Node 16, I don't see any uses of newer API's though as the plugin is mobile compatible.
All should be fixed (except the Optional :) )
This entire file should no longer be requred, we now expose the AbstractInputSuggest interface that, when implemented will serve the same purpose.
FYI, you will notice that I am not directly using this new class in this plugin, but the module I am using does ultimately use it along with some other niceties that I have discussed with Liam.