Skip to content

Conversation

banisterious
Copy link
Contributor

Adding OneiroMetrics!

I am submitting a new Community Plugin

Repo URL

Link to my plugin: https://github.com/banisterious/obsidian-oneirometrics

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:

❌ Plugin name mismatch, the name in this PR (Oneirometrics) is not the same as the one in your repo (OneiroMetrics). If you just changed your plugin name, remember to change it in the manifest.json in your repo and your latest GitHub release.


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 oneirometrics plugin Add plugin: OneiroMetrics Jun 12, 2025
@joethei
Copy link
Collaborator

joethei commented Jul 28, 2025

Please remove all the innerHTML instances in your plugin.

name: 'Open Hub',, name: 'Open Unified Test Suite',, name: 'Enhanced Date Navigator (Preview)',, name: 'Open Date Navigator (Accessible)',, name: 'Date Navigator: Open',, contentEl.createEl('h2', { text: this.isEditing ? 'Edit Metric' : 'Add New Metric', cls: 'oom-modal-title' });, .setButtonText(this.isEditing ? 'Save Changes' : 'Add Metric'), text: 'Restore All Metrics',, text: 'Create Manually', and a lot more:
Use sentence case in UI, product / brand names follow the casing set by the respective owner.

// Remove ribbon icons - safely check if ribbonManager exists, this.ribbonIcons.forEach(icon => icon.remove());
Don't remove ribbon icons added by the plugin in your onunload, this screws up the custom ribbon order some users might have configured.

if (this.settings?.showRibbonButtons) {, if (this.settings.showTestRibbonButton) {,
As of v1.1.0 of Obsidian, the ribbon can be customized within Obsidian. So users can choose what items to include and in what order all in one place. Because of this, we're recommending that new plugins avoid introducing their own toggles for ribbon items.

import { Eye, Heart, CircleMinus, PenTool, CheckCircle, UsersRound, UserCog, Users, UserCheck, UserX, Sparkles, Wand2, Zap, Glasses, Link, Ruler, Layers } from 'lucide-static';
Obsidian already includes the lucide library, use the setIcon function instead of adding unnecessary stuff to your bundled plugin.

// Add styles, const style = document.createElement('style');, const style = document.createElement('style');
This should be in the styles.css

abstract class BaseSuggest {
This code should no longer be used, implement a AbstractInputSuggest instead.

const data = localStorage.getItem(SAVED_RANGES_KEY);, localStorage.setItem(CUSTOM_RANGE_KEY, JSON.stringify(range));, window.localStorage.setItem('oom-debug-mode', 'true');, window.localStorage.removeItem('oom-debug-mode'); and more:
Prefer to use App.saveLocalStorage and App.loadLocalStorage to save and load vault-specific data to local storage. Using localStorage.setItem and localStorage.getItem will share that data across vaults on the same device.

static safelyEmptyContainer(container: HTMLElement): void {
Use .empty() on the HTMLElement instead.

static safelySetText(element: HTMLElement, text: string, escapeHtml: boolean = true): void {, static escapeHtml(text: string): string {
Use the sanitizeHTMLToDom function instead.

export function debounce(
The Obsidian API already includes a debounce function.

let timeout: NodeJS.Timeout | null = null;
Use a regular number here for the type, and use activeWindow.setTimeout / activeWindow.clearTimeout where this being used.

@joethei joethei removed Additional review required PR needs to be reviewed by another person, after the currently requested changes have been made Skipped code scan Code scanning skipped because submission is not in TS/author believes result is wrong labels Jul 28, 2025
@joethei joethei assigned joethei and unassigned ObsidianReviewBot Jul 28, 2025
@banisterious
Copy link
Contributor Author

Changes made in 0.17.0 release:

  1. Removed all innerHTML usage and replaced with safe DOM manipulation methods
  2. Changed command names and UI text to sentence case
  3. Removed ribbon icon cleanup in onunload method
  4. Removed conditional ribbon button display checks
  5. Replaced lucide-static imports with Obsidian's built-in setIcon function
  6. Moved dynamically created styles from TypeScript to component CSS files
  7. Removed icons from metrics tables (showing text only). (Will add icons back using proper methods in a future release.)
  8. Replaced custom BaseSuggest class with Obsidian's AbstractInputSuggest
  9. Updated localStorage usage to vault-specific App.saveLocalStorage/loadLocalStorage
  10. Updated SafeDOMUtils.safelyEmptyContainer to use Obsidian's empty() method
  11. Changed timeout type from NodeJS.Timeout to number and used window.setTimeout/clearTimeout

@banisterious
Copy link
Contributor Author

banisterious commented Aug 20, 2025

Released v0.18.1. New interactive dashboard replacing the static Metrics Note. Features real-time updates, virtual scrolling, enhanced filtering/sorting, integrated charts, and comprehensive export options. (Note: most of these features were migrated.) Also adds frontmatter properties support for dream metrics. Full backward compatibility maintained. (Release description)

@joethei joethei added the Minor changes requested PR can be merged after some final changes have been requested label Aug 27, 2025
@banisterious
Copy link
Contributor Author

Any chance you could take a second to point out the minor changes that are currently requested? I think I've overlooked something.

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.

3 participants