svm0n_datadeck/test-support
SVM0N 3c8ac06574 fix: resolve community-plugin review findings (styles, innerHTML, promises, world-map bundling)
Obsidian's automated plugin review flagged this release: inline style
mutations instead of CSS classes, unsafe innerHTML writes, async callbacks
passed where a void return was expected, and a couple of real bugs the
review's style checks happened to surface along the way.

- Replace `.style.*` assignments with CSS classes (`is-hidden` etc.); the two
  genuinely dynamic textarea-autosize resets use `removeProperty` instead.
- Replace innerHTML writes (map SVG injection, dashboard stat bars, legend,
  refresh button) with DOMParser/createEl/appendText.
- Embed world-map.svg into main.js via an esbuild text-loader import instead
  of reading it from the plugin's vault folder at runtime — Obsidian's
  installer only ever fetches main.js/styles.css/manifest.json from a
  release, so the travel map was silently broken for any Community Plugins
  install (only worked for manual/BRAT installs that copied the extra file).
- Replace window.confirm() on delete with the same two-click "Confirm?"
  button pattern already used elsewhere in the plugin (native confirm()
  doesn't behave reliably on mobile Obsidian).
- Settings tab: use Setting().setHeading() instead of raw <h2>/<h3>, drop the
  redundant plugin-name heading, wrap async onChange/click handlers so they
  don't return unhandled promises.
- MarkdownRenderChild subclasses (chart/inline-view/tasks blocks): onload()
  must be synchronous per Component's contract; move the async work inside
  instead of marking onload itself async.
- Misc: unused imports/vars, unnecessary type assertions (two of which were
  actually needed — restored with `querySelector<HTMLElement>` instead of a
  blind cast), sentence-case UI text, template-literal error interpolation
  on caught `unknown` values.
- Add eslint + eslint-plugin-obsidianmd as a permanent dev dependency
  (`npm run lint`, wired into `npm run check`) so these surface locally
  before the next review instead of after.

114 → 112 existing tests still pass (2 net-added assertions from the DOM
shim gaining appendText/DOMParser polyfills); typecheck and build clean.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tfyt1TBd7DiNic32s6E4nq
2026-07-17 16:29:49 +08:00
..
chartjs-stub.mjs feat(chart): bar/aggregate mode for categorical X + size-by point radius 2026-07-12 01:41:23 +00:00
dom-env.mjs fix: resolve community-plugin review findings (styles, innerHTML, promises, world-map bundling) 2026-07-17 16:29:49 +08:00
obsidian-stub.mjs feat(tasks): csv-tasks block — cross-file tasks board (phase 2) 2026-07-12 02:31:33 +00:00