From f0bd205ee9a4bd18a6dcd7d0f31fc0189dc2b44e Mon Sep 17 00:00:00 2001 From: SharanRP Date: Wed, 21 Feb 2024 23:12:42 +0530 Subject: [PATCH 1/9] Loader fixed --- css/80_app.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/80_app.css b/css/80_app.css index 16eb06acad..16475b7531 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -2759,7 +2759,7 @@ button.raw-tag-option svg.icon { background-color: #f5f5f5; } .tag-reference-loading .icon { - background-image: url(img/mini-loader.gif); + background-image: url(img/6-dots-rotate.svg); background-position: 0 0; } From 6a40d86d1d56261f4d717cede94e36baf023b3bb Mon Sep 17 00:00:00 2001 From: SharanRP Date: Wed, 21 Feb 2024 23:34:01 +0530 Subject: [PATCH 2/9] Loader fixed --- img/6-dots-rotate.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 img/6-dots-rotate.svg diff --git a/img/6-dots-rotate.svg b/img/6-dots-rotate.svg new file mode 100644 index 0000000000..2332d135aa --- /dev/null +++ b/img/6-dots-rotate.svg @@ -0,0 +1 @@ + \ No newline at end of file From b347f1b23f8089db944c7fb46da82369ee7e3470 Mon Sep 17 00:00:00 2001 From: SharanRP Date: Wed, 21 Feb 2024 23:36:28 +0530 Subject: [PATCH 3/9] Revert "Loader fixed" This reverts commit 6a40d86d1d56261f4d717cede94e36baf023b3bb. --- img/6-dots-rotate.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 img/6-dots-rotate.svg diff --git a/img/6-dots-rotate.svg b/img/6-dots-rotate.svg deleted file mode 100644 index 2332d135aa..0000000000 --- a/img/6-dots-rotate.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From 7b5bf68cbb24592c492349a5113f94c0a2133df8 Mon Sep 17 00:00:00 2001 From: SharanRP Date: Thu, 22 Feb 2024 00:46:17 +0530 Subject: [PATCH 4/9] Added fractional zoom in url --- css/80_app.css | 2 +- modules/core/validator.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/css/80_app.css b/css/80_app.css index 16475b7531..34e864f3e3 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -2759,7 +2759,7 @@ button.raw-tag-option svg.icon { background-color: #f5f5f5; } .tag-reference-loading .icon { - background-image: url(img/6-dots-rotate.svg); + background-image: url(img/mini-loader); background-position: 0 0; } diff --git a/modules/core/validator.js b/modules/core/validator.js index 58a8b77005..8c1b67b3d7 100644 --- a/modules/core/validator.js +++ b/modules/core/validator.js @@ -304,7 +304,7 @@ export function coreValidator(context) { } if (focusCenter) { // Adjust the view - const setZoom = Math.max(context.map().zoom(), 19); + const setZoom = Math.max(context.map().zoom(), 19.3); context.map().unobscuredCenterZoomEase(focusCenter, setZoom); } From 50473fedb156856ca0fd3065caa0a92e215d5bce Mon Sep 17 00:00:00 2001 From: SharanRP Date: Thu, 22 Feb 2024 20:22:31 +0530 Subject: [PATCH 5/9] input type=tel fixed --- modules/ui/fields/input.js | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index c5061b5ea0..090a517f57 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -50,6 +50,9 @@ export function uiFieldText(field, context) { } + + + function calcLocked() { // Protect certain fields that have a companion `*:wikidata` value var isLocked = (field.id === 'brand' || field.id === 'network' || field.id === 'operator' || field.id === 'flag') && @@ -348,7 +351,7 @@ export function uiFieldText(field, context) { function updatePhonePlaceholder() { if (input.empty() || !Object.keys(_phoneFormats).length) return; - + change()(); var extent = combinedEntityExtent(); var countryCode = extent && countryCoder.iso1A2Code(extent.center()); var format = countryCode && _phoneFormats[countryCode.toLowerCase()]; @@ -404,22 +407,25 @@ export function uiFieldText(field, context) { } } - function change(onInput) { return function() { var t = {}; var val = utilGetSetValue(input); - if (!onInput) val = context.cleanTagValue(val); - // don't override multiple values with blank string + if (field.type === 'tel') { + val = val.replace(/[^0-9+]/g, ''); + } + + if (!onInput) val = context.cleanTagValue(val); + if (!val && getVals(_tags).size > 1) return; - + var displayVal = val; if (field.type === 'number' && val) { var numbers = val.split(';'); numbers = numbers.map(function(v) { if (likelyRawNumberFormat.test(v)) { - // input number likely in "raw" format + // Input number likely in "raw" format return v; } var num = parseLocaleFloat(v); @@ -431,16 +437,15 @@ export function uiFieldText(field, context) { if (!onInput) utilGetSetValue(input, displayVal); t[field.key] = val || undefined; if (field.keys) { - // for multi-key fields with: handle alternative tag keys gracefully - // https://github.com/openstreetmap/id-tagging-schema/issues/905 + // For multi-key fields: handle alternative tag keys gracefully dispatch.call('change', this, tags => { if (field.keys.some(key => tags[key])) { - // use exiting key(s) + // Use existing key(s) field.keys.filter(key => tags[key]).forEach(key => { tags[key] = val || undefined; }); } else { - // fall back to default key if none of the `keys` is preset + // Fall back to default key if none of the `keys` is preset tags[field.key] = val || undefined; } return tags; @@ -451,7 +456,6 @@ export function uiFieldText(field, context) { }; } - i.entityIDs = function(val) { if (!arguments.length) return _entityIDs; _entityIDs = val; @@ -542,3 +546,4 @@ export function uiFieldText(field, context) { return utilRebind(i, dispatch, 'on'); } + From 2ed50ad2ca9be4ccf6a14bd962b3ba181208dbac Mon Sep 17 00:00:00 2001 From: SharanRP Date: Thu, 22 Feb 2024 20:27:45 +0530 Subject: [PATCH 6/9] phone number validation added --- modules/ui/fields/input.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index 090a517f57..beb40571c8 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -351,7 +351,7 @@ export function uiFieldText(field, context) { function updatePhonePlaceholder() { if (input.empty() || !Object.keys(_phoneFormats).length) return; - change()(); + change()(); var extent = combinedEntityExtent(); var countryCode = extent && countryCoder.iso1A2Code(extent.center()); var format = countryCode && _phoneFormats[countryCode.toLowerCase()]; @@ -425,7 +425,7 @@ export function uiFieldText(field, context) { var numbers = val.split(';'); numbers = numbers.map(function(v) { if (likelyRawNumberFormat.test(v)) { - // Input number likely in "raw" format + // input number likely in "raw" format return v; } var num = parseLocaleFloat(v); @@ -438,6 +438,7 @@ export function uiFieldText(field, context) { t[field.key] = val || undefined; if (field.keys) { // For multi-key fields: handle alternative tag keys gracefully + // https://github.com/openstreetmap/id-tagging-schema/issues/905 dispatch.call('change', this, tags => { if (field.keys.some(key => tags[key])) { // Use existing key(s) @@ -445,7 +446,7 @@ export function uiFieldText(field, context) { tags[key] = val || undefined; }); } else { - // Fall back to default key if none of the `keys` is preset + // fall back to default key if none of the `keys` is preset tags[field.key] = val || undefined; } return tags; From 34c4c1b8595a03198f605999a24f0fa57da617d9 Mon Sep 17 00:00:00 2001 From: Sharan poojari <136159249+SharanRP@users.noreply.github.com> Date: Fri, 23 Feb 2024 01:08:34 +0530 Subject: [PATCH 7/9] Update 80_app.css --- css/80_app.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/80_app.css b/css/80_app.css index 34e864f3e3..16eb06acad 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -2759,7 +2759,7 @@ button.raw-tag-option svg.icon { background-color: #f5f5f5; } .tag-reference-loading .icon { - background-image: url(img/mini-loader); + background-image: url(img/mini-loader.gif); background-position: 0 0; } From e5d1d37c9393ca2157206b0f2198550d59222296 Mon Sep 17 00:00:00 2001 From: Sharan poojari <136159249+SharanRP@users.noreply.github.com> Date: Fri, 23 Feb 2024 01:08:59 +0530 Subject: [PATCH 8/9] Update validator.js --- modules/core/validator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/validator.js b/modules/core/validator.js index 8c1b67b3d7..58a8b77005 100644 --- a/modules/core/validator.js +++ b/modules/core/validator.js @@ -304,7 +304,7 @@ export function coreValidator(context) { } if (focusCenter) { // Adjust the view - const setZoom = Math.max(context.map().zoom(), 19.3); + const setZoom = Math.max(context.map().zoom(), 19); context.map().unobscuredCenterZoomEase(focusCenter, setZoom); } From e9c0db9e2e8181121ac06c8a045c823300adb743 Mon Sep 17 00:00:00 2001 From: Sharan poojari <136159249+SharanRP@users.noreply.github.com> Date: Sat, 9 Mar 2024 22:27:53 +0530 Subject: [PATCH 9/9] Update input.js --- modules/ui/fields/input.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui/fields/input.js b/modules/ui/fields/input.js index beb40571c8..3162059c22 100644 --- a/modules/ui/fields/input.js +++ b/modules/ui/fields/input.js @@ -413,7 +413,8 @@ export function uiFieldText(field, context) { var val = utilGetSetValue(input); if (field.type === 'tel') { - val = val.replace(/[^0-9+]/g, ''); + val = val.replace(/^tel:\/\//, ''); // Remove 'tel://' prefix if present + val = val.replace(/^tel:/, ''); // Remove 'tel:' prefix if present } if (!onInput) val = context.cleanTagValue(val);