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: Simple Disguise #4856

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

Conversation

slow-groovin
Copy link

I am submitting a new Community Plugin

Repo URL

Link to my plugin: https://github.com/slow-groovin/simple-disguise

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.

@github-actions github-actions bot changed the title Add [simple-disguise] plugin Add plugin: Simple Disguise Dec 9, 2024
@ObsidianReviewBot
Copy link
Collaborator

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

Required

[1]:Remember to rename the sample classes to something that makes sense to your plugin. If there are any errors, Obsidian will spit out this class name, so this will be important for users to debug if they need to.


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 10, 2024
@ObsidianReviewBot ObsidianReviewBot removed their assignment Dec 10, 2024
@ObsidianReviewBot
Copy link
Collaborator

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

@Zachatoo
Copy link
Collaborator

# Sample disguise / 简单伪装
This heading does not match your plugin name, should this be Simple disguise?

"description": "disguise/obscure/hide the content in a very simple way.",
Use sentence case in UI. This is going to show in the community plugins section so it should follow the same casing to be consistent.

console.log('onload'), console.log('onunload')
Please avoid unnecessary logging. If you need it for debugging purposes, add a check to only log during development.

this.styleEnabled = !this.styleEnabled;, const tabContainer=view?.containerEl?.parentElement?.parentElement, const tabContainer=view?.containerEl?.parentElement?.parentElement
Since you're only adding the class to the active split (left, root, or right), there can be some weird behavior where this value may be true but the active split doesn't have the css class, or vice versa. You may want to reconsider how you approach this. You have to get the DOM element anyways to either add or remove your class, so I would recommend not storing this state and instead check the DOM element directly. If you instead want your styling to apply to all splits, you may want to reconsider how or where you're adding the css class.

@Zachatoo Zachatoo self-assigned this Dec 12, 2024
@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 Dec 12, 2024
slow-groovin added a commit to slow-groovin/simple-disguise that referenced this pull request Dec 12, 2024
Change `toggleStyle` implementation, now use global document object to get workspace root element to toggle class
@slow-groovin
Copy link
Author

slow-groovin commented Dec 12, 2024

# Sample disguise / 简单伪装 This heading does not match your plugin name, should this be Simple disguise?

"description": "disguise/obscure/hide the content in a very simple way.", Use sentence case in UI. This is going to show in the community plugins section so it should follow the same casing to be consistent.

console.log('onload'), console.log('onunload') Please avoid unnecessary logging. If you need it for debugging purposes, add a check to only log during development.

this.styleEnabled = !this.styleEnabled;, const tabContainer=view?.containerEl?.parentElement?.parentElement, const tabContainer=view?.containerEl?.parentElement?.parentElement Since you're only adding the class to the active split (left, root, or right), there can be some weird behavior where this value may be true but the active split doesn't have the css class, or vice versa. You may want to reconsider how you approach this. You have to get the DOM element anyways to either add or remove your class, so I would recommend not storing this state and instead check the DOM element directly. If you instead want your styling to apply to all splits, you may want to reconsider how or where you're adding the css class.

Thank you for your instruction, I have made an improvement.

@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 12, 2024
@ObsidianReviewBot
Copy link
Collaborator

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

@joethei
Copy link
Collaborator

joethei commented Jan 3, 2025

Copyright (c) [year] [fullname]
Fill this.

@joethei joethei added Changes requested Minor changes requested PR can be merged after some final changes have been requested labels Jan 3, 2025
@ObsidianReviewBot ObsidianReviewBot added Ready for review Changes made and removed Changes requested Minor changes requested PR can be merged after some final changes have been requested labels Jan 4, 2025
@ObsidianReviewBot ObsidianReviewBot removed their assignment Jan 5, 2025
@ObsidianReviewBot
Copy link
Collaborator

The automated review has not found any issues with your code, ready for manual review.

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