fix(widgets): stop silently discarding invalid JSON edits in the props fallback textarea
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
Some checks failed
Architecture Governance / architecture (push) Has been cancelled
updateJson() caught JSON.parse failures and did nothing, but the textarea was bound to propsJson(committed props) - so on the next change-detection pass, any in-progress invalid edit snapped back to the last-saved value with zero feedback. Verified live via window.ng.getComponent(): typing invalid JSON now keeps the user's draft on screen with an inline error; fixing it commits and clears the draft/error. Also: homepage-section drop() used CdkDragDrop<any[]> - switched to unknown[] per the no-any rule, no behavior change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -658,6 +658,7 @@ export const en: Translations = {
|
||||
widgetShowRatingDesc: 'Show the star rating on product cards.',
|
||||
widgetShowPriceDesc: 'Show the price on product cards.',
|
||||
widgetJsonDesc: 'Raw widget properties as JSON. Used when no dedicated editor exists for this widget type.',
|
||||
widgetJsonInvalid: 'Invalid JSON - the last valid version is still saved.',
|
||||
wishlistFeatureDesc: 'Let shoppers save products to a wishlist.',
|
||||
compareFeatureDesc: 'Let shoppers compare multiple products side by side.',
|
||||
reviewsFeatureDesc: 'Let shoppers leave and read product reviews.',
|
||||
|
||||
@@ -658,6 +658,7 @@ export const hy: Translations = {
|
||||
widgetShowRatingDesc: 'Ցույց տալ աստղանիշ վարկանիշը ապրանքի քարտերի վրա։',
|
||||
widgetShowPriceDesc: 'Ցույց տալ գինը ապրանքի քարտերի վրա։',
|
||||
widgetJsonDesc: 'Վիջեթի հատկությունները՝ հում JSON ձևաչափով։ Օգտագործվում է, երբ այս վիջեթի տեսակի համար հատուկ խմբագիր չկա։',
|
||||
widgetJsonInvalid: 'Սխալ JSON՝ պահպանված է վերջին վավեր տարբերակը։',
|
||||
wishlistFeatureDesc: 'Թույլ տալ գնորդներին ապրանքներ պահել ընտրյալներում։',
|
||||
compareFeatureDesc: 'Թույլ տալ գնորդներին համեմատել մի քանի ապրանք միաժամանակ։',
|
||||
reviewsFeatureDesc: 'Թույլ տալ գնորդներին թողնել և կարդալ ապրանքի կարծիքներ։',
|
||||
|
||||
@@ -658,6 +658,7 @@ export const ru: Translations = {
|
||||
widgetShowRatingDesc: 'Показывать рейтинг звёздами на карточках товаров.',
|
||||
widgetShowPriceDesc: 'Показывать цену на карточках товаров.',
|
||||
widgetJsonDesc: 'Сырые свойства виджета в формате JSON. Используется, если для этого типа виджета нет отдельного редактора.',
|
||||
widgetJsonInvalid: 'Некорректный JSON — сохранена последняя корректная версия.',
|
||||
wishlistFeatureDesc: 'Разрешить покупателям сохранять товары в избранное.',
|
||||
compareFeatureDesc: 'Разрешить покупателям сравнивать несколько товаров одновременно.',
|
||||
reviewsFeatureDesc: 'Разрешить покупателям оставлять и читать отзывы о товарах.',
|
||||
|
||||
@@ -656,6 +656,7 @@ export interface Translations {
|
||||
widgetShowRatingDesc: string;
|
||||
widgetShowPriceDesc: string;
|
||||
widgetJsonDesc: string;
|
||||
widgetJsonInvalid: string;
|
||||
wishlistFeatureDesc: string;
|
||||
compareFeatureDesc: string;
|
||||
reviewsFeatureDesc: string;
|
||||
|
||||
Reference in New Issue
Block a user