Skip to content

Commit aabd495

Browse files
authored
release(minor): new version
### New Features - **Enable full HTML5 theme support**: All HTML5 theme support features are now enabled. - **Added X (former Twitter) and Apple Music logo for Social Icons**: Updated the social icons list. - **Added mobile support for the footer in Header Footer Grid builder**: Now users can control and build the layout for the footer when viewed on mobile. ### Bug Fixes - **WooCommerce notices styles for v8.5**: Fixed a bug with the notice styles introduced by WooCommerce v8.5 - **Single Post title alignment**: when using full width layout the alignment should work as expected now. - **Improve SEO site-title tag for homepage**: Improved SEO site-title tag on the homepage. - **Missing translations for the Customizer.** - **Sub-menu item long text**: Fixed the sub-menu item when text is too long, now it will wrap as expected. - **Fix the opening of Search Icon in Mobile Sidebar** - **Fix position of search input**: on minimal when space is restricted - **Scrollable mobile header builder droppable zone**: Previously when having too many items it would become hard to manage. ### Improvements - **Add feature usage observer** - **Update internal dependencies** - **Support changes for Custom payment icons** - **Support changes for the Custom SVG menu icon** - **Add integration for Formbricks survey** inside the Dashboard. - **Update Google Fonts**:​ Get the newest Google fonts from the public font library.
2 parents b4d6b67 + aca9b41 commit aabd495

File tree

64 files changed

+1286
-174
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1286
-174
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
const path = require('path');
2+
3+
/**
4+
* This plugin appends the non-entrypoint JS chunk file names to the asset files generated by the DependencyExtractionWebpackPlugin.
5+
*
6+
* This mostly used to load translation files for the non-entrypoint JS chunks.
7+
*/
8+
class ChunksNameAssetAppendPlugin {
9+
apply(compiler) {
10+
compiler.hooks.compilation.tap(
11+
'EntrypointChunksPlugin',
12+
(compilation) => {
13+
compilation.hooks.processAssets.tapAsync(
14+
{
15+
name: 'EntrypointChunksPlugin',
16+
stage: compiler.webpack.Compilation
17+
.PROCESS_ASSETS_STAGE_ANALYSE,
18+
},
19+
(assets, callback) => {
20+
// Get entrypoint names
21+
const entrypoints = Array.from(
22+
compilation.entrypoints.keys()
23+
);
24+
25+
// Collecting non-entrypoint JS chunk file names
26+
const jsChunkFiles = Object.keys(assets).filter(
27+
(file) =>
28+
file.endsWith('.js') &&
29+
!entrypoints.includes(
30+
path.basename(file, '.js')
31+
)
32+
);
33+
34+
if (jsChunkFiles.length === 0) {
35+
callback();
36+
return;
37+
}
38+
39+
// Manually constructing the array string for PHP
40+
const jsChunkFilesArrayString =
41+
'array(' +
42+
jsChunkFiles.map((file) => `'${file}'`).join(', ') +
43+
')';
44+
45+
// Process each asset
46+
for (const assetName in assets) {
47+
if (assetName.endsWith('.asset.php')) {
48+
// Modify asset content
49+
const assetContent = assets[assetName].source();
50+
const modifiedContent = assetContent.replace(
51+
'<?php return array(',
52+
`<?php return array('chunks' => ${jsChunkFilesArrayString},`
53+
);
54+
55+
/* eslint-disable no-console */
56+
console.log(
57+
'\n\x1b[35m%s\x1b[0m \x1b[0m%s\x1b[0m \x1b[36m%s\x1b[0m \x1b[33m%s\x1b[0m\n',
58+
'[Neve Webpack Plugin][ChunksNameAssetAppendPlugin]',
59+
assetName,
60+
'has been changed to include the following file chunks name as array:',
61+
jsChunkFilesArrayString
62+
);
63+
64+
// Updating the asset in the compilation
65+
compilation.updateAsset(
66+
assetName,
67+
new compiler.webpack.sources.RawSource(
68+
modifiedContent
69+
)
70+
);
71+
}
72+
}
73+
74+
callback();
75+
}
76+
);
77+
}
78+
);
79+
}
80+
}
81+
82+
module.exports = {
83+
ChunksNameAssetAppendPlugin,
84+
};

assets/apps/components/config/webpack.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const DependencyExtractionWebpackPlugin = require('@wordpress/dependency-extraction-webpack-plugin');
22
const config = require('@wordpress/scripts/config/webpack.config');
3+
const customPlugins = require('./custom-plugins');
34

45
const plugins = [
56
...config.plugins.filter(
@@ -19,6 +20,7 @@ const plugins = [
1920
}
2021
},
2122
}),
23+
new customPlugins.ChunksNameAssetAppendPlugin(),
2224
];
2325

2426
module.exports = (env) => {

assets/apps/components/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@neve-wp/components",
3-
"version": "0.0.51",
3+
"version": "0.0.54",
44
"description": "Neve React Components",
55
"author": "themeisle <[email protected]>",
66
"license": "GPL-2.0-or-later",

assets/apps/components/src/Common/DropdownFix.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ function useObservableState(initialState, onStateChange) {
2828
}
2929

3030
/**
31-
* This monitors all events across opened popver components
31+
* This monitors all events across opened popover components
32+
*
33+
* @param {any} ref - The ref of the popover component.
34+
* @param {any} callback - The callback function to execute.
3235
*/
3336
function useOutsideClickHook(ref, callback) {
3437
useEffect(() => {

assets/apps/components/src/Common/icons.js

+58
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
const getIcons = (size) => {
22
return {
3+
'apple-music': (
4+
<svg
5+
width={size}
6+
height={size}
7+
version="1.1"
8+
id="Artwork"
9+
xmlns="http://www.w3.org/2000/svg"
10+
x="0px"
11+
y="0px"
12+
viewBox="0 0 73 73"
13+
style={{ enableBackground: 'new 0 0 73 73' }}
14+
xmlSpace="preserve"
15+
>
16+
<g id="Layer_5"></g>
17+
<g>
18+
<g>
19+
<path
20+
className="st0"
21+
style={{ fillRule: 'evenodd', clipRule: 'evenodd' }}
22+
d="M72,19.94c0-0.72-0.01-1.45-0.03-2.17c-0.04-1.58-0.14-3.17-0.42-4.73c-0.28-1.58-0.75-3.06-1.48-4.5
23+
c-0.72-1.41-1.66-2.71-2.78-3.83c-1.12-1.12-2.42-2.06-3.83-2.78c-1.44-0.73-2.91-1.2-4.49-1.48c-1.56-0.28-3.15-0.37-4.73-0.42
24+
C53.51,0.02,52.78,0.01,52.06,0c-0.86,0-1.72,0-2.58,0H22.52c-0.86,0-1.72,0-2.58,0c-0.72,0-1.45,0.01-2.17,0.03
25+
c-1.58,0.04-3.17,0.14-4.73,0.42C11.46,0.74,9.98,1.2,8.55,1.94C7.13,2.66,5.84,3.6,4.72,4.72S2.65,7.13,1.93,8.55
26+
c-0.73,1.44-1.2,2.91-1.48,4.5c-0.28,1.56-0.37,3.15-0.42,4.73C0.02,18.5,0.01,19.22,0,19.94c0,0.86,0,1.72,0,2.58v26.95
27+
c0,0.86,0,1.72,0,2.58c0,0.72,0.01,1.45,0.03,2.17c0.04,1.58,0.14,3.17,0.42,4.73c0.28,1.58,0.75,3.06,1.48,4.5
28+
c0.72,1.41,1.66,2.71,2.78,3.83s2.42,2.06,3.83,2.78c1.44,0.73,2.91,1.2,4.49,1.48c1.56,0.28,3.15,0.37,4.73,0.42
29+
c0.72,0.02,1.45,0.03,2.17,0.03c0.86,0.01,1.72,0,2.58,0h26.95c0.86,0,1.72,0,2.58,0c0.72,0,1.45-0.01,2.17-0.03
30+
c1.58-0.04,3.17-0.14,4.73-0.42c1.58-0.28,3.06-0.75,4.49-1.48c1.41-0.72,2.71-1.66,3.83-2.78c1.12-1.12,2.06-2.41,2.78-3.83
31+
c0.73-1.44,1.2-2.91,1.48-4.5c0.28-1.56,0.37-3.15,0.42-4.73c0.02-0.72,0.03-1.45,0.03-2.17c0.01-0.86,0-1.72,0-2.58V22.52
32+
C72,21.66,72,20.8,72,19.94z M52.71,46.85c0,0.91-0.01,1.74-0.2,2.65c-0.19,0.89-0.53,1.72-1.05,2.47
33+
c-0.52,0.75-1.19,1.36-1.97,1.82c-0.79,0.47-1.62,0.73-2.5,0.91c-1.66,0.33-2.79,0.41-3.86,0.2c-1.03-0.21-1.9-0.68-2.6-1.32
34+
c-1.03-0.95-1.68-2.23-1.82-3.56c-0.16-1.57,0.36-3.24,1.53-4.48c0.59-0.62,1.34-1.11,2.34-1.5c1.04-0.4,2.19-0.65,3.96-1
35+
c0.47-0.09,0.93-0.19,1.4-0.28c0.61-0.12,1.14-0.28,1.56-0.8c0.43-0.52,0.43-1.16,0.43-1.78V24.32c0-1.21-0.54-1.54-1.7-1.32
36+
c-0.83,0.16-18.62,3.75-18.62,3.75c-1,0.24-1.36,0.57-1.36,1.82v23.23c0,0.91-0.05,1.74-0.24,2.65c-0.19,0.89-0.53,1.72-1.05,2.47
37+
c-0.52,0.75-1.19,1.36-1.97,1.82c-0.79,0.47-1.62,0.74-2.5,0.92c-1.66,0.33-2.79,0.41-3.86,0.2c-1.03-0.21-1.9-0.69-2.6-1.33
38+
c-1.03-0.95-1.63-2.23-1.78-3.56c-0.16-1.57,0.31-3.24,1.49-4.48c0.59-0.62,1.34-1.11,2.34-1.5c1.04-0.4,2.19-0.65,3.96-1
39+
c0.47-0.09,0.93-0.19,1.4-0.28c0.61-0.12,1.14-0.28,1.56-0.8c0.42-0.52,0.47-1.13,0.47-1.75c0-4.92,0-26.78,0-26.78
40+
c0-0.36,0.03-0.6,0.05-0.72c0.09-0.56,0.31-1.05,0.72-1.39c0.34-0.28,0.78-0.48,1.33-0.6l0.01,0L49,11.33
41+
c0.19-0.04,1.73-0.31,1.91-0.33c1.16-0.1,1.81,0.66,1.81,1.89L52.71,46.85L52.71,46.85z"
42+
/>
43+
</g>
44+
</g>
45+
</svg>
46+
),
347
'behance-square': (
448
<svg
549
width={size}
@@ -615,6 +659,20 @@ const getIcons = (size) => {
615659
<path d="M1684 408q-67 98-162 167 1 14 1 42 0 130-38 259.5t-115.5 248.5-184.5 210.5-258 146-323 54.5q-271 0-496-145 35 4 78 4 225 0 401-138-105-2-188-64.5t-114-159.5q33 5 61 5 43 0 85-11-112-23-185.5-111.5t-73.5-205.5v-4q68 38 146 41-66-44-105-115t-39-154q0-88 44-163 121 149 294.5 238.5t371.5 99.5q-8-38-8-74 0-134 94.5-228.5t228.5-94.5q140 0 236 102 109-21 205-78-37 115-142 178 93-10 186-50z" />
616660
</svg>
617661
),
662+
'twitter-x': (
663+
<svg
664+
width={size}
665+
height={size}
666+
viewBox="0 0 1200 1227"
667+
fill="none"
668+
xmlns="http://www.w3.org/2000/svg"
669+
>
670+
<path
671+
d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"
672+
fill="inherit"
673+
/>
674+
</svg>
675+
),
618676
'vimeo-square': (
619677
<svg
620678
width={size}

assets/apps/components/src/Common/svg.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -608,9 +608,9 @@ const SVG = {
608608
viewBox="3 3 18 18"
609609
>
610610
<path
611-
fill-rule="evenodd"
611+
fillRule="evenodd"
612612
d="M5 11a6 6 0 1 1 12 0a6 6 0 0 1-12 0zm6-8a8 8 0 1 0 4.906 14.32l3.387 3.387a1 1 0 0 0 1.414-1.414l-3.387-3.387A8 8 0 0 0 11 3zm0 12a4 4 0 1 0 0-8a4 4 0 0 0 0 8z"
613-
clip-rule="evenodd"
613+
clipRule="evenodd"
614614
/>
615615
</svg>
616616
),

assets/apps/customizer-controls/src/@types/utils.d.ts

+47
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,52 @@ type BuilderActions = {
104104
updateSidebarItems: () => void;
105105
};
106106

107+
type TrackingData = {
108+
block?: string;
109+
env?: string;
110+
action?: string;
111+
feature?: string;
112+
groupID?: string;
113+
featureComponent?: string;
114+
featureValue?: string | number | Record<string, unknown>;
115+
hasOpenAIKey?: boolean;
116+
usedTheme?: string;
117+
};
118+
119+
type EventResponse = {
120+
error?: string;
121+
success?: boolean;
122+
response?: any;
123+
};
124+
125+
type EventOptions = {
126+
directSave?: boolean;
127+
consent?: boolean;
128+
refreshTimer?: boolean;
129+
sendNow?: boolean;
130+
ignoreLimit?: boolean;
131+
};
132+
133+
type EventTrackingAccumulatorWithPlugin = {
134+
add: (data: TrackingData, options?: EventOptions) => string;
135+
set: (key: string, data: TrackingData, options?: EventOptions) => void;
136+
base: EventTrackingAccumulator;
137+
};
138+
139+
interface EventTrackingAccumulator {
140+
subscribe(callback: (response: EventResponse) => void): () => void;
141+
hasConsent(): boolean;
142+
sendBulkTracking(payload: Array<TrackingData>): Promise<Response>;
143+
trkMetadata(data: TrackingData): TrackingData;
144+
with(pluginSlug: string): EventTrackingAccumulatorWithPlugin;
145+
uploadEvents(): Promise<void>;
146+
sendIfLimitReached(): Promise<void> | undefined;
147+
start(): void;
148+
stop(): void;
149+
refreshTimer(): void;
150+
clone(): EventTrackingAccumulator;
151+
}
152+
107153
declare global {
108154
interface Window {
109155
wp: StringObjectKeys;
@@ -129,6 +175,7 @@ declare global {
129175
};
130176
};
131177
NeveProReactCustomize: undefined | StringObjectKeys;
178+
tiTrk?: EventTrackingAccumulator;
132179
}
133180
}
134181

assets/apps/customizer-controls/src/builder/components/BuilderItem.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ const BuilderItem: React.FC<Props> = (props) => {
5151
return a.id < b.id ? -1 : 1;
5252
})
5353
);
54+
55+
window.tiTrk?.with('neve').set(`${componentId}_removed`, {
56+
feature: builder + '_builder',
57+
featureComponent: 'component-removed',
58+
featureValue: { row, slot, item: componentId },
59+
});
5460
};
5561

5662
const iconSize = 18;

assets/apps/customizer-controls/src/builder/components/ComponentsPopover.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ const ComponentsPopover: React.FC<Props> = ({
3636
nextItems.push({ id: itemId });
3737
updateLayout(rowId, slotId, nextItems);
3838
setSidebarItems(sidebarItems.filter((i) => i.id !== itemId));
39+
40+
window.tiTrk?.with('neve').set(`${itemId}_added`, {
41+
feature: builder + '_builder',
42+
featureComponent: 'component-added',
43+
featureValue: { row: rowId, slot: slotId, item: itemId },
44+
});
3945
closePopup();
4046
};
4147

assets/apps/customizer-controls/src/builder/scss/_rows.scss

+24-2
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,25 @@
8181
}
8282

8383
.row.sidebar .row-inner {
84-
width: 200px;
84+
width: 210px;
8585

8686
.droppable-wrap {
8787
height: 100%;
88+
89+
max-height: 170px;
90+
overflow-x: hidden;
91+
overflow-y: auto;
92+
93+
&::-webkit-scrollbar {
94+
width: 10px;
95+
}
96+
97+
&::-webkit-scrollbar-track {
98+
background: #D9D9D9;
99+
}
100+
&::-webkit-scrollbar-thumb {
101+
background: #888;
102+
}
88103
}
89104

90105
.droppable {
@@ -189,6 +204,13 @@
189204
&:hover, &.has-popover {
190205
.open-popover {
191206
opacity: .25;
192-
}
207+
}
193208
}
194209
}
210+
211+
/**
212+
* Fix for the popover not being visible when it is inside a container with overflow.
213+
*/
214+
.rows-wrapper .vertical-rows .droppable-wrap.has-popover > .components-popover {
215+
position: fixed !important;
216+
}

assets/apps/customizer-controls/src/repeater/RepeaterItemContent.js

+10
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
SelectControl,
44
TextControl,
55
ToggleControl,
6+
TextareaControl,
67
} from '@wordpress/components';
78
import IconSelector from './IconSelector';
89
import { getIcons, ColorControl } from '@neve-wp/components';
@@ -74,6 +75,15 @@ const RepeaterItemContent = ({
7475
key={key + index}
7576
/>
7677
);
78+
case 'textarea':
79+
return (
80+
<TextareaControl
81+
label={currentField.label}
82+
value={value[index][key] || currentField.default}
83+
onChange={(newData) => changeContent(key, newData)}
84+
key={key + index}
85+
/>
86+
);
7787
case 'icon':
7888
return (
7989
<IconSelector

assets/apps/dashboard/src/Components/Options/InputForm.js

+7
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ const InputForm = ({
4242
value={value}
4343
onChange={(e) => {
4444
setValue(e.target.value);
45+
if (slug === 'typekit_id') {
46+
window.tiTrk?.with('neve').add({
47+
feature: 'typekit-fonts',
48+
featureComponent: 'typekit-id',
49+
featureValue: 'enabled',
50+
});
51+
}
4552
}}
4653
/>
4754
<div className="actions">

assets/apps/dashboard/src/Components/Options/MultiSelect.js

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ const MultiSelectOption = ({
1919
choices={choices}
2020
currentValue={getOption(slug) || ['category']}
2121
onChange={(value) => {
22+
window.tiTrk?.with('neve').set(slug, {
23+
feature: 'module-settings',
24+
featureComponent: slug,
25+
featureValue: value,
26+
});
2227
changeSetting(slug, value).then((r) => {
2328
if (r.success) {
2429
changeOption(slug, value);

assets/apps/dashboard/src/Components/Options/Select.js

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ const Select = ({
1818
label={label}
1919
value={getOption(slug) || 'css'}
2020
onChange={(value) => {
21+
window.tiTrk?.with('neve').set(slug, {
22+
feature: 'module-settings',
23+
featureComponent: slug,
24+
featureValue: value,
25+
});
2126
changeSetting(slug, value).then((r) => {
2227
if (r.success) {
2328
changeOption(slug, value);

0 commit comments

Comments
 (0)