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: Varinote #4752

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Add plugin: Varinote #4752

wants to merge 8 commits into from

Conversation

gsarig
Copy link

@gsarig gsarig commented Nov 25, 2024

I am submitting a new Community Plugin

Repo URL

Link to my plugin:

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.

Copy link

Hello!

I found the following issues in your plugin submission

Errors:

❌ Please don't use the word obsidian in the plugin ID. The ID is used for your plugin's folder so keeping it short and simple avoids clutter and helps with sorting.


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.

@github-actions github-actions bot changed the title Add Varinote plugin Add plugin: Varinote Nov 25, 2024
@gsarig gsarig marked this pull request as ready for review November 25, 2024 14:32
@ObsidianReviewBot
Copy link
Collaborator

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

Required

[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


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 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 self-assigned this Nov 26, 2024
@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 Nov 26, 2024
@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 Dec 1, 2024
@ObsidianReviewBot ObsidianReviewBot removed their assignment Dec 1, 2024
@ObsidianReviewBot
Copy link
Collaborator

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

@joethei joethei removed their assignment Dec 2, 2024
Copy link
Collaborator

@Zachatoo Zachatoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remade this comment below.

@Zachatoo Zachatoo self-assigned this Dec 5, 2024
@Zachatoo Zachatoo added the Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made label Dec 5, 2024
@Zachatoo
Copy link
Collaborator

While fixing the Modal display when switching notes was easy, I am not sure what's the best way to do it to prevent it when the vault opens.

You can use Workspace.onLayoutReady(). For example:

this.app.workspace.onLayoutReady(() => {
  this.registerEvent(this.app.vault.on('create', (file: TAbstractFile) => {
    this.handleFileCreate(file);
  }));
});

The process change you've made is correct, nice job!

@gsarig
Copy link
Author

gsarig commented Dec 14, 2024

While fixing the Modal display when switching notes was easy, I am not sure what's the best way to do it to prevent it when the vault opens.

You can use Workspace.onLayoutReady(). For example:

this.app.workspace.onLayoutReady(() => {
  this.registerEvent(this.app.vault.on('create', (file: TAbstractFile) => {
    this.handleFileCreate(file);
  }));
});

Thanks @Zachatoo I've applied your suggested and now it is ready for a re-check.

@ObsidianReviewBot
Copy link
Collaborator

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

Required

[1][2][3][4]:You should avoid assigning styles via JavaScript or in HTML and instead move all these styles into CSS so that they are more easily adaptable by themes and snippets.


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 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 Ready for review and removed Ready for review Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made labels Dec 14, 2024
@ObsidianReviewBot ObsidianReviewBot removed their assignment Dec 14, 2024
@ObsidianReviewBot
Copy link
Collaborator

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

@ObsidianReviewBot
Copy link
Collaborator

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

@ObsidianReviewBot
Copy link
Collaborator

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


Optional

[1]:Casting to any should be avoided as much as possible.


Do NOT open a new PR for re-validation.

@ObsidianReviewBot ObsidianReviewBot removed their assignment Dec 20, 2024
@joethei joethei assigned joethei and unassigned liamcain Dec 20, 2024
@joethei joethei added Changes requested Minor changes requested PR can be merged after some final changes have been requested and removed Ready for review labels Jan 3, 2025
@gsarig
Copy link
Author

gsarig commented Jan 5, 2025

Hi @joethei Thanks for the feedback. I've addressed the issues that you flagged, except for that one:

export function createTooltip(container: HTMLElement, initialValue: number): HTMLElement { The Obsidian API exports the setTooltip function for this purpose.

For that one, I already tried to use setDynamicTooltip a few weeks ago, but the problem was that I wanted to have the value always visible on a fixed position:

image

When I tried it, I noticed 2 problems for what I wanted to do:

  1. setDynamicTooltip would append the tooltip on mouseover but would remove it on mouseout, so I couldn't keep it on a fixed position with CSS.
  2. If I remember correctly (it's been a while since I tried it), even on mouseover, it wouldn't follow the slider, which would make more sense for the way that it was supposed to work.

The most important reason that I didn't go with it, though, was the first, as I wanted to show the value all the time.

Is this OK with you or should I try a different approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes requested Minor changes requested PR can be merged after some final changes have been requested plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants