1. 02 Jul, 2015 1 commit
    • Randall Leeds's avatar
      Clean and simplify some annotation and thread CSS · 755585c1
      Randall Leeds authored
      - Keep the namespaced classes sorted by file
      - Keep the collapsed annotation overrides in the annotation file
      - Improve the vertical alignment of the timestamp better
      - Make margins and elements go away in the collapsed state rather
        than using negative margins to hide them
      - Simplify the thread expander styles
      755585c1
  2. 30 Jun, 2015 1 commit
    • Jake Hartnell's avatar
      Improve thread collapsing UX. · 92ccabad
      Jake Hartnell authored
      - Threads collapse to single lines.
      - Use iconograpy consistent with collapsing / expanding UI in other
      applications
      - Threads are fully expanded when you click replies on a top level annotation.
      - Delete old test and add new tests.
      92ccabad
  3. 27 Jun, 2015 1 commit
  4. 26 Jun, 2015 2 commits
  5. 19 Jun, 2015 6 commits
  6. 18 Jun, 2015 1 commit
  7. 06 Jun, 2015 1 commit
  8. 05 Jun, 2015 5 commits
    • Nick Stenning's avatar
      Support reporting top-level form validation errors · e13040b9
      Nick Stenning authored
      When we call `form.validate()` and the validation fails, the raised
      exception is a `deform.ValidationFailure`. This object has an `error`
      attribute which represents the underlying validation error object for
      the entire form.
      
      Previously, if the validation failure were a result of top-level
      validation errors (such as the fact that an unactivated user is trying
      to log in), this error would be lost, because we only reported errors
      for the forms fields, or "children".
      
      This commit changes `h.accounts.views.validate_form` so that it converts
      the entire `colander.Invalid` object into a dictionary using its
      `asdict()` instance method. By doing this, we get two immediate
      benefits:
      
      - top-level validation errors are reported in the '' (empty string)
        field
      - we avoid the need to aggregate form field errors by hand in ajax_form
      
      In addition, we need to deal with this case on the frontend, so this
      commit also changes the formRespond directive so that if no overall
      "reason" is provided for failure, then an empty-string member of the
      "errors" object can set the overall validation status (and error
      message) for the form.
      e13040b9
    • Nick Stenning's avatar
      Merge pull request #2282 from hypothesis/refactor_search · 3b988248
      Nick Stenning authored
      Refactor search
      3b988248
    • Nick Stenning's avatar
      Merge pull request #2288 from hypothesis/username-or-email-address · 119c46ed
      Nick Stenning authored
      Ask for "Username or email address" when logging in
      119c46ed
    • Sean Hammond's avatar
      Correct an error message · b1c8b878
      Sean Hammond authored
      b1c8b878
    • Sean Hammond's avatar
      d0c85c62
  9. 04 Jun, 2015 3 commits
  10. 03 Jun, 2015 3 commits
  11. 02 Jun, 2015 16 commits
    • Nick Stenning's avatar
      Merge pull request #2131 from hypothesis/174-let-me-change-my-email · 4b9821ef
      Nick Stenning authored
      Let users change their email addresses
      4b9821ef
    • Sean Hammond's avatar
      Fix email address display bug · b8db6b3f
      Sean Hammond authored
      1. Go to the Change Your Email Address form
      2. Type in a new email address (twice) and your password
      3. Select part of the text showing your current email address with the
         cursor
      4. Click Update
      
      => The display of your current email address is updated to a nonsense
      value.
      
      This commit fixes the issue, your email address will be displayed
      correctly.
      b8db6b3f
    • Sean Hammond's avatar
      Fix some broken tests · e68993ab
      Sean Hammond authored
      e68993ab
    • Sean Hammond's avatar
      Fix "fnPtr is not a function" Angular error · f2a88386
      Sean Hammond authored
      f2a88386
    • Sean Hammond's avatar
      Make current email address <strong> · ce323474
      Sean Hammond authored
      ce323474
    • Sean Hammond's avatar
      Move current email address out of <input> fields · 48b9a014
      Sean Hammond authored
      Move the user's current email address out of the placeholder attribute
      of the new email address <input> field. Just put it in a <p> instead.
      This is much better for usability.
      48b9a014
    • Sean Hammond's avatar
      Shorten a docstring · fb26ab12
      Sean Hammond authored
      fb26ab12
    • Sean Hammond's avatar
      Rename a helper function · 7e50772b
      Sean Hammond authored
      7e50772b
    • Sean Hammond's avatar
      a57f3d25
    • Sean Hammond's avatar
      55e8c35d
    • Sean Hammond's avatar
      8f92915e
    • Sean Hammond's avatar
      Add frontend tests for change email form · 9595453e
      Sean Hammond authored
      Quite a lot of repetition in these tests, some shared helper functions needed.
      9595453e
    • Sean Hammond's avatar
      Remove unused local variable · 0385126f
      Sean Hammond authored
      0385126f
    • Sean Hammond's avatar
      Small docstring fix · 01fa0740
      Sean Hammond authored
      01fa0740
    • Sean Hammond's avatar
      Begin adding frontend tests for changing email · 7f6ee3af
      Sean Hammond authored
      Begin adding frontend tests for the new AccountController code that
      deals with the new form for changing the logged-in user's email address.
      
      I've done this as a new top-level describe() with a new way of writing
      Angular controller tests, rather than adding to the stuff already in
      account-controller-test.coffee.
      
      The aims of this way of writing tests is to make the tests easier to understand
      and modify (either to fix a broken test or to add new ones) by:
      
      - Reducing special Angular knowledge needed to understand the tests
      
      - Reducing globals (both global variables and beforeEach() functions) used in
        tests.
      
        These increase the "travel" needed to understand a given test method because
        you have to read the whole test module to understand everything that happens
        before the test runs and what all the global variables the test uses are.
      
        The aim is that reading only the test function (and not the rest of the code
        in the file) should be enough to understand the test.
      
        Similarly I shouldn't have to read and understand the whole test file to add
        a new test.
      
        Globals and beforeEach()'s also tie the tests together. For example if a
        bunch of stub services and a controller are created in beforeEach() functions
        then any new tests added to the file inherit this stubbing behaviour even
        though they may not want it or may need something else. This again makes
        changing or adding just one test harder - need to understand the whole file,
        changes made for one test may break other tests.
      
      Implementation notes:
      
      - Used a new top-level describe(), didn't want to inherit all the globals,
        beforeEach()'s and stubbing of the existing one.
      
      - Because we now have two top-level describe()s had to use a try ... catch in
        the second one to avoid creating the "h" Angular module twice.
      
      - Tried to decouple the tests from Angular as much as possible, reduce the
        amount of Angular knowledge (especially about providing and injecting
        dependencies) needed to understand the tests.
      
        Angular's $provide isn't used at all, and inject() (which I don't think can
        be removed completely) is contained in two helper functions.
      
      - Rather than a beforeEach() and global variables we use a controller()
        function that creates the AccountController and stubs for the services it
        depends on and returns an object of all of them.
      
        Tests can then call controller() and use destructuring assignment to get only
        the bits they need.
      
        Every variable used in a test method is defined in the test method
        (sometimes by calling a helper function and getting a return value).
      
      - controller() by default uses minimal stubbing, but the caller can optionally
        pass in their own object for each of the stubbed dependencies.
      7f6ee3af
    • Sean Hammond's avatar
      Add second email address field · d255f520
      Sean Hammond authored
      d255f520