- 02 Jul, 2015 1 commit
-
-
Jake Hartnell authored
To prevent an Annotator is undefined error, the constructor class is set by the object returned from the hypothesisConfig function. The documentation has also been updated.
-
- 27 Jun, 2015 1 commit
-
-
Randall Leeds authored
-
- 26 Jun, 2015 2 commits
-
-
Randall Leeds authored
Add ability to share via links from the sidebar.
-
Nick Stenning authored
Use of {{angular templates}} causes problems on pages with Annotator enabled due to Annotator's habit of splitting text nodes whenever you select anything. Specifically -- if you select one of the words in this text and then change the privacy setting, it will end up rendering as something like PubliOnly Me Only Melic or similar. Using a span tag and ng-bind is a bit of a hack but it prevents this from happening. Oh, Angular...
-
- 19 Jun, 2015 6 commits
-
-
Randall Leeds authored
Make annotation visibility level more explicit
-
Jake Hartnell authored
- Private annotations have the word private as well as the lock icon on the card - Small styling refinements have been added to make the annotation-license - Show the word private alongside lock icon. - Show message explain visibility setting when editing.
-
Randall Leeds authored
Small ux improvements
-
Jake Hartnell authored
-
Jake Hartnell authored
- Use document plugin to get canonical url for sharing. - Introduce Topbar share icon - Add social media icons to icomoon - Generate via uri in the share-dialog directive - Add sharing via Facebook, Twitter, Google plus, and email - Make account dialog and share dialog consistent - Add information about sharing to the help page. - Add tests (Thanks @nickstenning!)
-
Jake Hartnell authored
-
- 18 Jun, 2015 1 commit
-
-
Jake Hartnell authored
-
- 06 Jun, 2015 1 commit
-
-
Sean Hammond authored
Report form level errors
-
- 05 Jun, 2015 5 commits
-
-
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.
-
Nick Stenning authored
Refactor search
-
Nick Stenning authored
Ask for "Username or email address" when logging in
-
Sean Hammond authored
-
Sean Hammond authored
-
- 04 Jun, 2015 3 commits
-
-
Randall Leeds authored
Fully isolate os.environ during config testing
-
Sean Hammond authored
Dehorusify the AuthController
-
Nick Stenning authored
Keep app css and inject css separate
-
- 03 Jun, 2015 3 commits
-
-
Randall Leeds authored
Structure is good. Bonus fewer false dependencies on asset rebuilds for the app.
-
Randall Leeds authored
Dehorusify ProfileController
-
Randall Leeds authored
Fix display regression on help/first-run pages
-
- 02 Jun, 2015 17 commits
-
-
Nick Stenning authored
Let users change their email addresses
-
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.
-
Sean Hammond authored
-
Sean Hammond authored
-
Sean Hammond authored
-
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.
-
Sean Hammond authored
-
Sean Hammond authored
-
Sean Hammond authored
-
Sean Hammond authored
-
Sean Hammond authored
-
Sean Hammond authored
Quite a lot of repetition in these tests, some shared helper functions needed.
-
Sean Hammond authored
-
Sean Hammond authored
-
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.
-
Sean Hammond authored
-
Sean Hammond authored
Fixes #174. account.html: - Add a new "Change Your Email Address" form accounts/views.py: - Add email to the user dict returned at /app?__formid__=profile (or session.profile() in Angular) - When resetting the form after a successful submission, put the new (or unchanged) email address into the user dict returned in the response. AccountController needs this (see below). account-controller.coffee: - Add $scope.email (the user's current email address), to use for placeholder text in the email form field. - After a successful form submission set $scope.email to the one from the response. This sets the placeholder text in the email field to the new value, instead of continuing to show the old email address as placeholder. - Add changeEmail() method to receive email form submissions.
-