Skip to content

Commit

Permalink
Add go_link paragraph due to GraphQL compatibility
Browse files Browse the repository at this point in the history
Removed `LinkitGoOptionsWidget` due to difficulties in exporting extra fields to GraphQL. Instead, implemented a `go_link` paragraph with a URL (title included), an `aria-label`, and a "opens in new window" toggle. This is now used in `go_linkbox` and enabled in GraphQL
  • Loading branch information
kasperbirch1 committed Feb 3, 2025
1 parent a1d53ad commit 044ee64
Show file tree
Hide file tree
Showing 14 changed files with 379 additions and 130 deletions.
44 changes: 44 additions & 0 deletions config/sync/core.entity_form_display.paragraph.go_link.default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
uuid: aea77006-ef8e-4082-be55-079008cf2399
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.go_link.field_aria_label
- field.field.paragraph.go_link.field_link
- field.field.paragraph.go_link.field_target_blank
- paragraphs.paragraphs_type.go_link
module:
- linkit
id: paragraph.go_link.default
targetEntityType: paragraph
bundle: go_link
mode: default
content:
field_aria_label:
type: string_textfield
weight: 1
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
field_link:
type: linkit
weight: 0
region: content
settings:
placeholder_url: ''
placeholder_title: ''
linkit_profile: default
linkit_auto_link_text: false
third_party_settings: { }
field_target_blank:
type: boolean_checkbox
weight: 2
region: content
settings:
display_label: true
third_party_settings: { }
hidden:
created: true
status: true
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ dependencies:
- field.field.paragraph.go_linkbox.field_title
- paragraphs.paragraphs_type.go_linkbox
module:
- dpl_link
- media_library
- paragraphs
- paragraphs_ee
- paragraphs_features
id: paragraph.go_linkbox.default
targetEntityType: paragraph
bundle: go_linkbox
Expand Down Expand Up @@ -39,17 +41,36 @@ content:
media_types: { }
third_party_settings: { }
field_go_link:
type: dpl_link_go_options
type: paragraphs
weight: 3
region: content
settings:
placeholder_url: ''
placeholder_title: ''
linkit_profile: default
linkit_auto_link_text: false
target_blank: 0
aria_label: ''
third_party_settings: { }
title: Paragraph
title_plural: Paragraphs
edit_mode: open
closed_mode: summary
autocollapse: none
closed_mode_threshold: 0
add_mode: dropdown
form_display_mode: default
default_paragraph_type: go_link
features:
add_above: '0'
collapse_edit_all: '0'
convert: '0'
duplicate: '0'
third_party_settings:
paragraphs_features:
add_in_between: false
add_in_between_link_count: 3
delete_confirmation: false
show_drag_and_drop: false
show_collapse_all: false
paragraphs_ee:
paragraphs_ee:
dialog_off_canvas: false
dialog_style: tiles
drag_drop: false
field_title:
type: string_textfield
weight: 1
Expand Down
48 changes: 48 additions & 0 deletions config/sync/core.entity_view_display.paragraph.go_link.default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
uuid: 149c4c93-19c3-422b-af2f-8d70e8c249b9
langcode: en
status: true
dependencies:
config:
- field.field.paragraph.go_link.field_aria_label
- field.field.paragraph.go_link.field_link
- field.field.paragraph.go_link.field_target_blank
- paragraphs.paragraphs_type.go_link
module:
- link
id: paragraph.go_link.default
targetEntityType: paragraph
bundle: go_link
mode: default
content:
field_aria_label:
type: string
label: above
settings:
link_to_entity: false
third_party_settings: { }
weight: 1
region: content
field_link:
type: link
label: hidden
settings:
trim_length: null
url_only: false
url_plain: false
rel: '0'
target: '0'
third_party_settings: { }
weight: 0
region: content
field_target_blank:
type: boolean
label: above
settings:
format: default
format_custom_false: ''
format_custom_true: ''
third_party_settings: { }
weight: 2
region: content
hidden:
search_api_excerpt: true
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
- field.field.paragraph.go_linkbox.field_title
- paragraphs.paragraphs_type.go_linkbox
module:
- link
- entity_reference_revisions
- options
id: paragraph.go_linkbox.default
targetEntityType: paragraph
Expand Down Expand Up @@ -41,16 +41,13 @@ content:
weight: 3
region: content
field_go_link:
type: link
type: entity_reference_revisions_entity_view
label: above
settings:
trim_length: 80
url_only: false
url_plain: false
rel: ''
target: ''
view_mode: default
link: ''
third_party_settings: { }
weight: 1
weight: 5
region: content
field_title:
type: string
Expand Down
19 changes: 19 additions & 0 deletions config/sync/field.field.paragraph.go_link.field_aria_label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
uuid: e049297d-570d-481a-abee-9437d848be45
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_aria_label
- paragraphs.paragraphs_type.go_link
id: paragraph.go_link.field_aria_label
field_name: field_aria_label
entity_type: paragraph
bundle: go_link
label: 'Aria Label'
description: ''
required: false
translatable: false
default_value: { }
default_value_callback: ''
settings: { }
field_type: string
23 changes: 23 additions & 0 deletions config/sync/field.field.paragraph.go_link.field_link.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
uuid: 87a4e6be-a19b-422e-81ac-7355c25825ba
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_link
- paragraphs.paragraphs_type.go_link
module:
- link
id: paragraph.go_link.field_link
field_name: field_link
entity_type: paragraph
bundle: go_link
label: Link
description: ''
required: true
translatable: false
default_value: { }
default_value_callback: ''
settings:
title: 2
link_type: 17
field_type: link
23 changes: 23 additions & 0 deletions config/sync/field.field.paragraph.go_link.field_target_blank.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
uuid: c68b4c84-fd62-40e9-9d62-155b50a0e8b7
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_target_blank
- paragraphs.paragraphs_type.go_link
id: paragraph.go_link.field_target_blank
field_name: field_target_blank
entity_type: paragraph
bundle: go_link
label: 'Open link in a new window'
description: ''
required: false
translatable: false
default_value:
-
value: 0
default_value_callback: ''
settings:
on_label: 'Open link in a new window'
off_label: 'Open link in the same window'
field_type: boolean
123 changes: 118 additions & 5 deletions config/sync/field.field.paragraph.go_linkbox.field_go_link.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
uuid: 91381c4d-093f-49a7-92e5-5fb2de7ed018
uuid: 11d0e9cf-02a4-4073-8d16-98c6d0796551
langcode: en
status: true
dependencies:
config:
- field.storage.paragraph.field_go_link
- paragraphs.paragraphs_type.go_link
- paragraphs.paragraphs_type.go_linkbox
module:
- link
- entity_reference_revisions
id: paragraph.go_linkbox.field_go_link
field_name: field_go_link
entity_type: paragraph
Expand All @@ -18,6 +19,118 @@ translatable: false
default_value: { }
default_value_callback: ''
settings:
title: 2
link_type: 17
field_type: link
handler: 'default:paragraph'
handler_settings:
target_bundles:
go_link: go_link
negate: 0
target_bundles_drag_drop:
accordion:
weight: 37
enabled: false
banner:
weight: 38
enabled: false
breadcrumb_children:
weight: 39
enabled: false
campaign_rule:
weight: 40
enabled: false
card_grid_automatic:
weight: 41
enabled: false
card_grid_manual:
weight: 42
enabled: false
content_slider:
weight: 43
enabled: false
content_slider_automatic:
weight: 44
enabled: false
event_ticket_category:
weight: 45
enabled: false
files:
weight: 46
enabled: false
filtered_event_list:
weight: 47
enabled: false
go_link:
weight: 49
enabled: true
go_linkbox:
weight: 36
enabled: false
go_material_slider_automatic:
weight: 48
enabled: false
go_material_slider_manual:
weight: 49
enabled: false
go_video:
weight: 50
enabled: false
go_video_bundle_automatic:
weight: 51
enabled: false
go_video_bundle_manual:
weight: 52
enabled: false
hero:
weight: 53
enabled: false
language_selector:
weight: 54
enabled: false
links:
weight: 55
enabled: false
manual_event_list:
weight: 56
enabled: false
material_grid_automatic:
weight: 57
enabled: false
material_grid_manual:
weight: 58
enabled: false
medias:
weight: 59
enabled: false
nav_grid_manual:
weight: 60
enabled: false
nav_spots_manual:
weight: 61
enabled: false
opening_hours:
weight: 62
enabled: false
recommendation:
weight: 63
enabled: false
simple_links:
weight: 64
enabled: false
text_body:
weight: 65
enabled: false
user_registration_item:
weight: 66
enabled: false
user_registration_linklist:
weight: 67
enabled: false
user_registration_section:
weight: 68
enabled: false
video:
weight: 69
enabled: false
webform:
weight: 70
enabled: false
field_type: entity_reference_revisions
Loading

0 comments on commit 044ee64

Please sign in to comment.