@proprioo/salatim 35.7.0 → 35.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +13 -0
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -73,3 +73,16 @@ If you have to backport something to an old version of salatim :
|
|
|
73
73
|
5. run `yarn publish --access=public --non-interactive --tag 15.2.4` locally. **Don't forget the `--tag` argument to prevent overriding the latest version.**
|
|
74
74
|
|
|
75
75
|
You can then bump your project with this new version of salatim. ;)
|
|
76
|
+
|
|
77
|
+
## Update phone metadata
|
|
78
|
+
|
|
79
|
+
We cannot accept every phone numbers in the application, mainly due to some optimization (Metadata JSON is a big file).
|
|
80
|
+
When an error is triggered on AppSales (`Failed to parse phone number +XXXX`), we need to update the phone Metadata to accept it.
|
|
81
|
+
|
|
82
|
+
1. Find the country calling code, to do so:
|
|
83
|
+
1. Go to [Phone.tsx](./packages/phone//src/phoneInput/PhoneInput.tsx), change `PhoneInput` import to `'react-phone-number-input'` and remove metadata attribute in JSX (like this we're accepting every possible phone numbers)
|
|
84
|
+
2. Start locally Storybook and copy / paste your troublesome phone number to find the country calling code.
|
|
85
|
+
2. Go to [CountryCode.org](https://countrycode.org/) and find your country calling code.
|
|
86
|
+
3. Use the 2 digit ISO found to update the script [generate-phone-metadata](./package.json), then run this script (Metadata will be automatically generated).
|
|
87
|
+
4. We also need to update the Phone component to accept this new option, go to [constants](./packages/phone/src/phoneInput/constants.ts) and add this 2 digit ISO in both constants.
|
|
88
|
+
5. Do not forget to rollback your changes in `PhoneInput.tsx`, then update Changelog.md and package.json version and you're up to go.
|