From d512aeba1e079fce6f8743fdb403b1df619c9e24 Mon Sep 17 00:00:00 2001 From: syam babu Date: Fri, 31 May 2024 16:35:04 +0530 Subject: [PATCH 1/8] fix: changed base url of widget --- .env.production | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.production b/.env.production index 06cce9e84..2329f6454 100644 --- a/.env.production +++ b/.env.production @@ -14,4 +14,4 @@ REACT_APP_FEATURE_FLAG_IMAGE_CROP=true REACT_APP_ENV="production" REACT_APP_INVITE_URL=" https://cms.footlight.io/join?invitationId=" REACT_APP_ACCEPT_URL=" https://cms.footlight.io/accept?invitationId=" -REACT_APP_CALENDAR_WIDGET_BASE_URL="https://s3.ca-central-1.amazonaws.com/cms-widget.footlight.io/index.html" +REACT_APP_CALENDAR_WIDGET_BASE_URL="https://listing-widget.footlight.io" From 7a8011eed8717f3c7a480fe4f6714b3ad3e5507c Mon Sep 17 00:00:00 2001 From: syam babu Date: Tue, 4 Jun 2024 14:52:40 +0530 Subject: [PATCH 2/8] fix: fixed font size to 16px for mobile screen in forms --- src/index.css | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/index.css b/src/index.css index 7780698d1..979517f15 100644 --- a/src/index.css +++ b/src/index.css @@ -80,3 +80,22 @@ body.inheritCursors * { justify-content: center; } } + +@media screen and (max-width: 575px) { + .ant-input, + .ant-input-number, + .ant-select, + .ant-cascader, + .ant-time-picker, + .ant-calendar, + .ant-slider, + .ant-switch, + .ant-radio-button, + .ant-checkbox, + textarea[class^='ant-'], + input[class^='ant-'], + .text-editor .ql-container { + font-size: 16px !important; + /* height: 40px; */ + } +} From f2a628fbffe3cbf76086aa26e9638acde2c01795 Mon Sep 17 00:00:00 2001 From: syam babu Date: Tue, 4 Jun 2024 15:14:09 +0530 Subject: [PATCH 3/8] fix: removed template urls form iframe code --- .../Dashboard/Settings/WidgetSettings/WidgetSettings.jsx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/pages/Dashboard/Settings/WidgetSettings/WidgetSettings.jsx b/src/pages/Dashboard/Settings/WidgetSettings/WidgetSettings.jsx index cdd7e0c04..7fa1ac090 100644 --- a/src/pages/Dashboard/Settings/WidgetSettings/WidgetSettings.jsx +++ b/src/pages/Dashboard/Settings/WidgetSettings/WidgetSettings.jsx @@ -45,7 +45,6 @@ const WidgetSettings = () => { const regexForHexCode = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/; const calendarContentLanguage = currentCalendarData?.contentLanguage; - const { eventDetailsUrlTemplate = '', listEventsUrlTemplate = '' } = currentCalendarData?.widgetSettings || {}; const calendarSlug = currentCalendarData?.slug; const calendarName = currentCalendarData?.name[user?.interfaceLanguage?.toLowerCase()]; const calendarLogoUri = currentCalendarData?.logo?.original?.uri || ''; @@ -166,8 +165,6 @@ const WidgetSettings = () => { urlCopy.searchParams.append('calendar', calendarSlug); urlCopy.searchParams.append('calendarName', calendarName); urlCopy.searchParams.append('logo', calendarLogoUri); - urlCopy.searchParams.append('eventUrl', eventDetailsUrlTemplate); - urlCopy.searchParams.append('searchEventsUrl', listEventsUrlTemplate); urlCopy.searchParams.append('searchEventsFilters', searchEventsFilters); urlCopy.searchParams.append('locale', locale?.key.toLowerCase()); @@ -180,8 +177,6 @@ const WidgetSettings = () => { urlCopyMobile.searchParams.append('calendar', calendarSlug); urlCopyMobile.searchParams.append('calendarName', calendarName); urlCopyMobile.searchParams.append('logo', calendarLogoUri); - urlCopyMobile.searchParams.append('eventUrl', eventDetailsUrlTemplate); - urlCopyMobile.searchParams.append('searchEventsUrl', listEventsUrlTemplate); urlCopyMobile.searchParams.append('searchEventsFilters', searchEventsFilters); urlCopyMobile.searchParams.append('locale', locale?.key.toLowerCase()); urlCopyMobile.searchParams.append('height', '600'); @@ -331,8 +326,6 @@ const WidgetSettings = () => { const limit = form.getFieldValue('limit') ?? 9; const locale = form.getFieldValue('locale') ?? languageOptions[0].value; - urlCopy.searchParams.append('eventUrl', eventDetailsUrlTemplate); - urlCopy.searchParams.append('searchEventsUrl', listEventsUrlTemplate); urlCopy.searchParams.append('logo', calendarLogoUri); urlCopy.searchParams.append('locale', onLanguageSelect(locale)?.key.toLowerCase()); urlCopy.searchParams.append('limit', limit); @@ -342,8 +335,6 @@ const WidgetSettings = () => { urlCopy.searchParams.append('height', height); setUrl(urlCopy); - urlCopyMobile.searchParams.append('eventUrl', eventDetailsUrlTemplate); - urlCopyMobile.searchParams.append('searchEventsUrl', listEventsUrlTemplate); urlCopyMobile.searchParams.append('logo', calendarLogoUri); urlCopyMobile.searchParams.append('locale', onLanguageSelect(locale)?.key.toLowerCase()); urlCopyMobile.searchParams.append('limit', limit); From e14c18b84a918ebb4f151797fd2424fa822f0c0a Mon Sep 17 00:00:00 2001 From: syam babu Date: Tue, 4 Jun 2024 17:11:46 +0530 Subject: [PATCH 4/8] fix: changed map of containPlace uri to sameAs field. closes #1134 --- src/pages/Dashboard/CreateNewPlace/CreateNewPlace.jsx | 4 ++-- src/pages/Dashboard/PlaceReadOnly/PlaceReadOnly.jsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/Dashboard/CreateNewPlace/CreateNewPlace.jsx b/src/pages/Dashboard/CreateNewPlace/CreateNewPlace.jsx index c3425c177..150905ed9 100644 --- a/src/pages/Dashboard/CreateNewPlace/CreateNewPlace.jsx +++ b/src/pages/Dashboard/CreateNewPlace/CreateNewPlace.jsx @@ -920,7 +920,7 @@ function CreateNewPlace() { id: place?.id, name: place?.name, image: place?.image, - uri: place?.derivedFrom?.uri, + uri: artsDataLinkChecker(place?.sameAs), }; }); setSelectedContainsPlaces( @@ -1004,7 +1004,7 @@ function CreateNewPlace() { id: place?.id, name: place?.name, image: place?.image, - uri: place?.derivedFrom?.uri, + uri: artsDataLinkChecker(place?.sameAs), }; }); setSelectedContainsPlaces( diff --git a/src/pages/Dashboard/PlaceReadOnly/PlaceReadOnly.jsx b/src/pages/Dashboard/PlaceReadOnly/PlaceReadOnly.jsx index e6ce148e1..61baa9d8c 100644 --- a/src/pages/Dashboard/PlaceReadOnly/PlaceReadOnly.jsx +++ b/src/pages/Dashboard/PlaceReadOnly/PlaceReadOnly.jsx @@ -173,7 +173,7 @@ function PlaceReadOnly() { id: place?.id, name: place?.name, image: place?.image, - uri: place?.derivedFrom?.uri, + uri: artsDataLinkChecker(place?.sameAs), }; }); setSelectedContainsPlaces( From ab76b38418590b471a09475dc7d2c0fe124e6db6 Mon Sep 17 00:00:00 2001 From: syam babu Date: Tue, 4 Jun 2024 17:30:57 +0530 Subject: [PATCH 5/8] fix: fixed the overflow of image name from container. closes #1114 --- src/components/ImageUpload/imageUpload.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ImageUpload/imageUpload.css b/src/components/ImageUpload/imageUpload.css index b955270b1..822bbe92f 100644 --- a/src/components/ImageUpload/imageUpload.css +++ b/src/components/ImageUpload/imageUpload.css @@ -26,7 +26,7 @@ cursor: pointer; } .image-footer .image-name { - white-space: nowrap; + /* white-space: nowrap; */ cursor: pointer; } .image-footer .image-thumbnail { From fdc049c115fc53444fab91cb821983ea8e1c75cf Mon Sep 17 00:00:00 2001 From: syam babu Date: Wed, 5 Jun 2024 14:25:22 +0530 Subject: [PATCH 6/8] fix: closes #1114 closes #64 --- src/components/ImageUpload/ImageUpload.jsx | 16 ++++++++++++---- src/utils/getWidthFromAspectRatio.js | 4 ++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 src/utils/getWidthFromAspectRatio.js diff --git a/src/components/ImageUpload/ImageUpload.jsx b/src/components/ImageUpload/ImageUpload.jsx index 591e69eee..9e7f87d24 100644 --- a/src/components/ImageUpload/ImageUpload.jsx +++ b/src/components/ImageUpload/ImageUpload.jsx @@ -6,6 +6,7 @@ import Outlined from '../Button/Outlined'; import { useTranslation } from 'react-i18next'; import ImageCrop from '../ImageCrop'; import { useOutletContext } from 'react-router-dom'; +import { getWidthFromAspectRatio } from '../../utils/getWidthFromAspectRatio'; function ImageUpload(props) { const { @@ -48,6 +49,14 @@ function ImageUpload(props) { }, }); + let aspectRatio; + let width; + + if (!isCalendarLogo && currentCalendarData?.imageConfig[0]?.thumbnail?.aspectRatio) { + aspectRatio = currentCalendarData.imageConfig[0]?.large.aspectRatio; + width = getWidthFromAspectRatio(aspectRatio, 48); + } + const normFile = (e) => { if (Array.isArray(e)) { return e; @@ -139,11 +148,10 @@ function ImageUpload(props) { { + const [width, height] = aspectRatio.split(':').map(Number); + return (fixedHeight * width) / height; +}; From 029f79d0d4b6361404e801e6f0c57e823173a43d Mon Sep 17 00:00:00 2001 From: syam babu Date: Wed, 5 Jun 2024 16:32:51 +0530 Subject: [PATCH 7/8] fix: increased label font-size. closes #64 --- src/index.css | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.css b/src/index.css index 979517f15..d283f2162 100644 --- a/src/index.css +++ b/src/index.css @@ -96,6 +96,8 @@ body.inheritCursors * { input[class^='ant-'], .text-editor .ql-container { font-size: 16px !important; - /* height: 40px; */ + } + .ant-form-item-label > label { + font-size: 16px !important; } } From 8722194dd0a58af19ec4ae1dc3c65990bc072cf9 Mon Sep 17 00:00:00 2001 From: syam babu Date: Wed, 5 Jun 2024 17:04:35 +0530 Subject: [PATCH 8/8] fix: fixed edge case --- src/components/ImageUpload/imageUpload.css | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/components/ImageUpload/imageUpload.css b/src/components/ImageUpload/imageUpload.css index 822bbe92f..51745a12c 100644 --- a/src/components/ImageUpload/imageUpload.css +++ b/src/components/ImageUpload/imageUpload.css @@ -22,6 +22,27 @@ gap: 8px; } +.image-footer .image-contents { + display: flex; + align-items: center; + height: 100%; + width: 85%; +} + +.image-footer .image-thumbnail { + width: auto; + min-width: none; +} + +.image-footer .image-name { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + max-width: 100%; + display: inline-block; + margin-left: 10px; +} + .image-footer .image-actions { cursor: pointer; }