@backstage/migrate-mui-autocomplete-to-combobox
Heuristically migrates MUI 4 Autocomplete to Backstage UI Combobox or SearchAutocomplete.
Covers
- Form-like option pickers with string[] literal
options→Combobox - Clear free-text search (
onInputChange+ word-boundary search/find/filter cue, no selection value) →SearchAutocomplete - Deep and barrel imports from
@material-ui/lab - Best-effort option literal flattening for string arrays
- Prunes unused
TextFieldimports left behind byrenderInput - Maps MUI
sizeto BUIsize(smallpreserved;medium/large/omitted →medium; falls back to staticsizeon therenderInputTextField)
TODOs left for humans
- Ambiguous Autocomplete usage (left as MUI with a TODO)
- Object
options/getOptionLabelshapes (not safe for BUI Combobox) freeSolo, customrenderOption, and other complex cases- Non-trivial
onChange/ options shapes - Dynamic
sizeon Autocomplete
Won't do
- Perfect API parity for every Autocomplete prop