diff --git a/.circleci/config.yml b/.circleci/config.yml index 899c91c..77f5633 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -57,6 +57,21 @@ behat: &behat - store_artifacts: path: /var/www/html/artifacts +codeception: &codeception + <<: *defaults + steps: + - checkout: + path: /var/www/test + - run: + name: Run Acceptance Tests + command: | + composer global require SU-SWS/stanford-caravan:dev-8.x-1.x + ~/.composer/vendor/bin/sws-caravan codeception /var/www/html --extension-dir=/var/www/test + - store_test_results: + path: /var/www/html/artifacts/behat + - store_artifacts: + path: /var/www/html/artifacts + back_to_dev: &back_to_dev <<: *defaults steps: @@ -75,6 +90,8 @@ jobs: <<: *behat run-back-to-dev: <<: *back_to_dev + run-codeception: + <<: *codeception # Declare a workflow that runs all of our jobs in parallel. workflows: @@ -92,15 +109,15 @@ workflows: weekly: jobs: - run-coverage - - run-behat + - run-codeception triggers: - schedule: cron: "0 0 * * 0" filters: branches: only: - - 8.x-2.x + - 8.x-1.x tests: jobs: - run-coverage - - run-behat + - run-codeception diff --git a/CHANGELOG.md b/CHANGELOG.md index 21f2706..649463f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # SOE Paragraphs +8.x-1.0 +-------------------------------------------------------------------------------- +_Release Date: 2020-08-07_ + +- D8CORE-2273: Moved tests into module, as well as profile. (#9) (79a3bf4) +- D8CORE-2427: added aria tags for presentation only (768c0e9) +- D8CORE-2427: corrected a11y problem with empty link when image was absent. (c62233b) +- D8CORE-2247: fixup! (5635293) +- D8CORE-2247: changing the images to responsive display (d73abfd) + 8.x-1.0-beta.1 -------------------------------------------------------------------------------- _Release Date: 2020-07-13_ diff --git a/README.md b/README.md index 3dd4767..f834e9f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Changelog: [Changelog.txt](CHANGELOG.txt) Description --- -The `soe_paragraphs` module provides custom paragraph types for the Stanford School of Engineering. +The `soe_paragraphs` module provides three custom paragraph types developed for the Stanford School of Engineering. Accessibility --- diff --git a/composer.json b/composer.json index 3e04ae7..f33ef03 100644 --- a/composer.json +++ b/composer.json @@ -75,8 +75,12 @@ ], "require": { "drupal/paragraphs": "^1.11", - "su-sws/jumpstart_ui": "~8.1.0", - "su-sws/stanford_text_editor": "~8.1.0" + "drupal/element_class_formatter": "^1.1", + "drupal/field_formatter_class": "^1.4", + "drupal/allowed_formats": "^1.3", + "su-sws/stanford_fields": "^8.1.0", + "su-sws/jumpstart_ui": "^8.1.0", + "su-sws/stanford_text_editor": "^8.1.0" }, "autoload": { "psr-4": { diff --git a/dist/css/image-cta-paragraph.styles.css b/dist/css/image-cta-paragraph.styles.css index 4c91f90..af80fb3 100644 --- a/dist/css/image-cta-paragraph.styles.css +++ b/dist/css/image-cta-paragraph.styles.css @@ -1,80 +1,2 @@ -@media only screen and (min-width: 0) { - .content .paragraph-item.ptype-stanford-image-cta { - margin-bottom: 9.6rem; } } -@media only screen and (min-width: 768px) { - .content .paragraph-item.ptype-stanford-image-cta { - margin-bottom: 10.8rem; } } - -@media only screen and (min-width: 1500px) { - .content .paragraph-item.ptype-stanford-image-cta { - margin-bottom: 11.4rem; } } - -@media only screen and (min-width: 768px) and (max-width: 1199px) and (min-width: 0) { - .content .paragraph-item.ptype-stanford-image-cta { - margin-bottom: 8rem; } } - -@media only screen and (min-width: 768px) and (max-width: 1199px) and (min-width: 768px) { - .content .paragraph-item.ptype-stanford-image-cta { - margin-bottom: 9rem; } } - -@media only screen and (min-width: 768px) and (max-width: 1199px) and (min-width: 1500px) { - .content .paragraph-item.ptype-stanford-image-cta { - margin-bottom: 9.5rem; } } - -@media only screen and (max-width: 767px) and (min-width: 0) { - .content .paragraph-item.ptype-stanford-image-cta { - margin-bottom: 2.31rem; } } - -@media only screen and (max-width: 767px) and (min-width: 768px) { - .content .paragraph-item.ptype-stanford-image-cta { - margin-bottom: 2.6rem; } } - -@media only screen and (max-width: 767px) and (min-width: 1500px) { - .content .paragraph-item.ptype-stanford-image-cta { - margin-bottom: 2.74rem; } } - -@media (max-width: 767px) { - .su-image-cta-paragraph .su-image-cta-paragraph__image { - display: none; } } - -@media only screen and (min-width: 0) { - .su-image-cta-paragraph .su-image-cta-paragraph__link { - padding-top: 1.6rem; - padding-right: 2.31rem; - padding-bottom: 2.31rem; - padding-left: 2.31rem; } } - -@media only screen and (min-width: 768px) { - .su-image-cta-paragraph .su-image-cta-paragraph__link { - padding-top: 1.8rem; - padding-right: 2.6rem; - padding-bottom: 2.6rem; - padding-left: 2.6rem; } } - -@media only screen and (min-width: 1500px) { - .su-image-cta-paragraph .su-image-cta-paragraph__link { - padding-top: 1.9rem; - padding-right: 2.74rem; - padding-bottom: 2.74rem; - padding-left: 2.74rem; } } - -.su-image-cta-paragraph .su-image-cta-paragraph__link a { - color: #b1040e; - text-decoration: none; } - .su-image-cta-paragraph .su-image-cta-paragraph__link a:hover { - color: #2e2d29; } - .su-image-cta-paragraph .su-image-cta-paragraph__link a:focus { - color: #2e2d29; } - -.su-image-cta-paragraph .su-image-cta-paragraph__link::after { - background-color: #b1040e; } - .su-image-cta-paragraph .su-image-cta-paragraph__link::after:hover { - background-color: #2e2d29; } - .su-image-cta-paragraph .su-image-cta-paragraph__link::after:focus { - background-color: #2e2d29; } - .su-image-cta-paragraph .su-image-cta-paragraph__link::after:active { - background-color: #b1040e; } - - -/*# sourceMappingURL=image-cta-paragraph.styles.css.map*/ \ No newline at end of file +@media only screen and (min-width:0){.content .paragraph-item.ptype-stanford-image-cta{margin-bottom:9.6rem}}@media only screen and (min-width:768px){.content .paragraph-item.ptype-stanford-image-cta{margin-bottom:10.8rem}}@media only screen and (min-width:1500px){.content .paragraph-item.ptype-stanford-image-cta{margin-bottom:11.4rem}}@media only screen and (min-width:768px) and (max-width:1199px) and (min-width:0){.content .paragraph-item.ptype-stanford-image-cta{margin-bottom:8rem}}@media only screen and (min-width:768px) and (max-width:1199px) and (min-width:768px){.content .paragraph-item.ptype-stanford-image-cta{margin-bottom:9rem}}@media only screen and (min-width:768px) and (max-width:1199px) and (min-width:1500px){.content .paragraph-item.ptype-stanford-image-cta{margin-bottom:9.5rem}}@media only screen and (max-width:767px) and (min-width:0){.content .paragraph-item.ptype-stanford-image-cta{margin-bottom:2.31rem}}@media only screen and (max-width:767px) and (min-width:768px){.content .paragraph-item.ptype-stanford-image-cta{margin-bottom:2.6rem}}@media only screen and (max-width:767px) and (min-width:1500px){.content .paragraph-item.ptype-stanford-image-cta{margin-bottom:2.74rem}}@media (max-width:767px){.su-image-cta-paragraph .su-image-cta-paragraph__image{display:none}}.su-image-cta-paragraph .su-image-cta-paragraph__image img{width:100%}@media only screen and (min-width:0){.su-image-cta-paragraph .su-image-cta-paragraph__link{padding:1.6rem 2.31rem 2.31rem}}@media only screen and (min-width:768px){.su-image-cta-paragraph .su-image-cta-paragraph__link{padding:1.8rem 2.6rem 2.6rem}}@media only screen and (min-width:1500px){.su-image-cta-paragraph .su-image-cta-paragraph__link{padding:1.9rem 2.74rem 2.74rem}}.su-image-cta-paragraph .su-image-cta-paragraph__link a{color:#b1040e;text-decoration:none}.su-image-cta-paragraph .su-image-cta-paragraph__link a:focus,.su-image-cta-paragraph .su-image-cta-paragraph__link a:hover{color:#2e2d29}.su-image-cta-paragraph .su-image-cta-paragraph__link:after{background-color:#b1040e}.su-image-cta-paragraph .su-image-cta-paragraph__link:after:focus,.su-image-cta-paragraph .su-image-cta-paragraph__link:after:hover{background-color:#2e2d29}.su-image-cta-paragraph .su-image-cta-paragraph__link:after:active{background-color:#b1040e} diff --git a/lib/scss/components/image-cta/_image_cta.scss b/lib/scss/components/image-cta/_image_cta.scss index cbd048d..58f277b 100644 --- a/lib/scss/components/image-cta/_image_cta.scss +++ b/lib/scss/components/image-cta/_image_cta.scss @@ -23,6 +23,11 @@ @include grid-media-between('xs', 'sm') { display: none; } + + img { + width: 100%; + } + } .su-image-cta-paragraph__link { diff --git a/modules/soe_paragraph_cta_list/soe_paragraph_cta_list.info.yml b/modules/soe_paragraph_cta_list/soe_paragraph_cta_list.info.yml index 55e18f3..72889c8 100644 --- a/modules/soe_paragraph_cta_list/soe_paragraph_cta_list.info.yml +++ b/modules/soe_paragraph_cta_list/soe_paragraph_cta_list.info.yml @@ -9,4 +9,4 @@ dependencies: - paragraphs:paragraphs - drupal:text - soe_paragraphs:soe_paragraphs -version: 8.x-1.0-beta1 +version: 8.x-1.0 diff --git a/modules/soe_paragraph_image_cta/config/install/core.entity_view_display.paragraph.stanford_image_cta.default.yml b/modules/soe_paragraph_image_cta/config/install/core.entity_view_display.paragraph.stanford_image_cta.default.yml index 821ddfd..2bea717 100644 --- a/modules/soe_paragraph_image_cta/config/install/core.entity_view_display.paragraph.stanford_image_cta.default.yml +++ b/modules/soe_paragraph_image_cta/config/install/core.entity_view_display.paragraph.stanford_image_cta.default.yml @@ -32,11 +32,12 @@ bundle: stanford_image_cta mode: default content: stanford_image_cta_image: - type: media_multimedia_formatter + type: media_responsive_image_formatter weight: 0 label: hidden settings: view_mode: default + image_style: '' link: false image: image_formatter: image_style diff --git a/modules/soe_paragraph_image_cta/soe_paragraph_image_cta.info.yml b/modules/soe_paragraph_image_cta/soe_paragraph_image_cta.info.yml index 1953090..e817e34 100644 --- a/modules/soe_paragraph_image_cta/soe_paragraph_image_cta.info.yml +++ b/modules/soe_paragraph_image_cta/soe_paragraph_image_cta.info.yml @@ -9,4 +9,4 @@ dependencies: - paragraphs:paragraphs - drupal:text - soe_paragraphs:soe_paragraphs -version: 8.x-1.0-beta1 +version: 8.x-1.0 diff --git a/modules/soe_paragraph_image_cta/templates/image-cta-paragraph.html.twig b/modules/soe_paragraph_image_cta/templates/image-cta-paragraph.html.twig index 845ab4f..bdb76f5 100644 --- a/modules/soe_paragraph_image_cta/templates/image-cta-paragraph.html.twig +++ b/modules/soe_paragraph_image_cta/templates/image-cta-paragraph.html.twig @@ -13,14 +13,21 @@ * */ #} -{%- set field_keys = link|keys -%} -{%- set field_name = field_keys[0] -%} -{%- set field_info = link[field_name] -%} -{%- set field_items = field_info["#items"] -%} -{%- set link_uri = field_items[0].uri -%} + +{%- set image_field_keys = image|keys -%} +{%- set image_field_name = image_field_keys[0] -%} +{%- set image_field_info = image[image_field_name] -%} +{%- set image_field_items = image_field_info["#items"] -%} +{%- set link_field_keys = link|keys -%} +{%- set link_field_name = link_field_keys[0] -%} +{%- set link_field_info = link[link_field_name] -%} +{%- set link_field_items = link_field_info["#items"] -%} +{%- set link_uri = link_field_items[0].uri -%} {%- set attributes = attributes.addClass(['su-image-cta-paragraph', modifier_class]) -%}