Skip to content

Tweak: Add settings customization to the export process [ED-19808]#31853

Merged
ManorHazaz merged 27 commits intoelementor:mainfrom
ManorHazaz:tweak/ED-19808-settings-cust
Jul 15, 2025
Merged

Tweak: Add settings customization to the export process [ED-19808]#31853
ManorHazaz merged 27 commits intoelementor:mainfrom
ManorHazaz:tweak/ED-19808-settings-cust

Conversation

@ManorHazaz
Copy link
Copy Markdown
Contributor

@ManorHazaz ManorHazaz commented Jul 14, 2025

✨ PR Description

Purpose: Add settings customization dialog to enable granular control of exported settings in the Import/Export module

Main changes:

  • Implemented settings customization UI with toggleable options for theme, global colors/fonts, and experiments
  • Created data model to store and retrieve customization preferences during export process
  • Added compatibility layer to support both old (v2.0) and new (v3.0) manifest formats
  • Upgraded site-settings export runner to selectively include settings based on user choices

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using. We'd love your feedback! 🚀

Comment on lines +9 to +14
const [ dialogOpenItems, setDialogOpenItems ] = useState( () => {
return kitContentData.reduce( ( acc, item ) => {
acc[ item.type ] = false;
return acc;
}, {} );
} );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if only 1 section can be expanded/opened at the moment - let's simplify it
const [ expandedSection, setSection ] = useState(null);

and use some sort of simple map in the code

const KIT_CUSTOMIATION_DIALOG = {
 'site-settings': <KitSettingsCustomizationDialog />
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch
Simplified

</DialogHeader>

<DialogContent dividers sx={ { p: 3 } }>
<Stack spacing={ 0 }>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't 0 the default value ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Comment on lines +1 to +5
{
"content": [],
"settings": {
"template": "default",
"body_background_background": "classic",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this file ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, pushed by mistake

}

$manifest_data['site-settings'] = $kit_tabs;
$manifest_data['site-settings'] = array_fill_keys( self::allowed_settings, true );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does import work correctly with this change ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe not, but I added adaptor so maybe we will need to fix it
I don't want to it in that PR as well :|

max-zu
max-zu previously approved these changes Jul 15, 2025
@ManorHazaz ManorHazaz merged commit 13d9c50 into elementor:main Jul 15, 2025
49 of 50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants