Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHS-5661: Remove legacy fields #1577

Merged
merged 7 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ dependencies:
- field.field.paragraph.hs_hero_image.field_hs_hero_body
- field.field.paragraph.hs_hero_image.field_hs_hero_image
- field.field.paragraph.hs_hero_image.field_hs_hero_link
- field.field.paragraph.hs_hero_image.field_hs_hero_overlay_color
- field.field.paragraph.hs_hero_image.field_hs_hero_title
- paragraphs.paragraphs_type.hs_hero_image
module:
- allowed_formats
- color_field
- linkit
- maxlength
- media_library
Expand Down Expand Up @@ -54,13 +52,6 @@ content:
linkit_profile: default
linkit_auto_link_text: false
third_party_settings: { }
field_hs_hero_overlay_color:
type: color_field_widget_box
weight: 5
region: content
settings:
default_colors: '#00505C,#53284F,#175E54,#4D4F53,#5E3032'
third_party_settings: { }
field_hs_hero_title:
type: string_textfield
weight: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ dependencies:
- field.field.paragraph.hs_hero_image.field_hs_hero_body
- field.field.paragraph.hs_hero_image.field_hs_hero_image
- field.field.paragraph.hs_hero_image.field_hs_hero_link
- field.field.paragraph.hs_hero_image.field_hs_hero_overlay_color
- field.field.paragraph.hs_hero_image.field_hs_hero_title
- paragraphs.paragraphs_type.hs_hero_image
module:
Expand Down Expand Up @@ -41,6 +40,5 @@ content:
hidden:
field_hs_hero_body: true
field_hs_hero_link: true
field_hs_hero_overlay_color: true
field_hs_hero_title: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dependencies:
- field.field.paragraph.hs_hero_image.field_hs_hero_body
- field.field.paragraph.hs_hero_image.field_hs_hero_image
- field.field.paragraph.hs_hero_image.field_hs_hero_link
- field.field.paragraph.hs_hero_image.field_hs_hero_overlay_color
- field.field.paragraph.hs_hero_image.field_hs_hero_title
- paragraphs.paragraphs_type.hs_hero_image
module:
Expand All @@ -32,14 +31,7 @@ third_party_settings:
settings:
pattern:
field_templates: default
variant: _field
variant_field: field_hs_hero_overlay_color
variant_field_values:
default: 00505c
purple: 53284f
paloalto: '175e54'
coolgrey: 4d4f53
brown: '5e3032'
variant_field: field_hs_hero_body
regions:
image:
- field_hs_hero_image
Expand Down Expand Up @@ -123,5 +115,4 @@ content:
weight: 1
region: overlay_text
hidden:
field_hs_hero_overlay_color: true
search_api_excerpt: true
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dependencies:
- field.field.paragraph.hs_hero_image.field_hs_hero_body
- field.field.paragraph.hs_hero_image.field_hs_hero_image
- field.field.paragraph.hs_hero_image.field_hs_hero_link
- field.field.paragraph.hs_hero_image.field_hs_hero_overlay_color
- field.field.paragraph.hs_hero_image.field_hs_hero_title
- paragraphs.paragraphs_type.hs_hero_image
module:
Expand Down Expand Up @@ -47,6 +46,5 @@ content:
hidden:
field_hs_hero_body: true
field_hs_hero_link: true
field_hs_hero_overlay_color: true
field_hs_hero_title: true
search_api_excerpt: true

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions config/default/user.role.anonymous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ permissions:
- 'access content'
- 'download media'
- 'view field_hs_accordion_views'
- 'view field_hs_hero_overlay_color'
- 'view field_hs_text_area_bg_color'
- 'view field_media_embeddable_code'
- 'view field_paragraph_style'
- 'view humsci entity'
- 'view media'
- 'view own field_hs_accordion_views'
- 'view own field_hs_hero_overlay_color'
- 'view own field_media_embeddable_code'
- 'view the administration theme'
2 changes: 0 additions & 2 deletions config/default/user.role.authenticated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ permissions:
- 'use text format basic_html_without_media'
- 'use text format webform_default'
- 'view field_hs_accordion_views'
- 'view field_hs_hero_overlay_color'
- 'view field_hs_text_area_bg_color'
- 'view field_media_embeddable_code'
- 'view field_paragraph_style'
- 'view humsci entity'
- 'view media'
- 'view own field_hs_accordion_views'
- 'view own field_hs_hero_overlay_color'
- 'view own field_media_embeddable_code'
- 'view the administration theme'
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{%- set attributes = attributes.addClass('hb-hero-overlay') -%}

{% if variant %}
{% set variant_class = "hb-hero-overlay--color-#{variant}" %}
{% set attributes = attributes.addClass(variant_class) %}
{% endif %}

{% set text_content = overlay_text %}
{% if overlay_text['field_hs_hero_title'] is defined and overlay_text['field_hs_hero_title'][0] is defined %}
{% set text_content %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
hero_text_overlay:
label: "Hero Text Overlay"
description: ""
variants:
default:
label: Lagunita
description: Lagunita Gradient
purple:
label: Purple
description: Purple Gradient
paloalto:
label: Palo Alto
description: Palo Alto Gradient
coolgrey:
label: Cool Grey
description: Cool Grey Gradient
brown:
label: Brown
description: Brown Gradient
fields:
image:
label: "Image"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,11 @@ function hs_paragraph_types_update_10004(&$sandbox) {
}
$sandbox['#finished'] = count($sandbox['ids']) ? 1 - count($sandbox['ids']) / $sandbox['total'] : 1;
}

/**
* Removes legacy fields from paragraphs.
*/
function hs_paragraph_types_update_10005() {
// SHS-5661 - remove legacy Banner image(s) with text box Overlay Color field.
FieldConfig::loadByName('paragraph', 'hs_hero_image', 'field_hs_hero_overlay_color')->delete();
}
Original file line number Diff line number Diff line change
Expand Up @@ -1258,10 +1258,6 @@ default:
target_uuid: 287db095-35b1-4050-8d26-5d8332eeb6a6
title: 'Link to The Homepage'
options: { }
field_hs_hero_overlay_color:
-
color: 00505c
opacity: !!float 0
field_hs_hero_title:
-
value: 'Hero (Layered) - Slider title text'
Expand Down Expand Up @@ -1293,10 +1289,6 @@ default:
field_hs_hero_image:
-
entity: 941470f3-b916-4e5f-b53d-e2386277d01c
field_hs_hero_overlay_color:
-
color: 00505c
opacity: !!float 0
field_hs_hero_title:
-
value: 'Hero (Layered) - Slider title text 2'
Expand Down Expand Up @@ -1333,10 +1325,6 @@ default:
target_uuid: 287db095-35b1-4050-8d26-5d8332eeb6a6
title: 'Learn more'
options: { }
field_hs_hero_overlay_color:
-
color: 00505c
opacity: !!float 0
field_hs_hero_title:
-
value: 'Hero (Overlay) component section'
Expand Down
Loading