shopsys icon indicating copy to clipboard operation
shopsys copied to clipboard

remove option macro from forms, use separate form types instead

Open PetrHeinz opened this issue 7 years ago • 11 comments

What is happening

At the moment, all form types have a custom option named macro (see FormRenderingConfigurationExtension). This feature is completely undocumented and behaves very unexpectedly - it is supported in a few specific form types and it completely switches the rendering (using a Twig macro, which is the reason behind the option's name). Also, when not set to a specific supported values, it will prevent the form input from rendering without any warning or exception.

See theme.html.twig for the usages: https://github.com/shopsys/shopsys/blob/3317ff259c2230024463ca4cd7dff09eddf6374a/packages/framework/src/Resources/views/Admin/Form/theme.html.twig#L93-L101 https://github.com/shopsys/shopsys/blob/3317ff259c2230024463ca4cd7dff09eddf6374a/packages/framework/src/Resources/views/Admin/Form/theme.html.twig#L209-L217 https://github.com/shopsys/shopsys/blob/3317ff259c2230024463ca4cd7dff09eddf6374a/packages/framework/src/Resources/views/Admin/Form/theme.html.twig#L287-L292

Expected result

The macro option is removed. These inputs are implemented as individual FormType implementations, similarly to PriceTableType, ProductsType, etc.

New form types are documented.

PetrHeinz avatar Aug 17 '18 12:08 PetrHeinz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 16 '18 13:10 stale[bot]

We should definitely work on the forms in the admin section. This is a pretty easy to do, has a lot of value and we already know what to do about it. I'm adding an Easy Pick label.

PetrHeinz avatar Oct 17 '18 07:10 PetrHeinz

This issue has been automatically marked as stale because there was no activity within the last 4 months (and it is quite a long time). It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 14 '19 07:02 stale[bot]

bum

MattCzerner avatar Feb 14 '19 07:02 MattCzerner

This issue has been automatically marked as stale because there was no activity within the last 4 months (and it is quite a long time). It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 14 '19 08:06 stale[bot]

bác

pk16011990 avatar Jun 14 '19 08:06 pk16011990

This issue has been automatically marked as stale because there was no activity within the last 4 months (and it is quite a long time). It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 19 '19 11:12 stale[bot]

pac

MattCzerner avatar Feb 03 '20 12:02 MattCzerner

This issue has been automatically marked as stale because there was no activity within the last 4 months (and it is quite a long time). It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 02 '20 12:06 stale[bot]

cvak

pk16011990 avatar Jun 02 '20 13:06 pk16011990

This issue has been automatically marked as stale because there was no activity within the last 4 months (and it is quite a long time). It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 08 '20 02:11 stale[bot]