@proprioo/salatim
v36.3.9
Published
Proprioo component library
Downloads
291
Maintainers
Readme
Salatim
Salatim is our component library, made with 🥑 and ❤️.
Please have a look on its storybook for each components.
How to dev ?
- create a branch from
main - make changes and sane commits (atomic, descriptive)
- push changes and create a PR on GitHub
- once complete, merge it to
mainusing "Rebase and merge" strategy
How to release a new version?
Final "production" release of salatim are managed through npmjs.com -- https://www.npmjs.com/package/@proprioo/salatim
To publish a new version of salatim, you need to:
- checkout the
mainbranch - make sure everything is up to date with
git pull origin main - [optional by now] update the
CHANGELOG.mdfile according to the changes you made since the last release - create either a patch, minor or major release depending on the changes you made using yarn
- i.e.
yarn version --patchfor a patch release - i.e.
yarn version --minorfor a minor release - i.e.
yarn version --majorfor a major release
- i.e.
- push the commit and the tag created by the previous command using
git push origin main --tags - go to GitHub and create a new release from the tag you just pushed
WARNING: the GitHub workflow to push the package to npmjs.com is currently untested, make sure to verify the package is correctly published on npmjs.com after the release.
OUTDATED, TO BE CHECKED Backport a fix
If you have to backport something to an old version of salatim :
- go to the old version's branch (for example:
v15before the rebranding) - add your commit(s), and don't forget to bump the version in
package.jsonandCHANGELOG.md(if you fix something and the previous version was15.2.3, bump to15.2.4) - push the branch, don't forget it!
- run
yarn clean && yarn buildlocally to make the package ready to be published - run
yarn publish --access=public --non-interactive --tag 15.2.4locally. Don't forget the--tagargument to prevent overriding the latest version.
You can then bump your project with this new version of salatim. ;)
Update phone metadata
We cannot accept every phone numbers in the application, mainly due to some optimization (Metadata JSON is a big file).
When an error is triggered on AppSales (Failed to parse phone number +XXXX), we need to update the phone Metadata to
accept it.
- Find the country calling code, to do so:
- Go to Phone.tsx, change
PhoneInputimport to'react-phone-number-input'and remove metadata attribute in JSX (like this we're accepting every possible phone numbers) - Start locally Storybook and copy / paste your troublesome phone number to find the country calling code.
- Go to Phone.tsx, change
- Go to CountryCode.org and find your country calling code.
- Use the 2 digit ISO found to update the script generate-phone-metadata, then run this script ( Metadata will be automatically generated).
- We also need to update the Phone component to accept this new option, go to constants and add this 2 digit ISO in both constants.
- Do not forget to rollback your changes in
PhoneInput.tsx, then update Changelog.md and package.json version and you're up to go.
