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

SDSS-591: Add callout component #170

Merged
Merged
Show file tree
Hide file tree
Changes from 5 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
@@ -0,0 +1,61 @@
uuid: 9f0bf4e8-a27d-405e-9ada-11de3310affc
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.callout_quote.su_callout_author
- field.field.paragraph.callout_quote.su_callout_author_title
- field.field.paragraph.callout_quote.su_callout_blue_bg
- field.field.paragraph.callout_quote.su_callout_quote
- field.field.paragraph.callout_quote.su_select_font_sizing
- paragraphs.paragraphs_type.callout_quote
module:
- change_labels
- text
id: paragraph.callout_quote.default
targetEntityType: paragraph
bundle: callout_quote
mode: default
content:
su_callout_author:
type: text_textfield
weight: 3
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
su_callout_author_title:
type: text_textfield
weight: 4
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
su_callout_blue_bg:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple things on this field:

We shouldn't bake the color into the id/machine name.

  • Something like su_callout_bgcolor_alt might make more sense.

If they want more options in the future (or we want to maintain flexibility to add more), this should probably be a drop-down instead of a boolean checkbox. We'd only have two options (right now).

  • Name the field something like: su_callout_bgcolor
  • Add two options:
    • Default|bg_color_default
    • Blue|bg_color_option1

We can always re-label a color down the line (for example "Blue" could be changed to "Green"). But we can't change the id/machine_name easily, so using something like "option1" instead of "blue" allows us to maintain flexibility.

type: boolean_checkbox
weight: 0
region: content
settings:
display_label: true
third_party_settings:
change_labels:
field_label_overwrite: ''
su_callout_quote:
type: text_textarea
weight: 2
region: content
settings:
rows: 5
placeholder: ''
third_party_settings: { }
su_select_font_sizing:
type: options_select
weight: 1
region: content
settings: { }
third_party_settings: { }
hidden:
created: true
status: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
uuid: d0c207e6-0b88-4f69-9f39-c6a71733f1a0
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.callout_quote.su_callout_author
- field.field.paragraph.callout_quote.su_callout_author_title
- field.field.paragraph.callout_quote.su_callout_blue_bg
- field.field.paragraph.callout_quote.su_callout_quote
- field.field.paragraph.callout_quote.su_select_font_sizing
- paragraphs.paragraphs_type.callout_quote
module:
- element_class_formatter
- empty_fields
- field_formatter_class
- options
- text
id: paragraph.callout_quote.default
targetEntityType: paragraph
bundle: callout_quote
mode: default
content:
su_callout_author:
type: wrapper_class
label: hidden
settings:
class: ''
tag: p
link: false
link_class: ''
summary: false
trim: 200
third_party_settings:
empty_fields:
handler: ''
field_formatter_class:
class: ''
weight: 3
region: content
su_callout_author_title:
type: wrapper_class
label: hidden
settings:
class: ''
tag: p
link: false
link_class: ''
summary: false
trim: 200
third_party_settings:
empty_fields:
handler: ''
field_formatter_class:
class: ''
weight: 4
region: content
su_callout_blue_bg:
type: boolean
label: hidden
settings:
format: custom
format_custom_false: white_bg
format_custom_true: blue_bg
third_party_settings:
empty_fields:
handler: text
settings:
empty_text: ''
field_formatter_class:
class: ''
weight: 0
region: content
su_callout_quote:
type: text_default
label: hidden
settings: { }
third_party_settings:
empty_fields:
handler: ''
field_formatter_class:
class: ''
weight: 2
region: content
su_select_font_sizing:
type: list_key
label: hidden
settings: { }
third_party_settings:
empty_fields:
handler: ''
field_formatter_class:
class: ''
weight: 1
region: content
hidden:
search_api_excerpt: true

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
uuid: 078c755f-aa0f-473b-956a-f7f81e9289aa
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.su_callout_author
- paragraphs.paragraphs_type.callout_quote
module:
- allowed_formats
- text
third_party_settings:
allowed_formats:
allowed_formats:
- stanford_minimal_html
id: paragraph.callout_quote.su_callout_author
field_name: su_callout_author
entity_type: paragraph
bundle: callout_quote
label: Author
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: text
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
uuid: 0d8e6585-5bc8-4c32-bc01-1fccf3df3ff3
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.su_callout_author_title
- paragraphs.paragraphs_type.callout_quote
module:
- allowed_formats
- text
third_party_settings:
allowed_formats:
allowed_formats:
- stanford_minimal_html
id: paragraph.callout_quote.su_callout_author_title
field_name: su_callout_author_title
entity_type: paragraph
bundle: callout_quote
label: 'Author''s Title'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: text
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
uuid: 962d5f2b-c53f-49b1-9da3-8a75a4af4a04
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.su_callout_blue_bg
- paragraphs.paragraphs_type.callout_quote
id: paragraph.callout_quote.su_callout_blue_bg
field_name: su_callout_blue_bg
entity_type: paragraph
bundle: callout_quote
label: 'Add a light blue background'
description: ''
required: false
translatable: false
default_value:
-
value: 0
default_value_callback: ''
settings:
on_label: 'Yes'
off_label: 'No'
field_type: boolean
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
uuid: dd2190fd-9b02-4c21-a74f-c927908769e7
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.su_callout_quote
- paragraphs.paragraphs_type.callout_quote
module:
- allowed_formats
- text
third_party_settings:
allowed_formats:
allowed_formats:
- stanford_minimal_html
id: paragraph.callout_quote.su_callout_quote
field_name: su_callout_quote
entity_type: paragraph
bundle: callout_quote
label: Quote
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: text_long
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
uuid: 50a3f576-4e54-4743-9311-b9506633710a
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.su_select_font_sizing
- paragraphs.paragraphs_type.callout_quote
module:
- options
id: paragraph.callout_quote.su_select_font_sizing
field_name: su_select_font_sizing
entity_type: paragraph
bundle: callout_quote
label: 'Select font sizing'
description: ''
required: true
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: list_string
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: 192e990f-189f-4ecf-8b04-e77e5060c098
langcode: en
status: true
dependencies:
module:
- paragraphs
- text
id: paragraph.su_callout_author
field_name: su_callout_author
entity_type: paragraph
type: text
settings:
max_length: 255
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
uuid: 18e3117d-e21c-461f-83d7-56abc9b1d741
langcode: en
status: true
dependencies:
module:
- paragraphs
- text
id: paragraph.su_callout_author_title
field_name: su_callout_author_title
entity_type: paragraph
type: text
settings:
max_length: 255
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
uuid: a0daece8-0f81-43fc-81a9-ef83c4b0e141
langcode: en
status: true
dependencies:
module:
- paragraphs
id: paragraph.su_callout_blue_bg
field_name: su_callout_blue_bg
entity_type: paragraph
type: boolean
settings: { }
module: core
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: 6941a08f-f92f-44d4-80c0-433e03beb031
langcode: en
status: true
dependencies:
module:
- paragraphs
- text
id: paragraph.su_callout_quote
field_name: su_callout_quote
entity_type: paragraph
type: text_long
settings: { }
module: text
locked: false
cardinality: 1
translatable: true
indexes: { }
persist_with_no_fields: false
custom_storage: false
Loading