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';
function SidebarContentController(
$scope,
analytics,
annotations,
annotationsService,
store,
frameSync,
rootThread,
......@@ -120,7 +120,7 @@ function SidebarContentController(
}
const searchUris = store.searchUris();
annotations.load(searchUris, currentGroupId);
annotationsService.load(searchUris, currentGroupId);
},
true
);
......
......@@ -68,7 +68,7 @@ describe('sidebar.components.sidebar-content', function() {
$provide.value('frameSync', fakeFrameSync);
$provide.value('rootThread', fakeRootThread);
$provide.value('streamer', fakeStreamer);
$provide.value('annotations', fakeAnnotations);
$provide.value('annotationsService', fakeAnnotations);
$provide.value('settings', fakeSettings);
});
});
......
......@@ -252,7 +252,7 @@ function startAngularApp(config) {
.service('analytics', analyticsService)
.service('annotationMapper', annotationMapperService)
.service('annotations', annotationsService)
.service('annotationsService', annotationsService)
.service('api', apiService)
.service('apiRoutes', apiRoutesService)
.service('auth', authService)
......
import SearchClient from '../search-client';
// @ngInject
export default function annotations(
export default function annotationsService(
annotationMapper,
api,
store,
......
import EventEmitter from 'tiny-emitter';
import annotations from '../annotations';
import annotationsService from '../annotations';
import { $imports } from '../annotations';
let searchClients;
......@@ -29,7 +29,7 @@ class FakeSearchClient extends EventEmitter {
}
}
describe('annotations', () => {
describe('annotationService', () => {
let fakeStore;
let fakeApi;
let fakeAnnotationMapper;
......@@ -90,7 +90,7 @@ describe('annotations', () => {
return { uri: uri };
})
);
return annotations(
return annotationsService(
fakeAnnotationMapper,
fakeApi,
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