rosulek / gmail-tickler

Get emails out of your inbox until a specified date
MIT License
19 stars 5 forks source link

Use Properties for configuration instead of Javascript constants #27

Open lehrblogger opened 7 years ago

lehrblogger commented 7 years ago

As discussed in https://github.com/rosulek/gmail-tickler/issues/25, we will probably eventually migrate to using the Properties service to make installation and configuration easier for non-technical users. These can be configured in the Apps Scripts UI shown in the below screenshot accessible from the File menu. I think it would be worth doing that regardless, so that we can all be running the same version of the code, rather than having to each maintain different configuration values.

screen shot 2016-12-01 at 1 35 08 am

This should be pretty straightforward – all we need to do is check for a Property (probably a User Property, as opposed to a Script or Document Property) for each configuration option, and then default to the current values if none is found.

rosulek commented 7 years ago

Currently the only way to set the script's preferred timezone is to do it manually.

I propose that the timezone be made a proper configuration option once we have a configuration UI. Otherwise it will be the only thing very difficult to change. This would require explicitly dealing with timezones in the script date handling (currently all dates get the right timezone by default).

lehrblogger commented 7 years ago

It also seems to be true that a script can only have one time zone for everyone using it, which is another reason we'll have to make it a proper configuration option. I noticed this when trying to change the time zone used by the script for both my personal account and a G Suite account.