BBVAEngineering / ember-modal-service

An ember-cli addon to manage modals as promises
MIT License
27 stars 12 forks source link

feat: add ability to provide a prefix for modals #143

Open scottyd980 opened 3 years ago

scottyd980 commented 3 years ago

I would like to make it possible for modals to live outside of the main components folder. This allows custom prefixes on the name, which adds additional flexibility to where you can put your modals in your folder structure.

This allows something along these lines:

this.modal.open("info-modal", { prefix: "modals/" })

The info-modal can now live inside components/modals/info-modal. With a significant number of modals in an application, it can become unweidly to have a lot of top level modal- modals.

The default fallback returns modal-${name} as it did before.

scottyd980 commented 3 years ago

@adrigzr I'm not sure if what I did caused the CI failures - seems like the deps PRs are also failing for a similar reason. It looks like it fails on 3 of the ember try scenarios for possibly unrelated reasons.