github austinginder/minn-admin v0.4.0

latest releases: v0.33.0, v0.32.0, v0.31.0...
one month ago

Added

  • Block inspector: Complex blocks (islands) are no longer opaque. Every island's chip is now a ⚙ button that opens an inspector popover: the block's attribute schema is fetched from wp/v2/block-types, a form is generated from it (strings, numbers, booleans, enums), and edits rewrite the attributes JSON in the block comment — Gutenberg-escaped, spliced back verbatim, byte-safety model unchanged. Works one level deep too: nested self-closing children (e.g. Anchor Blocks conversation messages) each get their own form section. Attributes stored in saved HTML (source-backed) are correctly left alone.
  • Add, remove & reorder children: When an island has the standard InnerBlocks shape (wrapper HTML + block children), each child section in the inspector gains ↑ ↓ × controls and a "+ Add" button — insert a new message/card/row with schema defaults, reorder, or delete, then Apply. Typed-but-unapplied values survive the re-renders; islands with real HTML interleaved between children keep attribute editing but lock structure changes.
  • minn_admin_block_forms filter: Plugin authors can refine the inspector's generated forms — per-attribute labels, controls (text · textarea · select · number · checkbox), option lists, hiding, and field order — plus wrapperText patterns that surface editable text living in an InnerBlocks wrapper's saved HTML (replaced in place only when changed, so untouched wrappers stay byte-identical). The convention: ship the integration inside your own plugin — the filter is a no-op without Minn. Anchor Blocks is the reference (app/MinnAdmin.php), covering all 13 of its blocks including a user/assistant Role select and the editable conversation header.
  • Code block config chip: Editable code blocks get the same ⚙ affordance islands have — hover (or place the caret) and a floating chip shows the current language; click it for a popover with the syntax-highlighting picker. Lives outside the editable document, so it can never leak into saved content.
  • Insert custom blocks from /: Blocks that declare an insert template via minn_admin_block_forms appear in the slash menu — inserted as a configurable island with a real server-rendered preview and the inspector opened immediately. Anchor Blocks offers Conversation, Timeline, Callout, Stats Dashboard and Bar Chart; templates are verified byte-identical through core's own parse_blocks/serialize_blocks round-trip. Blocks-mode only, and the slash menu now scrolls when it grows.
  • Remove a block from the inspector: Every island's inspector now has a Remove action (with confirm) — including blocks that aren't registered on the site, where it's the only action. Previously the only way to delete an island was selecting the card and pressing backspace.
  • Post Types manager: A new Post Types view (Manage → Post Types) lists every registered post type — labels, slug, item counts, REST availability, and who manages it — and edits definitions through whichever manager owns them: ACF post types (written via ACF's own internal API, so they stay first-class in ACF's UI), Custom Post Type UI (its option, its shape), or Minn's own lightweight store when no manager plugin is active. Create (choosing the storage backend when several are available), edit labels/visibility/supports/taxonomies, or remove a definition — content is always preserved, and ACF deletions trash (recoverable) rather than delete. Code-registered types are shown read-only. Rewrites flush automatically and the Content view's type tabs update immediately.
  • AnalyticsWP traffic adapter: The Overview chart gains a fifth analytics provider — daily visitors (distinct sessions) and pageviews aggregated from AnalyticsWP's events table with the same site-timezone bucketing its own dashboard uses.
  • Real island previews: Islands render their actual content in the editor via a new minn-admin/v1/render-blocks endpoint (server-side do_blocks, edit_posts) — dynamic blocks and nested dynamic children show what the site will show instead of an empty "Dynamic block" card. Previews refresh live after inspector edits. Best-effort: a misbehaving render callback never breaks the editor.
  • Code block language attribute: core/code blocks carrying {"language":…} in the block comment (the attr dialect) are now fully editable instead of islanded — the existing toolbar language picker reads and writes the attribute, and serialization preserves the incoming dialect (attr stays attr, class stays class). markup added to the language list.
  • Site icon: Settings → General can now set the site icon — drag & drop an image, choose from the media library, or remove it, with a live preview.
  • More settings: Membership (anyone can register) and New user default role (General); Convert emoticons (Writing); Moderate all comments, Registered-users-only commenting and Show avatars (Discussion) — exposed over wp/v2/settings via register_setting, with role writes validated server-side.

Improved

  • Upload from the image picker: The Insert-image / featured-image picker gains a drag & drop zone (with click-to-browse) — drop an image and it uploads and is used immediately, instead of dead-ending when the library is empty.
  • Searchable selects: New user default role, Default post category, and the Homepage/Posts-page pickers are now themed, searchable comboboxes — click to browse with the current choice highlighted, type to filter, and the display shows friendly labels while the real value is what saves. Unlike native selects, the option panel matches Minn's theme on every OS.
  • Timezone autocomplete: The Settings timezone field is now a proper combobox instead of a 400-option select — click to browse the full list (current zone highlighted), type to filter ("new york" finds America/New_York — spaces match underscores), arrow keys + Enter to pick. The option panel is anchored in-flow below the input, so it never drifts around the page the way the native datalist popup does, and free-typed input is validated against real zone ids before saving.

Fixed

  • Stale Overview after plugin changes: Activating, deactivating, installing or deleting a plugin now clears the Overview cache (and the post-type caches) — switching analytics plugins immediately switches the Traffic chart's provider instead of showing the old one until a hard reload.

Don't miss a new minn-admin release

NewReleases is sending notifications on new releases.