1. 28 Aug, 2017 1 commit
  2. 23 Aug, 2017 1 commit
  3. 29 Jun, 2017 1 commit
  4. 23 Jun, 2017 3 commits
  5. 15 Jun, 2017 1 commit
  6. 09 Jun, 2017 2 commits
    • Denver Gingerich's avatar
      offer numbers from internal inventory when desired · 125fea23
      Denver Gingerich authored
      Prior to this commit, jmp-register only ever offered or suggested
      numbers to prospective users that were currently available in the main
      (unpurchased) inventory provided by Catapult.  No caching or other
      non-realtime handling of this inventory was done.
      
      Here we add an option for the jmp-register administrator to include a
      specific set of numbers (that they own already in their Catapult
      account) to prospective JMP users, in addition to the numbers that are
      already offered from Catapult's main (unpurchased) inventory.
      
      In particular, we update both the area code search (register1) and
      number suggester (num_find.php) to include numbers from the specified
      list when appropriate.  The logic is as follows:
      
      * the last number suggested by the number suggester will be replaced
        by a "fancy" number if (a) the suggester is returning two or more
        numbers in total, (b) the prospective user has at least one area
        code from $fancy_area_code_neighbours in their number list already,
        and (c) the suggester is able to find a "fancy" number from the
        administrator's list that is not used by JMP yet after checking at
        most three random numbers in the list to see if they're used by JMP
      
      * when a user searches for numbers in area code 212, register1 will
        return up to $fancy_max numbers from the administrator's "fancy"
        number list ($fancynums[0]) that are not used by JMP yet
      
      Note that there is still the usual race where a user may pick a number
      at the start of registration that is no longer available by the time
      they've verified their JID.  This is handled with an error message and
      an option to start again (and select a different number), regardless
      of which type of number the user attempted to acquire, "fancy" or not.
      
      As implemented, only one set of "fancy" numbers can currently be
      specified.  The eventual goal is to allow multiple sets, each with its
      own distinct set of neighbouring area codes.  Each area code in the
      list of neighbouring area codes ($fancy_area_code_neighbours) would
      then point at the index of the list of "fancy" numbers it's adjacent
      to inside of $fancynums.  Currently the code assumes that there is
      only one such list ($fancynums[0]) and the values of the keys in
      $fancy_area_code_neighbours are unused (responsible administrators
      should set all those values to 0 for forward compatibility).
      
      register1 currently assumes that the "fancy" numbers are in area code
      212 (per the bullet point above).  For now, additional area codes
      would need to be added manually to the logic in register1 (in addition
      to being added to fancynum-jmp.php per the README file).
      
      This commit was made possible by 9f39ccdc and e8dc5c07.  Thanks to
      9f39ccdc, it is a purely additive commit.  e8dc5c07 allowed users to
      register numbers already in the administrator's Catapult account, but
      until this commit such numbers were not shown/selectable in the UI and
      the user would have to edit the query string (ie. the number parameter
      of the register2 URL) in order to register such a number.
      125fea23
    • Denver Gingerich's avatar
      9f39ccdc
  7. 07 Jun, 2017 1 commit
  8. 06 Jun, 2017 1 commit
  9. 17 May, 2017 2 commits
  10. 24 Apr, 2017 1 commit
  11. 18 Apr, 2017 1 commit
  12. 11 Apr, 2017 1 commit
  13. 03 Apr, 2017 2 commits
  14. 28 Mar, 2017 1 commit
  15. 21 Mar, 2017 1 commit
  16. 18 Mar, 2017 1 commit
  17. 07 Mar, 2017 1 commit
  18. 05 Mar, 2017 1 commit
  19. 03 Mar, 2017 1 commit
  20. 01 Mar, 2017 2 commits
    • Denver Gingerich's avatar
      f359c20a
    • Denver Gingerich's avatar
      give user location-based phone number suggestions · f7680166
      Denver Gingerich authored
      The onboarding process has been overhauled so that users don't have to
      type in an area code to start the signup process.  Instead, they're
      presented with a list of phone number options based on their location
      (with a variety of fallbacks in case no numbers are available there or
      they're not in Canada or the US).
      
      The user can still choose to enter an area code and pick from the
      resulting list, but this is no longer the primary way to select a
      number for signup purposes.
      
      Along with the main index page changes (which include a viewport fix
      so the <iframe/> looks better) and the addition of num_find.php for
      the actually finding the numbers to suggest, register1 and register2
      have been updated so they save/show the city the number is from.  This
      helps those using the number suggestions so may as well add elsewhere.
      
      The duplicate Signup section on the main page has been replaced with a
      "Signup today!" button, both because the Signup section is now quite
      long, and because we don't want to hit num_find.php twice for a user.
      
      We do add a dependency here, on having a MaxMind account for their
      GeoIP2 Precision Web Services tool.  In testing, we found that gratis
      geolocation tools were not accurate enough (especially in Canada),
      making it difficult to provide adequate suggestions.  The code is easy
      enough to rip out (just remove the <iframe/>, fix the text).
      
      Note that num_find.php includes a few hacks for translating MaxMind's
      very good data into Catapult's less good naming conventions.  More
      will probably be needed, but what we have is a good start.
      
      Thanks to @singpolyma for the initial idea of number auto-suggestion.
      f7680166
  21. 01 Feb, 2017 1 commit
  22. 31 Jan, 2017 1 commit