diff --git a/assets/apps/customizer-controls/src/builder/components/BuilderItem.tsx b/assets/apps/customizer-controls/src/builder/components/BuilderItem.tsx index b72e95657e..0792c06055 100644 --- a/assets/apps/customizer-controls/src/builder/components/BuilderItem.tsx +++ b/assets/apps/customizer-controls/src/builder/components/BuilderItem.tsx @@ -17,7 +17,8 @@ type Props = { const BuilderItem: React.FC = (props) => { const { componentId, currentSection, slot, row, index } = props; - const { actions, builder, sidebarItems } = useContext(BuilderContext); + const { actions, builder, sidebarItems, device } = + useContext(BuilderContext); const itemDetails = window.NeveReactCustomize.HFG[builder].items[componentId]; @@ -52,11 +53,13 @@ const BuilderItem: React.FC = (props) => { }) ); - window.tiTrk?.with('neve').set(`${componentId}_removed`, { - feature: builder + '_builder', - featureComponent: 'component-removed', - featureValue: { row, slot, item: componentId }, - }); + window.tiTrk + ?.with('neve') + .set(`${componentId}__${device}_${builder}_removed`, { + feature: builder + '_builder', + featureComponent: 'component-removed', + featureValue: { row, slot, item: componentId, device }, + }); }; const iconSize = 18; diff --git a/assets/apps/customizer-controls/src/builder/components/ComponentsPopover.tsx b/assets/apps/customizer-controls/src/builder/components/ComponentsPopover.tsx index 5d4ef6ee5a..e64e400c2d 100644 --- a/assets/apps/customizer-controls/src/builder/components/ComponentsPopover.tsx +++ b/assets/apps/customizer-controls/src/builder/components/ComponentsPopover.tsx @@ -25,7 +25,8 @@ const ComponentsPopover: React.FC = ({ const url = window.NeveReactCustomize.upsellComponentsLink; - const { builder, actions, sidebarItems } = useContext(BuilderContext); + const { builder, actions, sidebarItems, device } = + useContext(BuilderContext); const { updateLayout, setSidebarItems } = actions; const addItemToSlot = (itemId: string) => { @@ -37,11 +38,19 @@ const ComponentsPopover: React.FC = ({ updateLayout(rowId, slotId, nextItems); setSidebarItems(sidebarItems.filter((i) => i.id !== itemId)); - window.tiTrk?.with('neve').set(`${itemId}_added`, { - feature: builder + '_builder', - featureComponent: 'component-added', - featureValue: { row: rowId, slot: slotId, item: itemId }, - }); + window.tiTrk + ?.with('neve') + .set(`${itemId}__${device}_${builder}_added`, { + feature: builder + '_builder', + featureComponent: 'component-added', + featureValue: { + row: rowId, + slot: slotId, + item: itemId, + device, + trigger: 'popover', + }, + }); closePopup(); }; diff --git a/assets/apps/customizer-controls/src/builder/components/Slot.tsx b/assets/apps/customizer-controls/src/builder/components/Slot.tsx index 5b39f1ee06..5a4beb2a6e 100644 --- a/assets/apps/customizer-controls/src/builder/components/Slot.tsx +++ b/assets/apps/customizer-controls/src/builder/components/Slot.tsx @@ -19,7 +19,7 @@ type Props = { }; const Slot: React.FC = ({ items, slotId, rowId, className }) => { - const { currentSection, builder, actions, dragging } = + const { currentSection, builder, actions, dragging, device } = useContext(BuilderContext); const { updateLayout, onDragStart } = actions; @@ -44,6 +44,26 @@ const Slot: React.FC = ({ items, slotId, rowId, className }) => { const nextState = newState.map((item) => { return { id: item.id }; }); + + // Track the added components. + nextState + ?.filter((item) => !items.some((i) => i.id === item.id)) + ?.forEach((item) => { + window.tiTrk + ?.with('neve') + .set(`${item.id}__${device}_${builder}_added`, { + feature: builder + '_builder', + featureComponent: 'component-added', + featureValue: { + row: rowId, + slot: slotId, + item: item.id, + device, + trigger: 'drag-and-drop', + }, + }); + }); + updateLayout(rowId, slotId, nextState); }} > diff --git a/assets/scss/components/elements/_mega-menu.scss b/assets/scss/components/elements/_mega-menu.scss index 3ae6406fc0..2958b4caf8 100644 --- a/assets/scss/components/elements/_mega-menu.scss +++ b/assets/scss/components/elements/_mega-menu.scss @@ -66,7 +66,7 @@ .neve-mega-menu > .sub-menu { left: 50% !important; right: unset !important; - transform: translateX(-50%); + transform: translateX(-50%) !important; position: absolute; padding: 20px 10px; top: auto; diff --git a/composer.lock b/composer.lock index 0748621bfe..ecac8f2e57 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "codeinwp/themeisle-sdk", - "version": "3.3.13", + "version": "3.3.14", "source": { "type": "git", "url": "https://github.com/Codeinwp/themeisle-sdk.git", - "reference": "2209cdf402e8f97def8d699bb8447dc67585cc95" + "reference": "662952078c57b12e4d3af9bc98ef847ea3500206" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/2209cdf402e8f97def8d699bb8447dc67585cc95", - "reference": "2209cdf402e8f97def8d699bb8447dc67585cc95", + "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/662952078c57b12e4d3af9bc98ef847ea3500206", + "reference": "662952078c57b12e4d3af9bc98ef847ea3500206", "shasum": "" }, "require-dev": { @@ -42,9 +42,9 @@ ], "support": { "issues": "https://github.com/Codeinwp/themeisle-sdk/issues", - "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.13" + "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.14" }, - "time": "2024-02-01T14:10:46+00:00" + "time": "2024-02-27T17:30:04+00:00" }, { "name": "wptt/webfont-loader", diff --git a/globals/google-fonts.php b/globals/google-fonts.php index b155ca0df6..3ee0afa364 100644 --- a/globals/google-fonts.php +++ b/globals/google-fonts.php @@ -1,6 +1,6 @@ array( '400',), 'Homemade Apple' => array( '400',), 'Homenaje' => array( '400',), + 'Honk' => array( '400',), 'Hubballi' => array( '400',), 'Hurricane' => array( '400',), 'IBM Plex Mono' => array( '100', '200', '300', '400', '500', '600', '700', '100italic', '200italic', '300italic', '400italic', '500italic', '600italic', '700italic',), @@ -1340,6 +1341,7 @@ 'Rubik Doodle Triangles' => array( '400',), 'Rubik Gemstones' => array( '400',), 'Rubik Glitch' => array( '400',), + 'Rubik Glitch Pop' => array( '400',), 'Rubik Iso' => array( '400',), 'Rubik Lines' => array( '400',), 'Rubik Maps' => array( '400',), @@ -1429,6 +1431,7 @@ 'Sintony' => array( '400', '700',), 'Sirin Stencil' => array( '400',), 'Six Caps' => array( '400',), + 'Sixtyfour' => array( '400',), 'Skranji' => array( '400', '700',), 'Slabo 13px' => array( '400',), 'Slabo 27px' => array( '400',), @@ -1605,6 +1608,7 @@ 'Wix Madefor Display' => array( '400', '500', '600', '700', '800',), 'Wix Madefor Text' => array( '400', '500', '600', '700', '800', '400italic', '500italic', '600italic', '700italic', '800italic',), 'Work Sans' => array( '100', '200', '300', '400', '500', '600', '700', '800', '900', '100italic', '200italic', '300italic', '400italic', '500italic', '600italic', '700italic', '800italic', '900italic',), + 'Workbench' => array( '400',), 'Xanh Mono' => array( '400', '400italic',), 'Yaldevi' => array( '200', '300', '400', '500', '600', '700',), 'Yanone Kaffeesatz' => array( '200', '300', '400', '500', '600', '700',), diff --git a/inc/views/template_parts.php b/inc/views/template_parts.php index 0bc67a6094..1bffef416e 100644 --- a/inc/views/template_parts.php +++ b/inc/views/template_parts.php @@ -22,6 +22,12 @@ class Template_Parts extends Base_View { use Layout; + /** + * Use to temporary disable excerpt functionality. + * + * @var bool + */ + private $disable_excerpt = false; /** * Function that is run after instantiation. * @@ -34,6 +40,25 @@ public function init() { add_action( 'neve_blog_post_template_part_content', array( $this, 'render_post' ) ); add_filter( 'excerpt_more', array( $this, 'link_excerpt_more' ) ); add_filter( 'the_content_more_link', array( $this, 'link_excerpt_more' ) ); + add_filter( 'render_block_data', array( $this, 'temporary_disable_excerpt_more' ), -99, 3 ); + } + + /** + * Checks if a query block has the excerpt more block added to avoid duplicate read more. + * + * @param array $block_data Block data. + * @param array $block_type Block type. + * @param array $attributes Block attributes. + * + * @return array + */ + public function temporary_disable_excerpt_more( $block_data, $block_type, $attributes ) { + + if ( 'core/post-excerpt' === $block_type['blockName'] ) { + $this->disable_excerpt = true; + } + return $block_data; + } /** @@ -211,7 +236,7 @@ protected function post_class( $post_id = null, $additional = '' ) { $class .= ' nv-non-grid-article'; } } - + // Filter the Core classes for missing components. $is_thumbnail_inactive = ! in_array( 'thumbnail', $this->get_ordered_components(), true ); if ( $is_thumbnail_inactive ) { @@ -417,6 +442,13 @@ private function get_excerpt( $post_id = null ) { * @return string */ public function link_excerpt_more( $moretag, $post_id = null ) { + + + if ( $this->disable_excerpt ) { + $this->disable_excerpt = false; + return $moretag; + } + $new_moretag = '… '; if ( $moretag !== ' […]' ) {