You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Twig themes are a bit chaotic in some parts, with unnecessary blocks, weird attribute inheritance, etc. This has to be done before first stable release to prevent additional work with previously created custom themes.
The text was updated successfully, but these errors were encountered:
What surprises me in the way the views are divided is that sometimes we directly use the twig blocks {{ block('table') }} and sometimes we use the extension functions {{ data_table_pagination(pagination) }}.
Shouldn't we have something more uniform?
Shouldn't the DataTableView prepare everything for display and therefore not go through the twig extension?
Exactly. Most of those blocks are unnecessary, and provide no real benefit.
instead of kreyu_data_table_table, use a simple table;
instead of kreyu_data_table_pagination, use a simple pagination;
etc.
What surprises me in the way the views are divided is that sometimes we directly use the twig blocks {{ block('table') }} and sometimes we use the extension functions {{ data_table_pagination(pagination) }}.
Yeah, that seems a bit weird. There's plenty of twig functions that allow rendering each part of the data table individually - just like in Symfony Form you can render label, widget, help message and errors separately. I think this is fine. Those functions however, should render different blocks - for example, instead of using kreyu_data_table_table block, just a simple table should be sufficient. Not sure whether the built-in themes should use the functions, or their blocks directly.
I think most of the work with refactoring has already be done in base theme, now I'm adjusting and ironing out the Bootstrap and Tabler themes.
Twig themes are a bit chaotic in some parts, with unnecessary blocks, weird attribute inheritance, etc. This has to be done before first stable release to prevent additional work with previously created custom themes.
The text was updated successfully, but these errors were encountered: