aurelia / dialog

A dialog plugin for Aurelia.
MIT License
106 stars 115 forks source link

refactor(all): pick changes from v1 and refactor build/tests #372

Closed bigopon closed 5 years ago

bigopon commented 5 years ago

For the breaking change related to useRenderer, I think it's a good compromise, (as @3cp would love to say). If folks complain, we can add change it back to:

  useRenderer(renderer: AbstractRenderer, settings?);

from

  useRenderer(type: 'ux' | 'native', settings?);

@EisenbergEffect @RomkeVdMeulen @StrahilKazlachev

close #335

bigopon commented 5 years ago

CI failing because it can't auto bump the .rc version

bigopon commented 5 years ago

An update: adjust useRenderer interface so that it can have backward compat, while enabling ease of use with bundler/code:

  useRenderer(renderer: RenderStatic, settings);

to

  useRenderer(renderer: RenderStatic | Promise<RendererStatic> | 'ux' | 'native', settings);

We just give 2 string literal values as a hint for what is provided by default. thoughts?

bigopon commented 5 years ago

I've update the build so that we now have css in less auto built whenever source is built. Also split CSS into its separate chunk so if one prefers not to use default CSS or use native dialog renderer, a lot of unused code can be avoided.

@EisenbergEffect this is ready to go

EisenbergEffect commented 5 years ago

As usual, amazing work @bigopon ! I like the api with the string literals for convenience while still enabling custom renderer instances. Nice touch.