Details

    • Sprint:
      [2.2] Sprint 6
    • Story Points:
      2

      Description

      With this story, the design engine should be fully integrated to eZ Platform, for the frontend and backend.

      ezsystems/ezplatform-standard-design package

      This package sets the default configuration for ezplatform-design-engine.

      It defines a standard theme, and make existing templates (kernel & repository forms) part of this theme. How the second part can be achieved is described in EZP-28870.

      app design

      The frontend app uses the standard theme, as well as an app one, in an app design. This is configured in the meta-repositories:

      ezdesign:
        design_list:
          app: [app, standard]
       
      ezpublish:
        system:
          frontend:
            design: app
      

      The app theme is mapped by default to app/Resources/views.

      admin theme & design

      The admin-ui needs to use the "admin" design, that uses the standard + admin themes:

      ezpublish:
        system:
          admin:
            design: admin
       
      ezdesign:
        design_list:
          admin: ["admin", "standard"]
      

      Existing templates in the admin-ui must be loaded through the design engine. There is an open pull-request by Edi Modric that does this, but it moves templates around, in a themes/admin directory. We suggest that the app/Resources/views directory is instead mapped to the admin theme, using the ezdesign configuration.

      Acceptance

       
       
      Background:
       Given that my frontend uses the "app" design
         And the "app" design contains the "app" and "standard" themes
       
      Scenario: the design engine can load app templates
      When I create a template in {{app/Resources/views}}
       And I refer to this template using the @ezdesign notation
       And I render a page that uses that template reference
       # This can be found in the Twig tab of the Sf profiler
       Then it has been rendered using the template from the "app" design
       
      Scenario: built-in templates can be overridden using the design engine
       
      Given an eZ Platform feature that gets rendered using a given template
        And that template is loaded from the standard design
       When I create a template with the same path in "app/Resources/views/themes/standard"
        And I render the feature again
       Then it uses my custom template
       
      Given an eZ Platform admin feature that gets rendered using a given template
        And that template is loaded from the admin design
       When I create a template with the same path in "app/Resources/views/themes/admin"
        And I render the feature again
       Then it uses my custom template 
      

        Issue Links

          Activity

          Hide
          Andrzej Longosz added a comment -

          Bertrand Dunogier the point Edi Modrić actually makes is that we should move all templates to ezplatform-admin-ui/src/bundle/Resources/views/themes/admin and map Twig namespace @EzPlatformAdminUi to that directory for BC.
          What we did was the opposite - we mapped @ezdesign namespace to ezplatform-admin-ui/src/bundle/Resources/views directory.

          The issue with app/Resources/views was that eZ Design already defines it as _override for all themes, so there was no need to map that.

          Show
          Andrzej Longosz added a comment - Bertrand Dunogier the point Edi Modrić actually makes is that we should move all templates to ezplatform-admin-ui/src/bundle/Resources/views/themes/admin and map Twig namespace @EzPlatformAdminUi to that directory for BC. What we did was the opposite - we mapped @ezdesign namespace to ezplatform-admin-ui/src/bundle/Resources/views directory. The issue with app/Resources/views was that eZ Design already defines it as _override for all themes, so there was no need to map that.
          Hide
          Bertrand Dunogier added a comment -

          Okay. Then it does make sense to me. You have more experience than we do on actually overriding things using the design engine. In addition, explicit is mostly > implicit

          Show
          Bertrand Dunogier added a comment - Okay. Then it does make sense to me. You have more experience than we do on actually overriding things using the design engine. In addition, explicit is mostly > implicit
          Hide
          Andrzej Longosz added a comment -

          Admin part of this story (https://github.com/ezsystems/ezplatform-admin-ui/pull/467) merged into ezsystems/ezplatform-admin-ui@9e01d33

          I probably owe participants of this discussion an explanation - I really tried to keep everyone happy and move Admin templates as discussed above, but the amount of other constant changes in ezplatform-admin-ui rendered this approach unmaintainable. Conflicts were difficult to fix as is, with multiple paths changed there were too time consuming.

          We've decided that we want this feature in 2.2 and came short on time and resources.

          Therefore original approach estimated and scheduled which included mapping views directory to admin theme remained.

          Show
          Andrzej Longosz added a comment - Admin part of this story ( https://github.com/ezsystems/ezplatform-admin-ui/pull/467 ) merged into ezsystems/ezplatform-admin-ui@9e01d33 I probably owe participants of this discussion an explanation - I really tried to keep everyone happy and move Admin templates as discussed above, but the amount of other constant changes in ezplatform-admin-ui rendered this approach unmaintainable. Conflicts were difficult to fix as is, with multiple paths changed there were too time consuming. We've decided that we want this feature in 2.2 and came short on time and resources. Therefore original approach estimated and scheduled which included mapping views directory to admin theme remained.
          Hide
          Andrzej Longosz added a comment -

          I've added a feature EZP-29308 to disable overriding kernel template paths.

          For updated installations it will be disabled by default (but enabled in meta-repository, so be careful when merging meta-repository changes into your projects).

          For new installations it will be enabled by default as it is one of the main goals of this story, to be able to use eZ Design by just placing templates in proper directories.
          The Semantic configuration for this is defined as:

          ez_platform_standard_design:
              override_kernel_templates: true
          

          Show
          Andrzej Longosz added a comment - I've added a feature EZP-29308 to disable overriding kernel template paths. For updated installations it will be disabled by default (but enabled in meta-repository, so be careful when merging meta-repository changes into your projects). For new installations it will be enabled by default as it is one of the main goals of this story, to be able to use eZ Design by just placing templates in proper directories. The Semantic configuration for this is defined as: ez_platform_standard_design: override_kernel_templates: true
          Hide
          Andrzej Longosz added a comment -

          Merged:

          Show
          Andrzej Longosz added a comment - Merged: Standard Design Bundle PR: ezsystems/ezplatform-standard-design@8f023ea eZ Platform PR: ezsystems/ezplatform@6bbb991 (plus the ones already mentioned for the EZP-29308 issue and the Admin UI integration)

            People

            • Assignee:
              Unassigned
              Reporter:
              Bertrand Dunogier
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile