obsidian-releases icon indicating copy to clipboard operation
obsidian-releases copied to clipboard

Chronology 1.0.0 submission

Open Canna71 opened this issue 1 year ago • 2 comments

I am submitting a new Community Plugin

Repo URL

Link to my plugin:

Release Checklist

  • [x] I have tested the plugin on
    • [x] Windows
    • [x] macOS
    • [x] Linux
    • [ ] 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] 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 my manifest.json matches the id in the community-plugins.json file.
  • [x] My README.md describes the plugin's purpose and provides clear usage instructions.
  • [x] I have read the tips in https://github.com/obsidianmd/obsidian-releases/blob/master/plugin-review.md 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.

Canna71 avatar Sep 18 '22 10:09 Canna71

Forgot to add link : https://github.com/Canna71/obsidian-chronology

Quorafind avatar Sep 18 '22 10:09 Quorafind

Terribly sorry...

Canna71 avatar Sep 18 '22 11:09 Canna71

This looks fancy.

export function debounce(func: ()=>any, timeout = 300){ Obsidian provides its own debounce

function isMacOS() { You can check for Platform.isMacOS instead.

joethei avatar Sep 29 '22 13:09 joethei

About the custom debounce() I think in the end I am not using it since I discovered Obsidian provides its own debounce, but I must have left it in the code :-). I will for sure change isMacOS to use Obsidian's one, thank you for pointing that out!

On Thu, Sep 29, 2022 at 3:56 PM Johannes Theiner @.***> wrote:

This looks fancy.

export function debounce(func: ()=>any, timeout = 300){ https://github.com/Canna71/obsidian-chronology/blob/9d02ca6083f7ad921c5d058733c4666bdd35f853/src/utils.ts#L28-L34 Obsidian provides its own debounce https://github.com/obsidianmd/obsidian-api/blob/1b4f6e2e5753c8ac2d538bc5d55c38f228450cb2/obsidian.d.ts#L763-L772

function isMacOS() { https://github.com/Canna71/obsidian-chronology/blob/9d02ca6083f7ad921c5d058733c4666bdd35f853/src/Views/TimeLine.tsx#L11 You can check for Platform.isMacOS https://github.com/obsidianmd/obsidian-api/blob/1b4f6e2e5753c8ac2d538bc5d55c38f228450cb2/obsidian.d.ts#L2580 instead.

— Reply to this email directly, view it on GitHub https://github.com/obsidianmd/obsidian-releases/pull/1177#issuecomment-1262322135, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIOYB2CFZM3MKBPRH55SZ3WAWNX7ANCNFSM6AAAAAAQPMPLV4 . You are receiving this because you authored the thread.Message ID: @.***>

-- Gabriele Cannata

Canna71 avatar Sep 29 '22 14:09 Canna71

  • detachLeavesOfType Since Obsidian will actually restore unregistered views when they become available again (for example, if the user disables the plugin, then re-enables it). So it's actually preferable to leave the leaf on unload.
  • detachLeavesOfType since this will change the order of sidebar items and potentially lose the plugin state for the user, maybe just check if the view is loaded, and if so, only call revealLeaf.
  • addIcon Maybe call removeIcon inside addIcon to avoid adding multiple ribbon items
  • this.ribbonIconEl.remove you should also set this.ribbonIconEl = null, otherwise this will only work once.
  • isMetaPressed You should remove onMetaPressed and instead use isModEvent. That will handle all of the new Obsidian v0.15+ features, including opening in tabs and pop-out windows.
  • vaultVer: 0 vaultVer looks unused, maybe remove it?

liamcain avatar Oct 10 '22 21:10 liamcain

Thank you, I tried following your suggestions!

Canna71 avatar Oct 12 '22 16:10 Canna71