crownheightsaid / mutual-aid-app

Hey we're a mutual aid group in Crown Heights trying to help around town. Please reach out if you want to setup your own slack app and need a hand!
MIT License
25 stars 17 forks source link

Use airtable request fields in place of hardcoded keys #124

Open piratefsh opened 4 years ago

piratefsh commented 4 years ago

Summary

We have a number of keys used to access Airtable objects that are hardcoded in the webapp. Example: https://github.com/crownheightsaid/mutual-aid-app/blob/b02423c45d11d51e6faed958a8b47e469cb0aae9/src/webapp/components/RequestPopup.js#L62

We should replace this hardcoded keys with the centralized list of Airtable keys here: https://github.com/crownheightsaid/mutual-aid-app/blob/b02423c45d11d51e6faed958a8b47e469cb0aae9/src/lib/airtable/tables/requests.js#L234

This should be importable from the webapp.

Bonus

Get ~airtable alias working within the webapp. I believe it's only possible to import via relative paths at the moment. This issue was faced here: https://github.com/crownheightsaid/mutual-aid-app/pull/104/files#r459213347

Why

This is important to prevent inconsistencies as well as typos that may lead to bugs! This app is also used by other mutual aids and having these keys in a centralized place makes it easy for them to adapt this app for their airtable, much like with string translations.

mjmaurer commented 4 years ago

Re: the bonus :::

I think alias should work (minus the tilde) as of #105