- 20 Apr, 2017 5 commits
-
-
Sean Hammond authored
Render "censored text" for hidden annotations
-
Sean Hammond authored
Fix variance in annotation share dialog test coverage
-
Sean Hammond authored
Rewrite and simplify the permissions service
-
Robert Knight authored
Display a column of horizontal stripes to give the impression of censored text for hidden annotations if the annotation's content has been removed by the service. Implements mock at https://github.com/hypothesis/product-backlog/issues/231#issuecomment-295600762
-
Robert Knight authored
Remove a broken unit test
-
- 19 Apr, 2017 5 commits
-
-
Sean Hammond authored
Git push to hardcoded https URL and master branch
-
Sean Hammond authored
As noted in this comment: https://github.com/hypothesis/client/pull/356#discussion_r111998459 this test doesn't actually test what it says it does, and fixing the test would require some refactoring of the code under test. For now, just delete the test.
-
Sean Hammond authored
Change the `git push` command that the `npm version minor` command runs when doing a client release to: 1. Hardcode the https URL of the client repo, instead of assuming the user's `origin` is set to it 2. Push only the user's master branch to the remote master branch (instead of potentially pushing other local branches as well)
-
Sean Hammond authored
-
Sean Hammond authored
-
- 18 Apr, 2017 8 commits
-
-
Robert Knight authored
Use the new `/api/links` resource
-
Sean Hammond authored
There's no unit test for this. Because of Promises, it cannot be tested without refactoring serviceUrl.
-
Sean Hammond authored
Change serviceUrl to return URLs by expanding URL templates received from h's /api/links resource, rather than using hardcoded URL templates as it previously did. The interface and contract that serviceUrl presents to its users remains the same - the fact it's now sending an API request to get the URL templates, and waiting for the response, is completely hidden from its users. This hiding is achieved by two tricks: 1. Always returning "" for an expanded URL if the API response hasn't been received yet, rather than, for example, changing the interface to return Promises instead of strings (which would then require changes to every user of the interface, and possibly their users...) 2. Updating annotationUI, the Redux state store, with the new URL templates when the API response is received. This causes any AngularJS components that might have used an (empty string) URL to be re-rendered, they will call sericeUrl URL again and this time get the actual URLs. This is completely transparent to the components - annotationUI causes AngularJS to call them again and this time they will get a different result from serviceUrl. The code of the components themselves doesn't need to change. Additionally, serviceUrl will never throw errors if it hasn't received the API response yet. For example there is no error if an unknown link name is requested, or if unused template params are given. It just always returns "". Once it _does_ have the API response then it will start throwing errors for bad requests, the same as it did previously.
-
Sean Hammond authored
Add a new function to `store`, the https://hypothes.is/api wrapper, that provides access to the new https://hypothes.is/api/links resource.
-
Sean Hammond authored
Add a Redux reducer for storing the links (URL templates) from the /api/links HTTP resource in the state store.
-
Robert Knight authored
This adds a missing test for the behavior and also fixes variance in test coverage between runs because the code that implements this behavior sometimes ran and sometimes did not.
-
Robert Knight authored
Instead of adding event listeners to the document to track clicks outside the share dialog, use a transparent backdrop element behind the share dialog which covers the whole page. This avoids the need to register/unregister document-level event handlers in the controller, removing some code which was untested.
-
Robert Knight authored
Refactor the annotation share dialog's controller for consistency with other components: - Move controller to a top-level function in the file - Capture `this` as `self` rather than using `bind` - Attach `onShareClick` to controller rather than `$scope`
-
- 13 Apr, 2017 5 commits
-
-
Robert Knight authored
-
Robert Knight authored
This commit replaces the 'permissions' service with a minimal implementation which supports only what is required by the actual permissions model in the client and service, rather than all the possible permissions implied by the structure of the `permissions` field. In the client and service, annotations are simply "shared" or "private": "private" annotations can be read, updated and deleted only by their creator. "shared" annotations can additionally be read by everyone in the group that the annotation is associated with.
-
Robert Knight authored
-
Robert Knight authored
-
Sheetal Umesh Kumar authored
Update flag count after moderator flags an annotation themselves
-
- 12 Apr, 2017 10 commits
-
-
Robert Knight authored
-
Robert Knight authored
-
Sean Hammond authored
Only display CC 0 license for shared annotations in public groups
-
Robert Knight authored
Do not display the CC 0 license for annotations that are shared in a private group.
-
Sean Hammond authored
Simplify handling of quotes in annotations
-
Robert Knight authored
-
Robert Knight authored
Although annotations can contain multiple targets in theory, in practice we only ever store one target per annotation and one quote selector per target. Until we have a clear use case for associating multiple quotes with an annotation, we can simplify the code by only rendering the first one.
-
Sean Hammond authored
Extract annotation action buttons into a separate component
-
Robert Knight authored
This refactors a bunch of markup that was duplicated for each action button and should make it easier to add tests specifically for the button's behaviors in future. * Create an `<annotation-action-button>` component and move existing markup for buttons there. * Refactor `<annotation>` test to use the same set of bindings for the mock `<markdown>` component as the real one.
-
Sean Hammond authored
Extract annotation header into a separate component
-
- 11 Apr, 2017 3 commits
-
-
Robert Knight authored
The `<annotation>` component is growing large and unwieldy, especially the tests. As a first step to making it easier to follow, extract the header (which displays username, timestamp, document metadata and group name) into a separate component.
-
Christof Dorner authored
Use hyphens instead of underscores in template filenames
-
Robert Knight authored
The use of underscores dates back to when the templates were part of the service code and used the same naming conventions as the service's Jinja2 templates. Using hyphens makes the template filenames match the other files which make up a component (JS & SCSS files). This makes it easier to switch between the different parts when using a fuzzy file finder.
-
- 08 Apr, 2017 1 commit
-
-
Robert Knight authored
-
- 07 Apr, 2017 3 commits
-
-
Robert Knight authored
-
Robert Knight authored
-
Robert Knight authored
-