Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes and cleanups #103

Merged
merged 15 commits into from Apr 2, 2018

Commits on Mar 20, 2018

  1. Configuration menu
    Copy the full SHA
    324837c View commit details
    Browse the repository at this point in the history
  2. Reorder main() in code.gs so logic-flow order is more intuitive

    * This is just a readability fix - with this reorder it is easier
      to follow "top-down" flow by reading backwards from the end of
      the file
    * Only the order in the file changed, no change of
      content/functionality
    rowanthorpe committed Mar 20, 2018
    Configuration menu
    Copy the full SHA
    26b170c View commit details
    Browse the repository at this point in the history
  3. Rename 'Contact'->'MergedContact' to not mask Google 'Contact' object

    * Even if we don't use Google's Contact object, it makes the script easier to
      grok for newcomers - and people like me who hadn't looked at it in a while and
      had forgotten, so lost time trying to understand why we were "using Google's
      Contact object but apparently also not" (before realizing it was not Google's
      Contact but our own custom Contact object).
    * If/when we ever want to use Google's Contact object we now just need to add
      "Contact" to the globals at the top and proceed.
    rowanthorpe committed Mar 20, 2018
    Configuration menu
    Copy the full SHA
    c1d9b86 View commit details
    Browse the repository at this point in the history
  4. Fix date format in logging (show 24-hour)

    * Use HH instead of hh in logging timestamp otherwise it is wrong half of the time
      as we don't use "am"/"pm" specifiers (until now e.g. 06:00 was being shown for 18:00)
    * Also, make time format syntax comment for testDate more explicit (DD vs. dd, etc)
    rowanthorpe committed Mar 20, 2018
    Configuration menu
    Copy the full SHA
    fe101a4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    610ae79 View commit details
    Browse the repository at this point in the history
  6. Use lookup table for name-plurals

    * This will be necessary when iterating events (not eventTypes) because certain
      events might have been blacklisted - commit for that coming up
    rowanthorpe committed Mar 20, 2018
    Configuration menu
    Copy the full SHA
    1a3edc5 View commit details
    Browse the repository at this point in the history
  7. Put 'forEach(function' on one line,like all other instances of it

    * This is just a whitespace formatting change (see with
      'git diff --word-diff')
    * Aside from consistency, this is to make upcoming commit-diffs more
      readable due to indentation levels
    rowanthorpe committed Mar 20, 2018
    Configuration menu
    Copy the full SHA
    e42511c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    04fc6c4 View commit details
    Browse the repository at this point in the history
  9. Remove redundant sanity-check

    * Add comment explaining why as it is non-obvious due to the caller
      and callee being far apart
    rowanthorpe committed Mar 20, 2018
    Configuration menu
    Copy the full SHA
    1172a55 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    ce76418 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2018

  1. Add isIn() helper function, use it to improve readability

    * I think the need for this is justified by the existence of a few
      false or flaky conditionals due to misuses/typos of "typeof x ===
      y", etc.
    
    * "typeof x === 'undefined'" is not needed anyway as we aren't
      targetting old browsers (or browsers at all for that matter) so we
      don't need to worry about compatibility, and it is noticably slower
      than "x === undefined"
    rowanthorpe committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    4d6d247 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e9b98f2 View commit details
    Browse the repository at this point in the history
  3. In getInfoFrom..() tweak linespacing,add comments for readability

    * Also fix a small typo in one of the comments
    rowanthorpe committed Mar 23, 2018
    Configuration menu
    Copy the full SHA
    0b6d0dc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8375d64 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2018

  1. Make getInfoFromContact also use try/catch around ID's data-fetch

    * also add comments and improve error-messages, explaining why we are
      using the try-catch, for future reference
    rowanthorpe committed Mar 25, 2018
    Configuration menu
    Copy the full SHA
    0f74a9a View commit details
    Browse the repository at this point in the history