From 72397080aee1bc05a86654274e0632121edaa315 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Tue, 27 Aug 2024 16:20:23 +0530 Subject: [PATCH 1/3] feat: add messenger social media support --- .../customizer-controls/src/repeater/RepeaterItemContent.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/apps/customizer-controls/src/repeater/RepeaterItemContent.js b/assets/apps/customizer-controls/src/repeater/RepeaterItemContent.js index 8064bdf607..56cc7bf170 100644 --- a/assets/apps/customizer-controls/src/repeater/RepeaterItemContent.js +++ b/assets/apps/customizer-controls/src/repeater/RepeaterItemContent.js @@ -67,6 +67,12 @@ const RepeaterItemContent = ({ switch (currentField.type) { case 'text': + if ( + 'page_name' === key && + 'messenger' !== value[index]?.social_network + ) { + return; + } return ( Date: Tue, 27 Aug 2024 16:33:54 +0530 Subject: [PATCH 2/3] feat: add messenger option in storybook --- stories/utils/values.js | 1 + 1 file changed, 1 insertion(+) diff --git a/stories/utils/values.js b/stories/utils/values.js index 5874259dae..2bcfb5ff67 100644 --- a/stories/utils/values.js +++ b/stories/utils/values.js @@ -220,6 +220,7 @@ export const FIELDS = { whatsapp: 'WhatsApp', sms: 'SMS', vk: 'VKontakte' + messenger: 'Messenger' } }, display_desktop: { From dbd363627573a66ff2fc08fd1b0625682445b769 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Fri, 30 Aug 2024 09:31:42 +0530 Subject: [PATCH 3/3] feat: add help text --- .../src/repeater/RepeaterItemContent.js | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/assets/apps/customizer-controls/src/repeater/RepeaterItemContent.js b/assets/apps/customizer-controls/src/repeater/RepeaterItemContent.js index 56cc7bf170..fa3eae05b3 100644 --- a/assets/apps/customizer-controls/src/repeater/RepeaterItemContent.js +++ b/assets/apps/customizer-controls/src/repeater/RepeaterItemContent.js @@ -4,6 +4,7 @@ import { TextControl, ToggleControl, TextareaControl, + ExternalLink, } from '@wordpress/components'; import IconSelector from './IconSelector'; import { getIcons, ColorControl } from '@neve-wp/components'; @@ -68,18 +69,26 @@ const RepeaterItemContent = ({ switch (currentField.type) { case 'text': if ( - 'page_name' === key && + 'fb_page_id' === key && 'messenger' !== value[index]?.social_network ) { return; } return ( - changeContent(key, newData)} - key={key + index} - /> + <> + changeContent(key, newData)} + key={key + index} + help={currentField.help_text || ''} + /> + {currentField?.help_link && ( + + {currentField?.help_link?.text} + + )} + ); case 'textarea': return (