unlcms / project-herbie

Drupal 10 implementation at the University of Nebraska–Lincoln
https://cms.unl.edu
GNU General Public License v2.0
5 stars 6 forks source link

Set up Layout Builder and create DCF/UNL Layouts #5

Closed ericras closed 5 years ago

ericras commented 5 years ago

Add config and theme them.

This is a meta issue as this may be better broken up (into a carousel issue, grid layouts issue, and on and on)

ericras commented 5 years ago

Base on "USING an alternate 'class'" where we'll want layout settings like css classes and background image, i think we probably want to create a "DCF Layouts" module

ericras commented 5 years ago

Will probably want to split the DCF layouts module out into its own project someday but for now i've just included it in the main project

macburgee1 commented 5 years ago
  1. Layouts can be used without Layout Builder. Layout Discover is needed to register layouts, however.

dcf_layouts.info.yml

  dependencies:
-   - layout_builder
+   - layout_discovery
  1. If DCF Layouts is going to reside within this project (for now), it should be moved to /web/modules/custom/dcf_layouts

  2. Code Review

    
    $ phpcs --standard=Drupal,DrupalPractice dcf_layouts/

FILE: ...ge2/Sites/project-herbie-eric/web/modules/dcf_layouts/dcf_layouts.info.yml

FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES

1 | WARNING | Remove "version" from the info file, it will be added by | | drupal.org packaging automatically 11 | WARNING | All dependencies must be prefixed with the project name, for | | example "drupal:"

FILE: ...erbie-eric/web/modules/dcf_layouts/src/Plugin/Layout/ThreeColumnLayout.php

FOUND 6 ERRORS AFFECTING 3 LINES

27 | ERROR | [x] Concat operator must be surrounded by a single space 27 | ERROR | [x] Concat operator must be surrounded by a single space 31 | ERROR | [x] Concat operator must be surrounded by a single space 31 | ERROR | [x] Concat operator must be surrounded by a single space 35 | ERROR | [x] Concat operator must be surrounded by a single space 35 | ERROR | [x] Concat operator must be surrounded by a single space

PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY

FILE: ...-herbie-eric/web/modules/dcf_layouts/src/Plugin/Layout/TwoColumnLayout.php

FOUND 4 ERRORS AFFECTING 2 LINES

27 | ERROR | [x] Concat operator must be surrounded by a single space 27 | ERROR | [x] Concat operator must be surrounded by a single space 31 | ERROR | [x] Concat operator must be surrounded by a single space 31 | ERROR | [x] Concat operator must be surrounded by a single space

PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY

Time: 98ms; Memory: 8MB


Issue 1 in dcf_layouts.info.yml can be ignored. This module isn't being hosted on Drupal.org.

4. Layout implementation issues - There are issues with some of the layouts. I'll document those in a separate post.

5. We should have a conversation about the Builder Page content type and how it fits within a larger content strategy.
macburgee1 commented 5 years ago

DCF One Column

DCF Two Column

DCF Three Column

DCF Three Column

DCF Four Column

DCF Four Column