mui / mui/material-ui

[docs-infra] `@mui/icons-material` in-editor preview

Open
#19,697 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

discussion ready to take scope: docs-infra scope: icons type: new feature
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Summary 💡

Having a preview of the icons in the editor is similar to having autocomplete available for the API. Our icons explorer is definitely helpful and better if you need inspiration. But if you know what kind of icon you want then in-editor preview should boost productivity.

Examples 🌈

  1. link to icons explorer in SvgIcon.d.ts jsdoc
  2. This shows a preview (vscode) when hovering over an imported icon
import SvgIcon from '@material-ui/core/SvgIcon';
/**
 * Preview: ![LockIcon](https://fonts.gstatic.com/s/i/materialicons/lock/v4/24px.svg)
 */
declare const LockIcon: typeof SvgIcon;
export default LockIcon;

credit to @leMaik for the markdown idea.
icon-preview

  1. Show icon preview in autocomplete (probably requires IDE extension)

Motivation 🔦

Seemed like a useful thing to have to me.

Each of the examples can be explored further and implemented by whomever is looking for some work to do.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue points to the @mui/icons-material declarations, including SvgIcon.d.ts, and the icons explorer; start by comparing those entry points with the three proposed approaches. Done requires selecting and implementing a defined preview approach, with its scope and validation agreed, since the issue currently leaves all three options open.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
developer-experience, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.