Skip to content

Commit 0b00302

Browse files
authored
Fix/UI ux minor issues 11 (#80)
* Bump version to 3.4.11 in package.json * Bump version to 3.4.10 * Fix: Update input label and add id for YouTube video input; set font-weight to normal for button * Fix: Remove unnecessary blank line in DefaultBuilderComponents.vue * Refactor placeholder image generation in component.ts - Removed the import of getPlaceholderImageDataUrl and defined it locally. - Updated all instances of placeholder image URLs in component data to use the new local function. - Added SVG cover images for various components to enhance visual representation. - Ensured all HTML code snippets utilize the new placeholder image function for consistency. * Fix: Update category button styles for active state
1 parent 3093c72 commit 0b00302

File tree

6 files changed

+324
-405
lines changed

6 files changed

+324
-405
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@myissue/vue-website-page-builder",
3-
"version": "3.4.9",
3+
"version": "3.4.10",
44
"description": "Vue 3 page builder component with drag & drop functionality.",
55
"type": "module",
66
"main": "./dist/vue-website-page-builder.umd.cjs",

src/Components/PageBuilder/EditorMenu/Editables/EditGetElement.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,14 @@ const handleModalIframeSrc = function () {
210210
<div class="pbx-myInputGroup">
211211
<div class="pbx-myPrimaryFormOrganizationHeaderDescriptionSection">
212212
<div class="pbx-myPrimaryFormOrganizationHeader">
213-
<label for="video" class="pbx-myPrimaryInputLabel">Video url:</label>
214-
<input v-model="iframeSrc" type="text" class="pbx-myPrimaryInput" name="video" />
213+
<label for="youtube-video" class="pbx-myPrimaryInputLabel">Video url:</label>
214+
<input
215+
id="youtube-video"
216+
v-model="iframeSrc"
217+
type="text"
218+
class="pbx-myPrimaryInput"
219+
name="video"
220+
/>
215221
<div
216222
v-if="urlError"
217223
class="pbx-min-h-[2.5rem] pbx-flex pbx-items-center pbx-justify-start"

src/css/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,7 @@
476476
border-radius: 0.5rem;
477477
cursor: pointer;
478478
line-height: 1.5;
479+
font-weight: normal;
479480
}
480481

481482
.pbx-myPrimarySelect {

src/tests/DefaultComponents/DefaultBuilderComponents.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ import { ref, computed } from 'vue'
33
import componentHelpers from '../../utils/html-elements/componentHelpers'
44
import components from '../../utils/html-elements/component'
55
import { usePageBuilderModal } from '../../composables/usePageBuilderModal'
6-
import { generateComponentPreview } from '../../utils/componentPreviews'
76
import type { ComponentObject } from '../../types'
87
import { getPageBuilder } from '../../composables/builderInstance'
9-
108
import { useTranslations } from '../../composables/useTranslations'
119
1210
const { translate } = useTranslations()
@@ -70,11 +68,6 @@ const convertToComponentObject = function (comp: any): ComponentObject {
7068
title: comp.title,
7169
}
7270
}
73-
74-
// Get SVG preview for component
75-
const getSvgPreview = (title: string) => {
76-
return generateComponentPreview(title)
77-
}
7871
</script>
7972

8073
<style scoped>
@@ -148,7 +141,11 @@ const getSvgPreview = (title: string) => {
148141
:key="category"
149142
@click="selectedCategory = category"
150143
class="pbx-mySecondaryButton pbx-text-xs pbx-px-4"
151-
:class="{ active: selectedCategory === category }"
144+
:class="[
145+
selectedCategory === category
146+
? 'pbx-bg-myPrimaryLinkColor pbx-text-white hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white'
147+
: 'hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white',
148+
]"
152149
>
153150
{{ translate(category) }}
154151
</button>
@@ -168,7 +165,7 @@ const getSvgPreview = (title: string) => {
168165
<!-- Use SVG preview instead of external images -->
169166
<div
170167
class="pbx-max-h-72 pbx-cursor-pointer pbx-bg-white pbx-mx-auto pbx-flex pbx-items-center pbx-justify-center"
171-
v-html="getSvgPreview(comp.title)"
168+
v-html="comp.cover_image"
172169
></div>
173170
</div>
174171
<div class="pbx-p-3">

0 commit comments

Comments
 (0)