Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔥 INCLUDES TONS OF NEW FEATURES V1.2.8 #203

Merged
merged 45 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1753dc3
Merge pull request #182 from addonify/stable
h1dd3nsn1p3r Jul 19, 2023
734ac83
🌈 NEW: ANIMATION, OPTIONS, COLORS.
h1dd3nsn1p3r Jul 20, 2023
a2ecf27
Merge pull request #183 from addonify/sniper
h1dd3nsn1p3r Jul 20, 2023
6e54430
🌈 REFACTOR: PUBLIC FACING JAVASCRIPT.
h1dd3nsn1p3r Jul 21, 2023
b613cf0
Added: modalContentLoaded API.
h1dd3nsn1p3r Jul 21, 2023
78dc0eb
Updated: Readme.txt.
h1dd3nsn1p3r Jul 21, 2023
bf7fc4c
Added: Close events (Esc, Outside)
h1dd3nsn1p3r Jul 21, 2023
7321b47
Merge pull request #184 from addonify/sniper
h1dd3nsn1p3r Jul 21, 2023
6a7e81c
🔥 NEW: FEATURES
h1dd3nsn1p3r Jul 21, 2023
d8d2d86
🎆 NEW: Z-INDEX, SPINNER ICONS, MORE.
h1dd3nsn1p3r Jul 21, 2023
1741eff
Merge pull request #185 from addonify/sniper
h1dd3nsn1p3r Jul 21, 2023
1a9ffb7
UPDATED: README.
h1dd3nsn1p3r Jul 21, 2023
2a718a1
Merge pull request #186 from addonify/sniper
h1dd3nsn1p3r Jul 21, 2023
2032409
HOUSEKEEPING
h1dd3nsn1p3r Jul 21, 2023
5eeb725
Merge pull request #187 from addonify/sniper
h1dd3nsn1p3r Jul 21, 2023
563ec2c
🦄 Better WC var product.
h1dd3nsn1p3r Jul 24, 2023
6d01eb3
Merge pull request #188 from addonify/sniper
h1dd3nsn1p3r Jul 24, 2023
bbcb1ed
☕ NEW: Option to define content row layout inside modal.
h1dd3nsn1p3r Jul 24, 2023
a49d23d
Merge pull request #189 from addonify/sniper
h1dd3nsn1p3r Jul 24, 2023
daa3ac3
🌈 Added: Option to control content column gap.
h1dd3nsn1p3r Jul 24, 2023
c545e41
Merge pull request #190 from addonify/sniper
h1dd3nsn1p3r Jul 24, 2023
ffdbb43
WC: Better grouped products.
h1dd3nsn1p3r Jul 25, 2023
d21256c
Merge pull request #191 from addonify/sniper
h1dd3nsn1p3r Jul 25, 2023
3078cfb
Fix: dependent.
h1dd3nsn1p3r Jul 25, 2023
a1cdf43
Merge pull request #192 from addonify/sniper
h1dd3nsn1p3r Jul 25, 2023
36b8cd3
🦄 ADDED: OPTION, ICON IN QV BUTTON.
h1dd3nsn1p3r Jul 26, 2023
b1e6956
Merge pull request #193 from addonify/sniper
h1dd3nsn1p3r Jul 26, 2023
9bd3e64
📦 FIX: BUTTONS INSIDE MODAL.
h1dd3nsn1p3r Aug 1, 2023
269bc9f
Merge pull request #194 from addonify/sniper
h1dd3nsn1p3r Aug 1, 2023
dea37fc
🔥 NEW: FEATURES 11+.
h1dd3nsn1p3r Aug 1, 2023
fa69431
Merge pull request #195 from addonify/sniper
h1dd3nsn1p3r Aug 1, 2023
95ac598
📦 NEW: FEATURES 8+.
h1dd3nsn1p3r Aug 1, 2023
25ff23a
Merge pull request #196 from addonify/sniper
h1dd3nsn1p3r Aug 1, 2023
6d30f7a
🐛FIX: OPTIONS!
h1dd3nsn1p3r Aug 2, 2023
955647f
Merge pull request #197 from addonify/sniper
h1dd3nsn1p3r Aug 2, 2023
de6310b
📦 NEW: BUTTON FEATURES 9+.
h1dd3nsn1p3r Aug 2, 2023
55057a3
Merge pull request #198 from addonify/sniper
h1dd3nsn1p3r Aug 2, 2023
ed26ecb
📝 UPDATED: README.
h1dd3nsn1p3r Aug 2, 2023
e797110
Merge pull request #199 from addonify/sniper
h1dd3nsn1p3r Aug 2, 2023
3a2fe38
📢 TWEAK: NOTICE IS NOW NON-DISMISSABLE.
h1dd3nsn1p3r Aug 3, 2023
e943af9
Merge pull request #200 from addonify/sniper
h1dd3nsn1p3r Aug 3, 2023
425d955
Fix dynamic value of gallery trigger border radius
Asok17 Aug 4, 2023
808d00d
Merge pull request #201 from addonify/ashok
Asok17 Aug 4, 2023
0fd0462
🗓️ UPDATED: RELEASE DATE.
h1dd3nsn1p3r Aug 4, 2023
a9f4f89
Merge pull request #202 from addonify/sniper
h1dd3nsn1p3r Aug 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
☕ NEW: Option to define content row layout inside modal.
- ☕ NEW: Option to define content row layout inside modal.
  • Loading branch information
h1dd3nsn1p3r committed Jul 24, 2023
commit bbcb1ed29ad7e04488f992d17ca40ef3adbbce4c
2 changes: 1 addition & 1 deletion admin/assets/js/main.js

Large diffs are not rendered by default.

118 changes: 118 additions & 0 deletions admin/src/components/icons/ModalRows.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<script setup>
/**
* Define props.
*
* @since 1.1.8
*/
const props = defineProps({
layout: {
type: String,
required: true,
},
});
</script>
<template>
<template v-if="props.layout === 'default'">
<svg
xmlns="http://www.w3.org/2000/svg"
class="check"
viewBox="0 0 24 24"
>
<path
d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11.0026 16L18.0737 8.92893L16.6595 7.51472L11.0026 13.1716L8.17421 10.3431L6.75999 11.7574L11.0026 16Z"
></path>
</svg>
<svg
width="160"
height="110"
viewBox="0 0 160 110"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="160" height="110" rx="10" fill="#EAEAEA" />
<rect x="13" y="15" width="55" height="45" rx="4" fill="#DBDBDB" />
<rect x="13" y="68" width="15" height="15" rx="2" fill="#DBDBDB" />
<rect x="33" y="68" width="15" height="15" rx="2" fill="#DBDBDB" />
<rect x="53" y="68" width="15" height="15" rx="2" fill="#DBDBDB" />
<rect x="83" y="19" width="40" height="5" rx="2" fill="#D9D9D9" />
<rect x="129" y="19" width="20" height="5" rx="2" fill="#D9D9D9" />
<path
d="M88.6601 41.2898L85.57 43.1772L86.4102 39.6551L83.6602 37.2994L87.2696 37.01L88.6601 33.6667L90.0507 37.01L93.6602 37.2994L90.9102 39.6551L91.7503 43.1772L88.6601 41.2898Z"
fill="#C2C2C2"
/>
<path
d="M97.6601 41.2898L94.57 43.1772L95.4102 39.6551L92.6602 37.2994L96.2696 37.01L97.6601 33.6667L99.0507 37.01L102.66 37.2994L99.9102 39.6551L100.75 43.1772L97.6601 41.2898Z"
fill="#C2C2C2"
/>
<path
d="M106.66 41.2898L103.57 43.1772L104.41 39.6551L101.66 37.2994L105.27 37.01L106.66 33.6667L108.051 37.01L111.66 37.2994L108.91 39.6551L109.75 43.1772L106.66 41.2898Z"
fill="#C2C2C2"
/>
<path
d="M115.66 41.2898L112.57 43.1772L113.41 39.6551L110.66 37.2994L114.27 37.01L115.66 33.6667L117.051 37.01L120.66 37.2994L117.91 39.6551L118.75 43.1772L115.66 41.2898Z"
fill="#C2C2C2"
/>
<path
d="M124.66 41.2898L121.57 43.1772L122.41 39.6551L119.66 37.2994L123.27 37.01L124.66 33.6667L126.051 37.01L129.66 37.2994L126.91 39.6551L127.75 43.1772L124.66 41.2898Z"
fill="#C2C2C2"
/>
<rect x="83" y="54" width="25" height="5" rx="2" fill="#D9D9D9" />
<rect x="113" y="54" width="26" height="5" rx="2" fill="#D9D9D9" />
<rect x="83" y="66" width="10" height="5" rx="2" fill="#D9D9D9" />
<rect x="99" y="66" width="24" height="5" rx="2" fill="#D9D9D9" />
<rect x="83" y="84" width="40" height="10" rx="5" fill="#C8C8C8" />
</svg>
</template>
<template v-if="props.layout === 'row-reversed'">
<svg
xmlns="http://www.w3.org/2000/svg"
class="check"
viewBox="0 0 24 24"
>
<path
d="M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11.0026 16L18.0737 8.92893L16.6595 7.51472L11.0026 13.1716L8.17421 10.3431L6.75999 11.7574L11.0026 16Z"
></path>
</svg>

<svg
width="160"
height="110"
viewBox="0 0 160 110"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<rect width="160" height="110" rx="10" fill="#EAEAEA" />
<rect x="93" y="15" width="55" height="45" rx="4" fill="#DBDBDB" />
<rect x="93" y="68" width="15" height="15" rx="2" fill="#DBDBDB" />
<rect x="113" y="68" width="15" height="15" rx="2" fill="#DBDBDB" />
<rect x="133" y="68" width="15" height="15" rx="2" fill="#DBDBDB" />
<rect x="13" y="19" width="40" height="5" rx="2" fill="#D9D9D9" />
<rect x="59" y="19" width="20" height="5" rx="2" fill="#D9D9D9" />
<path
d="M18.6601 41.2898L15.57 43.1772L16.4102 39.6551L13.6602 37.2994L17.2696 37.01L18.6601 33.6667L20.0507 37.01L23.6602 37.2994L20.9102 39.6551L21.7503 43.1772L18.6601 41.2898Z"
fill="#C2C2C2"
/>
<path
d="M27.6601 41.2898L24.57 43.1772L25.4102 39.6551L22.6602 37.2994L26.2696 37.01L27.6601 33.6667L29.0507 37.01L32.6602 37.2994L29.9102 39.6551L30.7503 43.1772L27.6601 41.2898Z"
fill="#C2C2C2"
/>
<path
d="M36.6601 41.2898L33.57 43.1772L34.4102 39.6551L31.6602 37.2994L35.2696 37.01L36.6601 33.6667L38.0507 37.01L41.6602 37.2994L38.9102 39.6551L39.7503 43.1772L36.6601 41.2898Z"
fill="#C2C2C2"
/>
<path
d="M45.6601 41.2898L42.57 43.1772L43.4102 39.6551L40.6602 37.2994L44.2696 37.01L45.6601 33.6667L47.0507 37.01L50.6602 37.2994L47.9102 39.6551L48.7503 43.1772L45.6601 41.2898Z"
fill="#C2C2C2"
/>
<path
d="M54.6601 41.2898L51.57 43.1772L52.4102 39.6551L49.6602 37.2994L53.2696 37.01L54.6601 33.6667L56.0507 37.01L59.6602 37.2994L56.9102 39.6551L57.7503 43.1772L54.6601 41.2898Z"
fill="#C2C2C2"
/>
<rect x="13" y="54" width="25" height="5" rx="2" fill="#D9D9D9" />
<rect x="43" y="54" width="26" height="5" rx="2" fill="#D9D9D9" />
<rect x="13" y="66" width="10" height="5" rx="2" fill="#D9D9D9" />
<rect x="29" y="66" width="24" height="5" rx="2" fill="#D9D9D9" />
<rect x="13" y="84" width="40" height="10" rx="5" fill="#C8C8C8" />
</svg>
</template>
</template>
104 changes: 98 additions & 6 deletions admin/src/components/inputs/Radio.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
<script setup>
import { computed } from "vue";
import { ElRadio, ElRadioGroup } from "element-plus";
import ModalRows from "../icons/ModalRows.vue";

/**
* Define props.
*
* @since 1.1.8
*/
const props = defineProps({
modelValue: String,
choices: [Object, Array],
modelValue: {
type: String,
required: true,
},
choices: {
type: [Object, Array],
required: true,
},
style: {
type: String,
required: false,
default: "default",
},
});

// Ref: https://vuejs.org/guide/components/events.html#usage-with-v-model
/**
* Define emit.
* Ref: https://vuejs.org/guide/components/events.html#usage-with-v-model
*
* @since 1.1.8
*/
const emit = defineEmits(["update:modelValue"]);
const vModelVal = computed({
get() {
Expand All @@ -18,7 +41,76 @@
});
</script>
<template>
<el-radio-group v-model="vModelVal" v-for="(value, key) in props.choices">
<el-radio :label="key">{{ value }}</el-radio>
</el-radio-group>
<template v-if="props.style === 'images'">
<div class="radio-images">
<el-radio-group v-model="vModelVal">
<el-radio v-for="(value, key) in props.choices" :label="key">
<ModalRows :layout="key" />
</el-radio>
</el-radio-group>
</div>
</template>
<template v-if="props.style === 'default'">
<el-radio-group v-model="vModelVal">
<el-radio v-for="(value, key) in props.choices" :label="key">
{{ value }}
</el-radio>
</el-radio-group>
</template>
</template>
<style lang="scss">
.adfy-options {
// For: images
.radio-images {
.el-radio-group {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 30px;

.el-radio {
display: inline-flex;
gap: 0;
align-items: center;
width: auto;
height: auto;
padding: 15px;
border: 2px solid #dfdfdf;
border-radius: 10px;

&.is-checked {
border-color: var(--addonify_primary_color);

.el-radio__label {
svg.check {
display: inline-flex;
}
}
}

.el-radio__input {
display: none;
}

.el-radio__label {
position: relative;
svg:not(.check) {
display: inline-flex;
width: auto;
max-width: 160px;
height: auto;
}
svg.check {
display: none;
fill: var(--addonify_primary_color);
position: absolute;
right: -8px;
top: -8px;
z-index: 5;
}
}
}
}
}
}
</style>
1 change: 1 addition & 0 deletions admin/src/components/partials/InputControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
v-else-if="props.field.type == 'radio'"
v-model="props.reactiveState[props.fieldKey]"
:choices="props.field.choices"
:style="props.field.style"
/>
<RadioIcon
v-else-if="props.field.type == 'radio-icons'"
Expand Down
13 changes: 12 additions & 1 deletion includes/functions/fields/modal-box.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,18 @@ function addonify_quick_view_modal_box_content_settings_fields() {
'meta' => __( 'Meta', 'addonify-quick-view' ),
'add_to_cart' => __( 'Add to Cart', 'addonify-quick-view' ),
),

),
'modal_content_row_layout' => array(
'label' => __( 'Content row layout inside modal', 'addonify-quick-view' ),
'description' => __( 'Choose how content row should appear inside the modal box.', 'addonify-quick-view' ),
'type' => 'radio',
'style' => 'images',
'className' => 'fullwidth',
'dependent' => array('enable_quick_view'),
'choices' => array(
'default' => __( 'Default', 'addonify-quick-view' ),
'row-reversed' => __( 'Row reversed', 'addonify-quick-view' ),
),
),
'product_thumbnail' => array(
'label' => __( 'Product Thumbnail', 'addonify-quick-view' ),
Expand Down
1 change: 1 addition & 0 deletions includes/functions/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function addonify_quick_view_settings_fields_defaults() {
'quick_view_btn_position' => 'after_add_to_cart_button',
'quick_view_btn_label' => __( 'Quick view', 'addonify-quick-view' ),
'modal_box_content' => serialize( array( 'image', 'title', 'price', 'add_to_cart', 'rating', 'excerpt' ) ), // phpcs:ignore
'modal_content_row_layout' => 'default', // NEW
'product_thumbnail' => 'product_image_only',
'enable_lightbox' => false,
'display_read_more_button' => false,
Expand Down
2 changes: 1 addition & 1 deletion public/assets/build/css/addonify-quick-view-rtl.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/assets/build/css/addonify-quick-view.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/assets/build/css/addonify-quick-view.css.map

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions public/assets/src/scss/components/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,46 @@
}
}
}


/* --------------------------------------------------------------------------
Modal content layout
-------------------------------------------------------------------------- */

#addonify-quick-view-modal-wrapper {

#addonify-quick-view-modal {

[data-content_layout="row-reversed"] {

.woocommerce {

.product {

.images {

order: 2;

.woocommerce-product-gallery__trigger {

right: auto;
left: 20px;
}
}

.summary {

order: 1;
}

// ON SALE
.onsale {

left: auto;
right: 20px;
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion public/assets/src/scss/layout/modal/_default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@
@include flex(column, stretch, stretch, 10px);
margin-top: 30px;
padding-top: 30px;
border-top: 1px solid var(--addonify_qv_modal_inputs_border_color);
border-top: 1px dashed var(--addonify_qv_modal_inputs_border_color);

a {

Expand Down
5 changes: 4 additions & 1 deletion public/templates/addonify-quick-view-content-wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ class="play-opening-animation"
<div id="adfy-qvm-spinner">
<?php echo addonify_quick_view_escape_svg ( addonify_quick_view_get_spinner_icon() ); ?>
</div>
<section id="adfy-quick-view-modal-content" class="adfy-quick-view-modal-content"></section>
<section id="adfy-quick-view-modal-content"
class="adfy-quick-view-modal-content"
data-content_layout="<?php echo esc_attr( addonify_quick_view_get_settings_fields_values( 'modal_content_row_layout' ) ); ?>">
</section>
</div>
</div>
</aside>
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ We are open to discuss on how we can improve our plugin. We would like to welcom

= 1.2.8 - ? July, 2023 =

- Added: Option to define content row layout inside modal.
- Added: Option to hide modal close button.
- Added: Option to close modal when ESC key is pressed.
- Added: Option to close modal when clicked outside. #176
Expand Down