Skip to content

Commit

Permalink
release(major): new version
Browse files Browse the repository at this point in the history
**New Features**
- [PRO] Added conditional logic categories for text and numeric fields with new operators: contains, does not contain, matches regex, between, multiple of a number, and odd or even.
- [PRO] Added an option to attach fields to products by their tags.
- [PRO] Added the ability to use the selector keyword in custom CSS for better scoping.
- Combined the PPOM Texter and font picker previews, allowing users to preview custom fonts directly within the Texter for a more integrated experience.
- Added Price Multiplier support for the measurement input, allowing users to adjust pricing based on different units of measurement (e.g., converting cm to m), with a default multiplier value of 1 for accurate price calculation.
- Added tooltips support for fields for all users.

**Improvements**
- Unified the product metabox UI/flow for both Free and Pro versions with improved layout and group management.
- Enhanced the field-adding experience by decluttering the layout and categorizing fields with a search function.
- Unified the process for attaching products or categories.
- Reviewed Admin UI for colors and contrasts.
- A warning for unsaved changes was added in the field editor.
- Added the Requires Plugins header tag.
- Removed Sweetalert2 dependency and replaced it with a simpler internal implementation.
- Internalized some JS dependencies.
- Removed legacy switcher settings as they are no longer relevant.
- Updated settings descriptions to improve clarity and helpfulness.
- Moved the Texter post type under Settings as Manage Personalization Preview and renamed the Texter field to Personalization Preview.
- Added a visual cue by graying out the conditions when Enable Conditions is unchecked to prevent confusion when adding conditions.
- Revamped the PPOM settings page, aligning it with WooCommerce's default core style and simplifying the layout.
- Reviewed and updated helpful tips on Texter image setup.

**Fixes**
- Fixed issues with the file input in PPOM, where spaces in extensions caused errors, improved file deletion handling, and resolved a blurry delete button icon for zip files.
- Fixed the Download File button in the orders dashboard to trigger file downloads instead of opening them.
- Fixed padding on the Enquire Form to prevent it from being hidden under the header and enabled closing the form by clicking outside the modal.
- Fixed padding on the PPOM popup.
- Fixed text alignment buttons on the frontend for Texter images.
- Fixed an issue where import was not working on a multisite.
- Fixed compatibility for PPOM file input with SVG, WEBP, or EPS extensions.
- Fixed an issue in the conditions tab where the last condition couldn't be deleted; a dedicated button now allows deletion.
- Fixed orphan section screens for fields like Emoji, Phone Input, and Divider by ensuring settings load correctly or hiding unsupported condition tabs.
- Fixed the layout issue on the Orders page by reducing the size of images selected via PPOM to prevent breaking the table layout. A lightbox feature was added for larger image previews.
- Fixed the consistency in behavior when using the Attach to Product option.
- Fixed an issue where default demo fields were not displayed on the frontend after first activating PPOM.
- Fixed an issue where importing a CSV file with leading new lines caused an error.
- Fixed the Texter texts placement on large images.
- Fixed the PPOM column, which was replacing the Product Tags column.
- Fixed the maximum image selection limit not being enforced, allowing users to add more images than configured.
- Fixed validation for conditional fields using non-English characters.
- Fixed an issue in the Variation Quantity Matrix where leaving a label blank resulted in an empty row or column.

**Miscellaneous**
- Fixed the changelog page.
- Fixed conditional repeater description not showing for new fields.
- Fixed Syntax Highlighter issues for certain field groups.
- Disabled the mouse pointer from the group options.
- Implemented a solution to retain the original file name of uploaded files in the cart.
- Allowed images and media files to be exported along with product fields.
  • Loading branch information
selul authored Sep 27, 2024
2 parents 5c14b9e + e874a50 commit 7ed4607
Show file tree
Hide file tree
Showing 75 changed files with 4,763 additions and 7,259 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/create-build-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and publish the ZIP build file

on:
pull_request:
types: [ opened, synchronize, ready_for_review ]
types: [opened, synchronize, ready_for_review]
branches-ignore:
- "update_dependencies"
concurrency:
Expand All @@ -18,7 +18,7 @@ jobs:
git-sha-8: ${{ steps.retrieve-git-sha-8.outputs.sha8 }}
steps:
- name: Check out source files
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Get Composer Cache Directory
id: composer-cache
run: |
Expand All @@ -36,6 +36,12 @@ jobs:
run: yarn install --frozen-lockfile
- name: Build files
run: yarn run build
- name: Bump the plugin version
run: |
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
COMMIT_HASH=$(git rev-parse --short HEAD)
DEV_VERSION="${CURRENT_VERSION}-dev.${COMMIT_HASH}"
npm run grunt version::${DEV_VERSION}
- name: Create zip
run: yarn run dist
- name: Retrieve branch name
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
phpunit:
name: Phpunit
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:5.7
Expand Down
2 changes: 1 addition & 1 deletion assets/ppom-basic-meta.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"productmeta_style":"","productmeta_categories":"","send_file_attachment":"","show_cart_thumb":"","aviary_api_key":"","productmeta_validation":"","productmeta_id":"183","productmeta_created":"2019-03-12 14:22:27","productmeta_name":"Basic Fields","dynamic_price_display":"all_option","the_meta":"{"1":{"type":"text","title":"Any text input","data_name":"any_text_input","placeholder":"","description":"It\\\\\\\\'s a test field","error_message":"","maxlength":"","minlength":"","default_value":"","class":"","input_mask":"","width":"12","visibility":"everyone","visibility_role":"","conditions":{"visibility":"Show","bound":"All","rules":[{"elements":"any_text_input","operators":"is","element_values":""}]}},"2":{"type":"select","title":"Test Options","data_name":"test_options","description":"","error_message":"","options":[{"option":"Option A","price":"5","weight":"","id":"option_a"},{"option":"Option B","price":"6","weight":"","id":"option_b"},{"option":"Option C","price":"7","weight":"","id":"option_c"}],"selected":"","first_option":"","class":"","width":"12","visibility":"everyone","visibility_role":"","conditions":{"visibility":"Show","bound":"All","rules":[{"elements":"any_text_input","operators":"is","element_values":""}]}},"3":{"type":"checkbox","title":"Conditional Field","data_name":"conditional_field","description":"Shown when Option B is selected","error_message":"","options":[{"option":"Test Checkbox","price":"","weight":"","id":"test_checkbox"}],"class":"","width":"12","checked":"","min_checked":"","max_checked":"","visibility":"everyone","visibility_role":"","logic":"on","conditions":{"visibility":"Show","bound":"All","rules":[{"elements":"test_options","operators":"is","element_values":"Option B"}]}}}"}]
[{"productmeta_style":"","productmeta_categories":"","send_file_attachment":"","show_cart_thumb":"","aviary_api_key":"","productmeta_validation":"","productmeta_id":"183","productmeta_created":"2019-03-12 14:22:27","productmeta_name":"Basic Fields","dynamic_price_display":"all_option","the_meta":"{"1":{"type":"text","title":"Any text input","data_name":"any_text_input","placeholder":"","description":"It\\\\\\\\'s a test field","error_message":"","maxlength":"","minlength":"","default_value":"","class":"","input_mask":"","width":"12","visibility":"everyone","visibility_role":"","conditions":{"visibility":"Show","bound":"All","rules":[{"elements":"any_text_input","operators":"is","element_values":""}]},"ppom_id":"1"},"2":{"type":"select","title":"Test Options","data_name":"test_options","description":"","error_message":"","options":[{"option":"Option A","price":"5","weight":"","id":"option_a"},{"option":"Option B","price":"6","weight":"","id":"option_b"},{"option":"Option C","price":"7","weight":"","id":"option_c"}],"selected":"","first_option":"","class":"","width":"12","visibility":"everyone","visibility_role":"","conditions":{"visibility":"Show","bound":"All","rules":[{"elements":"any_text_input","operators":"is","element_values":""}]},"ppom_id":"1"},"3":{"type":"checkbox","title":"Conditional Field","data_name":"conditional_field","description":"Shown when Option B is selected","error_message":"","options":[{"option":"Test Checkbox","price":"","weight":"","id":"test_checkbox"}],"class":"","width":"12","checked":"","min_checked":"","max_checked":"","visibility":"everyone","visibility_role":"","logic":"on","conditions":{"visibility":"Show","bound":"All","rules":[{"elements":"test_options","operators":"is","element_values":"Option B"}]},"ppom_id":"1"}}"}]
76 changes: 35 additions & 41 deletions backend/assets/settings.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*---------------------------------
* Admin Settings Panel CSS
* It included following css
-> Inputs CSS
-> Tooltip CSS
Expand Down Expand Up @@ -45,16 +45,6 @@
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.nmsf-wrapper input[type="submit"] {
background: #f95700 !important;
border-color: #f95700 !important;
border-radius: 0 !important;
}

.nmsf-migrate-back-btn {
border-radius: 0 !important;
}

.nmsf-wrapper textarea {
min-height: 105px;
max-height: 105px;
Expand Down Expand Up @@ -289,15 +279,6 @@

/*Admin Settings Panel*/

.nmsf-wrapper {
position: relative;
border: 1px solid #f957002b;
margin-right: 15px;
margin-top: 22px;
background-color: #eaeaea;
padding: 10px;
box-shadow: 0 1px 3px rgb(0 0 0 / 12%), 0 1px 2px rgb(0 0 0 / 24%);
}

.nmsf-wrapper .nmsf-tabs-content div {
padding: 15px 20px 15px 40px;
Expand Down Expand Up @@ -355,6 +336,7 @@ div.nmsf-panels-area {
margin: 0;
padding: 0;
transition: 0.5s all cubic-bezier(0.075, 0.82, 0.165, 1);
margin-left: 30px;
}

div.nmsf-panels-area .nmsf-panels-content {
Expand Down Expand Up @@ -410,29 +392,28 @@ div.nmsf-panels-area .nmsf-panels-content p {
padding: 8px 10px;
margin-right: 2px;
cursor: pointer;
background: #3985b7;
font-weight: bold;
transition: background ease 0.2s;
color: #fff;
border: 1px solid #c3c4c7;
background: #dcdcde;
}

.nmsf-panels-content-inner .nmsf-panel-settings-area {
order: 99;
flex-grow: 1;
width: 100%;
display: none;
padding: 1rem;
background: #fff;
}

.nmsf-panels-content-inner input[type=radio] {
display: none;
}

.nmsf-panels-content-inner input[type=radio]:checked+label {
background: #fff;
border-top: 2px solid #f95700;
color: #030303;

border-bottom: 1px solid #f0f0f1;
background: #f0f0f1;
color: #000;
}

.nmsf-panels-content-inner input[type=radio]:checked+label+.nmsf-panel-settings-area {
Expand All @@ -453,15 +434,10 @@ div.nmsf-panels-area .nmsf-panels-content p {
background-color: transparent;
}

.nmsf-panel-table tr {
border-top: 1px solid #f9570094;
border-bottom: 1px solid #f9570094;
}

.nmsf-panel-table td,
.nmsf-panel-table th {
padding: .75rem;
vertical-align: top;
vertical-align: middle;
padding-left: 0px;
}

.nmsf-panel-table th {
Expand Down Expand Up @@ -605,13 +581,9 @@ div.nmsf-panels-area .nmsf-panels-content p {
}

.nmsf-section-type h3 {
background-color: #F6F6F6;
margin: 0;
font-weight: 600;
font-family: 'Titillium Web', sans-serif;
font-size: 18px;
padding: 10px;
color: #0473AA;
color: #1d2327;
font-size: 1.3em;
margin: 1em 0;
}

.nmsf-hint-area {
Expand Down Expand Up @@ -653,3 +625,25 @@ div.nmsf-panels-area .nmsf-panels-content p {
color: #fff;
background-color: #343a40;
}
.ppom-is-locked-section{
opacity: 0.7;
}
.ppom-is-locked-field .ppom-notice-upsell{
font-style: italic;
font-weight: 500;
}
.ppom-is-locked-panel .ppom-notice-upsell, .ppom-is-locked-field .ppom-notice-upsell {
background: #fff;
border: 1px solid #c3c4c7;
border-left-width: 4px;
box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
border-left-color: #72aee6;
padding: 12px;
margin-top: 15px;
}
.ppom-is-locked-panel .nmsf-panel-desc, .ppom-is-locked-panel .nmsf-panel-table, .ppom-is-locked-field > * > *:not(.ppom-notice-upsell){ opacity: 0.6; cursor: not-allowed; pointer-events: none; }
.ppom-is-locked-panel input,
.ppom-is-locked-field input,
.ppom-is-locked-field select,
.ppom-is-locked-panel select{ cursor: not-allowed;
pointer-events: none; }
28 changes: 11 additions & 17 deletions backend/assets/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,6 @@ jQuery(function($) {
}
});


/**
Migration Event
**/
$(document).on("click", ".nmsf-migrate-back-btn", function(e) {

if (!confirm(nmsf_vars.migrate_back_msg)) {

e.preventDefault();
return false;
}
else {
return true;
}
});


/**
Add Conditional Settings Fields
**/
Expand Down Expand Up @@ -138,6 +121,17 @@ jQuery(function($) {
**/
$('.nmsf-multiselect-js').select2();

/**
* Disabled submit button.
*/
$(document).on('click', '.nmsf-panels-content-inner .nmsf-label', function(){
var isLocked = $(this).hasClass('ppom-is-locked-section');
$(this)
.parents('.nmsf-panels-area')
.find('.woocommerce-save-button')
.attr('disabled', isLocked);
});

const permissionField = $('#ppom_permission_mfields');

$(document).ready(function(){
Expand Down
7 changes: 5 additions & 2 deletions backend/changelog_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private function parse_changelog( $changelog_path ) {
if ( strpos( $changelog_line, '**Changes:**' ) !== false || empty( $changelog_line ) ) {
continue;
}
if ( substr( ltrim( $changelog_line ), 0, 3 ) === '###' ) {
if ( substr( ltrim( $changelog_line ), 0, 4 ) === '####' ) {
$release_count ++;

preg_match( '/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/', $changelog_line, $found_v );
Expand All @@ -63,7 +63,10 @@ private function parse_changelog( $changelog_path ) {
);
continue;
}
if ( preg_match( '/[*|-]?\s?(\[fix]|\[Fix]|fix|Fix)[:]?\s?(\b|(?=\[))/', $changelog_line ) ) {
if ( substr( ltrim( $changelog_line ), 0, 3 ) === '###' ) {
continue;
}
if ( preg_match( '/[*|-]?\s?(\[fix]|\[Fix]|fix|Fix|Fixed)[:]?\s?(\b|(?=\[))/', $changelog_line ) ) {
$changelog_line = preg_replace( '/[*|-]?\s?(\[fix]|\[Fix]|fix|Fix)[:]?\s?(\b|(?=\[))/', '', $changelog_line );
$releases[ $release_count ]['fixes'][] = $this->parse_md_and_clean( $changelog_line );
continue;
Expand Down
Loading

0 comments on commit 7ed4607

Please sign in to comment.