Unverified Commit 9a98e6f2 authored by Lyza Gardner's avatar Lyza Gardner Committed by GitHub

Merge pull request #1755 from hypothesis/rename-annotations-service

Rename `annotations` -> `annotationsService` (establish service-naming pattern)
parents ec63961a 7f6b9cb8
...@@ -6,7 +6,7 @@ import * as tabs from '../util/tabs'; ...@@ -6,7 +6,7 @@ import * as tabs from '../util/tabs';
function SidebarContentController( function SidebarContentController(
$scope, $scope,
analytics, analytics,
annotations, annotationsService,
store, store,
frameSync, frameSync,
rootThread, rootThread,
...@@ -120,7 +120,7 @@ function SidebarContentController( ...@@ -120,7 +120,7 @@ function SidebarContentController(
} }
const searchUris = store.searchUris(); const searchUris = store.searchUris();
annotations.load(searchUris, currentGroupId); annotationsService.load(searchUris, currentGroupId);
}, },
true true
); );
......
...@@ -68,7 +68,7 @@ describe('sidebar.components.sidebar-content', function() { ...@@ -68,7 +68,7 @@ describe('sidebar.components.sidebar-content', function() {
$provide.value('frameSync', fakeFrameSync); $provide.value('frameSync', fakeFrameSync);
$provide.value('rootThread', fakeRootThread); $provide.value('rootThread', fakeRootThread);
$provide.value('streamer', fakeStreamer); $provide.value('streamer', fakeStreamer);
$provide.value('annotations', fakeAnnotations); $provide.value('annotationsService', fakeAnnotations);
$provide.value('settings', fakeSettings); $provide.value('settings', fakeSettings);
}); });
}); });
......
...@@ -252,7 +252,7 @@ function startAngularApp(config) { ...@@ -252,7 +252,7 @@ function startAngularApp(config) {
.service('analytics', analyticsService) .service('analytics', analyticsService)
.service('annotationMapper', annotationMapperService) .service('annotationMapper', annotationMapperService)
.service('annotations', annotationsService) .service('annotationsService', annotationsService)
.service('api', apiService) .service('api', apiService)
.service('apiRoutes', apiRoutesService) .service('apiRoutes', apiRoutesService)
.service('auth', authService) .service('auth', authService)
......
import SearchClient from '../search-client'; import SearchClient from '../search-client';
// @ngInject // @ngInject
export default function annotations( export default function annotationsService(
annotationMapper, annotationMapper,
api, api,
store, store,
......
import EventEmitter from 'tiny-emitter'; import EventEmitter from 'tiny-emitter';
import annotations from '../annotations'; import annotationsService from '../annotations';
import { $imports } from '../annotations'; import { $imports } from '../annotations';
let searchClients; let searchClients;
...@@ -29,7 +29,7 @@ class FakeSearchClient extends EventEmitter { ...@@ -29,7 +29,7 @@ class FakeSearchClient extends EventEmitter {
} }
} }
describe('annotations', () => { describe('annotationService', () => {
let fakeStore; let fakeStore;
let fakeApi; let fakeApi;
let fakeAnnotationMapper; let fakeAnnotationMapper;
...@@ -90,7 +90,7 @@ describe('annotations', () => { ...@@ -90,7 +90,7 @@ describe('annotations', () => {
return { uri: uri }; return { uri: uri };
}) })
); );
return annotations( return annotationsService(
fakeAnnotationMapper, fakeAnnotationMapper,
fakeApi, fakeApi,
fakeStore, fakeStore,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment