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

Suggestion: Contextually relevant messages #2

Open
Sirs0ri opened this issue Apr 6, 2023 · 3 comments
Open

Suggestion: Contextually relevant messages #2

Sirs0ri opened this issue Apr 6, 2023 · 3 comments

Comments

@Sirs0ri
Copy link

Sirs0ri commented Apr 6, 2023

This idea came from Gemmy's "You have plugins that you can update!" message, which coincidentally showed up just after I had updated my plugins, ie. at a time where I definitely didn't have any updates available.

It would be cool if there was an option to filter/populate the list of possible messages dynamically before selecting a message. Then it would for example be possible to start an update-check (app.plugins.checkForUpdates()), and only show the updates related message if there's actually any new updates.

This feature could also be extended to make Gemmy actually useful in certain conditions, some other (more or less helpful) contextually relevant suggestions could be:

  • if the user's in an empty note, suggest adding some content,
  • a comment about how many/few tabs the user has open,
  • comments about the dark/light theme ("Come to the dark side" for light theme users comes to mind), etc

Gemmy is probably my favorite April fools joke this year, I'd hope to see it grow over time! :)

@ericaxu
Copy link
Owner

ericaxu commented Apr 6, 2023

Thank you for your feedback, will definitely consider it!

@Sergei-Korneev
Copy link

Sergei-Korneev commented Apr 9, 2023

Hello, guys. BTW, is there any method to check for plugins/app updates which returns something like true/false/array? The app.plugins.checkForUpdates() only shows a notification and returns undefined.

@Sirs0ri
Copy link
Author

Sirs0ri commented Apr 10, 2023

Yes, there kinda is. app.plugins.updates is either an empty object, or it has info about outstanding updates. But I don't think the API exposes a method that checks for updates and returns the result right away. You'd have to call app.plugins.checkForUpdates(), await the result and then check app.plugins.updates.

I currently have outstanding updates and it looks like this:

{
  "obsidian-leaflet-plugin": {
    "repo": "valentine195/obsidian-leaflet-plugin",
    "version": "5.5.0",
    "manifest": {
      "id": "obsidian-leaflet-plugin",
      "name": "Obsidian Leaflet",
      "description": "Interactive maps inside your notes",
      "version": "5.5.0",
      "minAppVersion": "0.12.12",
      "author": "Jeremy Valentine",
      "repo": "valentine195/obsidian-leaflet-plugin",
      "isDesktopOnly": false
    }
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants