quasar-ide-helper icon indicating copy to clipboard operation
quasar-ide-helper copied to clipboard

Autocomplete icon names

Open panstromek opened this issue 6 years ago • 1 comments

  1. Pull all icon names from quasar-extras package This is mostly about regexing bunch of css names. Should be pretty straightforward.
  2. Generate fake props in icon component in a form:
export default {
  props: {
    /**
     * This comment will be visible in quick doc
     */
    'name="cancel"':  Boolean ,
  }
}
  1. For all components that use icon prop, generate icon mixin in a form
export default {
  props: {
    'icon="cancel"': Boolean,
  }
}
  1. Generate imports and usage for those in every component that uses icon. Eg
import iconMixin from './iconMixin'
export default {
  name: 'QBtn',
  mixin: [iconMixin]
  props: {
   // ...
  }
}

Questions:

  • Some components use different icon-props (icon-left, icon-right etc.). This will cause combinatorics explosion of generated files. Is it worth it?
  • Maybe it would be better to only generate this only for icon sets that you use (and autoregenerate when you change that)

panstromek avatar Oct 21 '19 13:10 panstromek

rel: https://github.com/insign/universal-ide-helper A bit different approach

panstromek avatar Oct 21 '19 13:10 panstromek