From 40a2ee8d6b695e6b967f4e7b5b1f48d74f8e595e Mon Sep 17 00:00:00 2001 From: Andreas Nielsen Date: Thu, 9 Jan 2025 16:13:10 +0100 Subject: [PATCH] Added a new URL textfield to the GO Video Paragraph. The URL textfield is used for adding a VideoTool URL, which will be used to render VideoTool videos in the frontend. Removed existing Media field from the paragraph, as it will not be used for now. This is probably a temporary solution, as we would like to integrate VideoTool into the core Media module. But for now this will be sufficient. --- ...orm_display.paragraph.go_video.default.yml | 17 +++++------ ...iew_display.paragraph.go_video.default.yml | 17 +++++------ ...iew_display.paragraph.go_video.preview.yml | 13 ++------- ...d.paragraph.go_video.field_embed_video.yml | 29 ------------------- ...eld.field.paragraph.go_video.field_url.yml | 19 ++++++++++++ .../field.storage.paragraph.field_url.yml | 21 ++++++++++++++ config/sync/graphql_compose.settings.yml | 5 ++-- 7 files changed, 62 insertions(+), 59 deletions(-) delete mode 100644 config/sync/field.field.paragraph.go_video.field_embed_video.yml create mode 100644 config/sync/field.field.paragraph.go_video.field_url.yml create mode 100644 config/sync/field.storage.paragraph.field_url.yml diff --git a/config/sync/core.entity_form_display.paragraph.go_video.default.yml b/config/sync/core.entity_form_display.paragraph.go_video.default.yml index a66a3be7a..92513a960 100644 --- a/config/sync/core.entity_form_display.paragraph.go_video.default.yml +++ b/config/sync/core.entity_form_display.paragraph.go_video.default.yml @@ -3,26 +3,25 @@ langcode: en status: true dependencies: config: - - field.field.paragraph.go_video.field_embed_video - field.field.paragraph.go_video.field_go_video_title + - field.field.paragraph.go_video.field_url - paragraphs.paragraphs_type.go_video - module: - - media_library id: paragraph.go_video.default targetEntityType: paragraph bundle: go_video mode: default content: - field_embed_video: - type: media_library_widget - weight: 1 + field_go_video_title: + type: string_textfield + weight: 0 region: content settings: - media_types: { } + size: 60 + placeholder: '' third_party_settings: { } - field_go_video_title: + field_url: type: string_textfield - weight: 0 + weight: 1 region: content settings: size: 60 diff --git a/config/sync/core.entity_view_display.paragraph.go_video.default.yml b/config/sync/core.entity_view_display.paragraph.go_video.default.yml index 6d0b2a975..f98cbcd04 100644 --- a/config/sync/core.entity_view_display.paragraph.go_video.default.yml +++ b/config/sync/core.entity_view_display.paragraph.go_video.default.yml @@ -3,30 +3,29 @@ langcode: en status: true dependencies: config: - - field.field.paragraph.go_video.field_embed_video - field.field.paragraph.go_video.field_go_video_title + - field.field.paragraph.go_video.field_url - paragraphs.paragraphs_type.go_video id: paragraph.go_video.default targetEntityType: paragraph bundle: go_video mode: default content: - field_embed_video: - type: entity_reference_entity_view + field_go_video_title: + type: string label: hidden settings: - view_mode: full - link: false + link_to_entity: false third_party_settings: { } - weight: 0 + weight: 1 region: content - field_go_video_title: + field_url: type: string - label: hidden + label: above settings: link_to_entity: false third_party_settings: { } - weight: 1 + weight: 2 region: content hidden: search_api_excerpt: true diff --git a/config/sync/core.entity_view_display.paragraph.go_video.preview.yml b/config/sync/core.entity_view_display.paragraph.go_video.preview.yml index 5fadb0a38..4b77a19a1 100644 --- a/config/sync/core.entity_view_display.paragraph.go_video.preview.yml +++ b/config/sync/core.entity_view_display.paragraph.go_video.preview.yml @@ -4,22 +4,15 @@ status: true dependencies: config: - core.entity_view_mode.paragraph.preview - - field.field.paragraph.go_video.field_embed_video - field.field.paragraph.go_video.field_go_video_title + - field.field.paragraph.go_video.field_url - paragraphs.paragraphs_type.go_video id: paragraph.go_video.preview targetEntityType: paragraph bundle: go_video mode: preview -content: - field_embed_video: - type: entity_reference_label - label: above - settings: - link: true - third_party_settings: { } - weight: 0 - region: content +content: { } hidden: field_go_video_title: true + field_url: true search_api_excerpt: true diff --git a/config/sync/field.field.paragraph.go_video.field_embed_video.yml b/config/sync/field.field.paragraph.go_video.field_embed_video.yml deleted file mode 100644 index ced4cd55a..000000000 --- a/config/sync/field.field.paragraph.go_video.field_embed_video.yml +++ /dev/null @@ -1,29 +0,0 @@ -uuid: 9fa7b375-b0cd-493f-ac3e-c8bf333b0da6 -langcode: en -status: true -dependencies: - config: - - field.storage.paragraph.field_embed_video - - media.type.video - - paragraphs.paragraphs_type.go_video -id: paragraph.go_video.field_embed_video -field_name: field_embed_video -entity_type: paragraph -bundle: go_video -label: 'Embed video' -description: '' -required: false -translatable: false -default_value: { } -default_value_callback: '' -settings: - handler: 'default:media' - handler_settings: - target_bundles: - video: video - sort: - field: name - direction: ASC - auto_create: false - auto_create_bundle: '' -field_type: entity_reference diff --git a/config/sync/field.field.paragraph.go_video.field_url.yml b/config/sync/field.field.paragraph.go_video.field_url.yml new file mode 100644 index 000000000..f1e06def5 --- /dev/null +++ b/config/sync/field.field.paragraph.go_video.field_url.yml @@ -0,0 +1,19 @@ +uuid: 06195192-61b6-4051-95f6-5891e43b5868 +langcode: en +status: true +dependencies: + config: + - field.storage.paragraph.field_url + - paragraphs.paragraphs_type.go_video +id: paragraph.go_video.field_url +field_name: field_url +entity_type: paragraph +bundle: go_video +label: URL +description: 'VideoTool URL. Example: https://media.videotool.dk/?vn=557_2023103014511477700668916683' +required: true +translatable: false +default_value: { } +default_value_callback: '' +settings: { } +field_type: string diff --git a/config/sync/field.storage.paragraph.field_url.yml b/config/sync/field.storage.paragraph.field_url.yml new file mode 100644 index 000000000..61f9a1ba8 --- /dev/null +++ b/config/sync/field.storage.paragraph.field_url.yml @@ -0,0 +1,21 @@ +uuid: 281fa3a7-a299-47af-8d39-56b4865109f6 +langcode: en +status: true +dependencies: + module: + - paragraphs +id: paragraph.field_url +field_name: field_url +entity_type: paragraph +type: string +settings: + max_length: 255 + case_sensitive: false + is_ascii: false +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/graphql_compose.settings.yml b/config/sync/graphql_compose.settings.yml index 4a3262c7c..78da741a0 100644 --- a/config/sync/graphql_compose.settings.yml +++ b/config/sync/graphql_compose.settings.yml @@ -210,10 +210,11 @@ field_config: field_title: enabled: true go_video: - field_embed_video: - enabled: true field_go_video_title: enabled: true + name_sdl: title + field_url: + enabled: true manual_event_list: field_events: enabled: true