Skip to content

[RFC] Split form themes into individual packages #49776

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy