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: Gamificate your PKM #2689

Merged
merged 18 commits into from
Dec 18, 2023
Merged

Add plugin: Gamificate your PKM #2689

merged 18 commits into from
Dec 18, 2023

Conversation

saertna
Copy link
Contributor

@saertna saertna commented Nov 24, 2023

I am submitting a new Community Plugin

Repo URL

Link to my plugin: obsidian-gamified-pkm

Release Checklist

  • I have tested the plugin on
    • Windows
    • macOS
    • Linux
    • Android (if applicable)
    • iOS (if applicable)
  • My GitHub release contains all required files
    • 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 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 Update community-plugins.json Add plugin: Gamificate your PKM Nov 24, 2023
@joethei
Copy link
Collaborator

joethei commented Nov 27, 2023

Please remove the main.js file from the repo and add it to your .gitignore - compiled release files shouldn't get mixed with source code in your commits and should go to the releases files instead.

"styles": ["styles.css"]
This is not part of the manifest spec.

const style = document.createElement('style');
This should be part of the styles.css file.

getSettingString(key: string) {
Is there a reason why you are encryption the settings values?
It feels pointless, since the data is not confidential.

name: 'open booter pallete',
It looks like there is a typo here, as the id is boosters

"Calculate Note Maturity" and many more.
Use sentence case in UI

console.log(note-maturity >=1) and more
Please avoid unnecessary logging. If you need it for debugging purposes, add a check to only log during development.

fs.readdirSync(dir);
Instead of using the fs API you should use the vault API.

path.join(dir, file)
Just join the two with a simple /, together with the change above, this code will now be mobile compatible.

stockInfo.innerHTML += ${this.getIngerementFromName(element).shortName} [${this.remainingStock[this.getIngerementFromName(element).name] || 0}]      ;, and more.
Avoid using innerHTML

const coffeeDiv = containerEl.createDiv("coffee");
This should not be the very first thing a user sees.

containerEl.createEl('h2', { text: 'General' });
Don't use a "general" heading in your settings

export function isTFile(value: TAbstractFile): value is TFile {
use a instanceof check instead.

@joethei joethei self-assigned this Nov 27, 2023
@joethei joethei 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 27, 2023
Copy link

Hello!

I found the following issues in your plugin submission

Errors:

❌ The newly added entry is not at the end, or you are submitting on someone else's behalf. The last plugin in the list is: shumpei-tanaka/obsidian-short-tab-name. If you are submitting from a GitHub org, you need to be a public member of the org.


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 added Validation failed and removed Changes requested Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made labels Nov 28, 2023
@saertna
Copy link
Contributor Author

saertna commented Nov 28, 2023

@joethei, I fixed all you findings. Your listing was of great help to work through the code and improve it.
You are rigth, data.json contains no confidential data. The gamification get's pointless if you just need to edit the data.json to reach levels, get boosters and so an. To prevent the 'player' looses motivation by just cheating himself, it's encrypted. That's the only backgroud for encrypting data.json.

Copy link

Hello!

I found the following issues in your plugin submission

Errors:

❌ Could not parse community-plugins.json, invalid JSON. Unexpected token : in JSON at position 315954


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.

Copy link

Hello!

I found the following issues in your plugin submission

Errors:

❌ Could not parse community-plugins.json, invalid JSON. Unexpected token } in JSON at position 316405


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.

@liamcain
Copy link
Collaborator

liamcain commented Dec 7, 2023

@saertna No need to keep rebasing the plugin. I will rebase the pull request after it gets approved.

@saertna
Copy link
Contributor Author

saertna commented Dec 8, 2023

Ah, thanks for letting me know @liamcain.

@liamcain liamcain merged commit 2174c5c into obsidianmd:master Dec 18, 2023
1 check passed
@saertna saertna deleted the patch-1 branch December 18, 2023 20:36
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.

3 participants