8000 [RFC] Split form themes into individual packages · Issue #49776 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[RFC] Split form themes into individual packages #49776
Closed
@ker0x

Description

@ker0x

Description

Currently, all form themes are located into symfony/twig-bridge. This has some major drawbacks:

  • Download all themes when you only want to use one
  • No autoconfiguration from Flex
  • Impossible to create theme specific FormType
  • Testing is complicated

Example

I propose to extract all form themes except form_div_layout.html.twig and form_table_layout.html.twig into the symfony/ux repository or a dedicated one (symfony/form-theme, symfony/ui ?) and split each themes into individual packages

  • symfony/ux-theme-bootstrap
  • symfony/ux-theme-tailwind
  • symfony/ux-theme-foundation
  • etc ...

Here is an exaustive list of benefits that this could bring:

  • Require only the desire form theme (composer req symfony/ux-theme-bootstrap)
  • Recipes from Flex (autoconfiguring twig.form_themes or webpack.config.js, update packages.json etc ...)
  • Custom FormType (SwitchType for Bootstrap)
  • Simplify maintenance (split tests which are a mess, see [RFC] Simplify form theme testing for external packages #49775)
  • New form themes from the community

Metadata

Metadata

Assignees

No one assigned

    Labels

    FormRFCRFC = Request For Comments (proposals about features that you want to be discussed)Status: Waiting feedbackTwigBridge

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0