Minor Changes
-
#477
f2b799fThanks @michaeltaranto! - Snippets: Updategrouptreatment and adddescriptionsupportImprove affordance of snippet
groupby nesting snippets under sticky group headers.
Snippets also now support an optionaldescriptionproperty to help users differentiate similar snippets.Migration
While not a breaking change, this update does change the way snippets are rendered and how groups are treated, so some migration may be desired.
Previously snippets rendered the
groupandnameon the same line.
For example:[ { "group": "Button", "name": "Small", "code": "..." }, { "group": "Button", "name": "Large", "code": "..." } ]resulted in:
--------------- Button Small Button Large ---------------Groups are now elevated to sticky headers, with snippets nested underneath:
--------------- Button --------------- Small Large ---------------To avoid grouping migrate to use
nameanddescriptionproperties instead, and omitgroup:[ { - group: 'Button', + name: 'Button', - name: 'Small', + description: 'Small', code: '...', }, { - group: 'Button', + name: 'Button', - name: 'Large', + description: 'Large', code: '...', }, ]which results in the same UX as previously.