how to make popup templates
Go to https://www.powr.io/raw/<app_id>.json
Eg: https://www.powr.io/raw/29205650.json \ \
You’ll see various bits of information there.
You need to copy the content part of it. \ Create a new migration to add that as new template. \ Example MR here: \ https://gitlab.com/powr/powr/-/merge_requests/6482
If you are facing this kind of error:
PLEASE: _In the JSON code that was copied from https://www.powr.io/raw/<app_id>.json to the migration file, please, check the _null. You will get an error if you don’t change the null to nil. \ And change the default value of isImageHidden to false
Name the template (unique_label) with a date and some related name so it is easy to distinguish: eg:
You need to run Fallback::Cache.delete("app_templates_cache_popup") on rails console on heroku else the template will not work. (you’ll need help when you push to prod to run on prod console)
\ popup_valentines_day_2_2021 \
Add it to the templates controller, import.jsx folder etc. \ You need a screenshot too to show in templates, look at where other images are stored (img links in imports.jsx) and upload the image to the correct folder in s3 (ask help if you don't have access to s3 bucket)