Skip to content

Custom SVG block icon #44

Description

@slaFFik

Problem

The block currently uses the generic "icon": "randomize" dashicon in src/blocks-randomizer/block.json:8. In the inserter and block list view it blends in with other core blocks and gives no hint of what this plugin does.

Proposal

Ship a branded SVG icon that's recognizable in the inserter, breadcrumbs, and list view.

Replace the string icon in block.json with an inline SVG (or a JS-registered icon in src/blocks-randomizer/index.js if you want different icons for inserter vs. breadcrumb).

"icon": {
  "src": "<svg ...>...</svg>"
}

Existing assets in .wp-org/icon.svg may be a starting point — or design a simpler glyph optimized for the 24×24 inserter size (the WP.org listing icon is usually too detailed at that size).

Acceptance criteria

  • Custom SVG replaces the randomize dashicon
  • Renders cleanly at 24×24 in the inserter
  • Works in both light and dark editor themes (uses currentColor for stroke/fill)
  • Matches / harmonizes with .wp-org/icon.svg brand

Files

  • src/blocks-randomizer/block.json
  • src/blocks-randomizer/index.js (if registering via JS)
  • .wp-org/icon.svg (reference)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions