FriendsOfShopware / FroshEnvironmentNotice

Work in Progress
MIT License
8 stars 1 forks source link

Trigger to fully customize conditions and types of notices #6

Open JoshuaBehrens opened 6 years ago

JoshuaBehrens commented 6 years ago

This PR adds support for triggers. These triggers know how to check when they need to trigger and what to do when they are triggered. They are fully extendable by using interfaces and symfony service tags. This will add basic support for #2 and #5 as this makes it extendable by other plugins and makes it easy to add different kind of notices.

This PR lacks an ExtJs editor for triggers. This is an open issue for people which are more familiar with ExtJs as this will get a complicated task as the editor should change the input mask depending on the chosen condition or action of a trigger.

JoshuaBehrens commented 6 years ago

I added an extjs view for triggers but the list is empty. Help is required.

JoshuaBehrens commented 6 years ago

Thanks to @dneustadt and @shyim for the help :+1:

@dneustadt is it cool to pass the namespace name in 93c8263 without quotes?

As there is no direct relation between triggers and messages the editor is currently useless without documentation. The types properties of the triggers are php class names of services which add different features to the notices. This impacts the backend GUI a lot.

The HtmlResponseSlotNoticeInjectAction service injects messages into the html body. If this class is selected in a dropdown one should have a form with a message dropdown as the configuration layout expects. If an other service is selected other input fields should appear.

  1. How can I pass the service type list for the types dropdown as extjs store in a good way?
  2. Is ExtJs as flexible as VueJs in a way of dynamically changing the GUI?
  3. If no, how can one achieve the described way of editing?
dneustadt commented 6 years ago

Namespace shouldn't be affected by not being in quotes. Might want to add quotes anyway.

  1. Just like any other store. Add a listing api method that passes an json encoded assoc array, add the according extjs model and store, bind the store to a combobox for selection.
  2. Yes, you can call reconfigure and doLayout on the view, switch xtypes etc.