theme-scripts icon indicating copy to clipboard operation
theme-scripts copied to clipboard

Add custom selectors option. Fix theme-product-form logic

Open savchukoleksii opened this issue 4 years ago • 1 comments

Purpose

The goal of this PR is to add an optional parameter to pass custom selectors to theme-product-form. Currenly, it is always default to fixed selector. This would open allow fix apps issues that happen during same selectors in form. For example, ReCharge that currently broke this lib. This problems also mentioned in issues: https://github.com/Shopify/theme-scripts/issues/135 https://github.com/Shopify/theme-scripts/issues/146

Also id change logic was changed. Many apps depens on id field during initializing as also many of them depens on change event of this field. Logic was rebuild to always change id field, so apps logic will not be corrupt.

Approach

  • Add option to pass custom selectors to lib.
  • Fix theme-product-form logic for apps like ReCharge.

savchukoleksii avatar Feb 09 '21 18:02 savchukoleksii

@NoZiL @martinamarien Please, review this changes

savchukoleksii avatar Feb 09 '21 18:02 savchukoleksii