Unverified Commit b4953ce6 authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #1955 from hypothesis/remove-location-config

Remove $location service and annotation subcomponents from sidebar entry module
parents 56f8e90a 2b3101be
...@@ -53,12 +53,6 @@ const isSidebar = !( ...@@ -53,12 +53,6 @@ const isSidebar = !(
window.location.pathname.startsWith('/a/') window.location.pathname.startsWith('/a/')
); );
// @ngInject
function configureLocation($locationProvider) {
// Use HTML5 history
return $locationProvider.html5Mode(true);
}
// @ngInject // @ngInject
function configureToastr(toastrConfig) { function configureToastr(toastrConfig) {
angular.extend(toastrConfig, { angular.extend(toastrConfig, {
...@@ -113,12 +107,6 @@ function autosave(autosaveService) { ...@@ -113,12 +107,6 @@ function autosave(autosaveService) {
// Preact UI components that are wrapped for use within Angular templates. // Preact UI components that are wrapped for use within Angular templates.
import Annotation from './components/annotation'; import Annotation from './components/annotation';
import AnnotationActionBar from './components/annotation-action-bar';
import AnnotationBody from './components/annotation-body';
import AnnotationHeader from './components/annotation-header';
import AnnotationLicense from './components/annotation-license';
import AnnotationPublishControl from './components/annotation-publish-control';
import AnnotationQuote from './components/annotation-quote';
import FocusedModeHeader from './components/focused-mode-header'; import FocusedModeHeader from './components/focused-mode-header';
import HelpPanel from './components/help-panel'; import HelpPanel from './components/help-panel';
import LoggedOutMessage from './components/logged-out-message'; import LoggedOutMessage from './components/logged-out-message';
...@@ -129,8 +117,6 @@ import SelectionTabs from './components/selection-tabs'; ...@@ -129,8 +117,6 @@ import SelectionTabs from './components/selection-tabs';
import ShareAnnotationsPanel from './components/share-annotations-panel'; import ShareAnnotationsPanel from './components/share-annotations-panel';
import SidebarContentError from './components/sidebar-content-error'; import SidebarContentError from './components/sidebar-content-error';
import SvgIcon from './components/svg-icon'; import SvgIcon from './components/svg-icon';
import TagEditor from './components/tag-editor';
import TagList from './components/tag-list';
import ToastMessages from './components/toast-messages'; import ToastMessages from './components/toast-messages';
import TopBar from './components/top-bar'; import TopBar from './components/top-bar';
...@@ -231,10 +217,9 @@ function startAngularApp(config) { ...@@ -231,10 +217,9 @@ function startAngularApp(config) {
// constructed them. // constructed them.
// //
// @ngInject // @ngInject
function registerAngularServices($location, $rootScope, toastr) { function registerAngularServices($rootScope, toastr) {
container container
.register('toastr', { value: toastr }) .register('toastr', { value: toastr })
.register('$location', { value: $location })
.register('$rootScope', { value: $rootScope }); .register('$rootScope', { value: $rootScope });
} }
...@@ -248,15 +233,6 @@ function startAngularApp(config) { ...@@ -248,15 +233,6 @@ function startAngularApp(config) {
// UI components // UI components
.component('annotation', wrapComponent(Annotation)) .component('annotation', wrapComponent(Annotation))
.component('annotationBody', wrapComponent(AnnotationBody))
.component('annotationHeader', wrapComponent(AnnotationHeader))
.component('annotationActionBar', wrapComponent(AnnotationActionBar))
.component('annotationLicense', wrapComponent(AnnotationLicense))
.component(
'annotationPublishControl',
wrapComponent(AnnotationPublishControl)
)
.component('annotationQuote', wrapComponent(AnnotationQuote))
.component('annotationThread', annotationThread) .component('annotationThread', annotationThread)
.component('annotationViewerContent', annotationViewerContent) .component('annotationViewerContent', annotationViewerContent)
.component('helpPanel', wrapComponent(HelpPanel)) .component('helpPanel', wrapComponent(HelpPanel))
...@@ -271,8 +247,6 @@ function startAngularApp(config) { ...@@ -271,8 +247,6 @@ function startAngularApp(config) {
.component('shareAnnotationsPanel', wrapComponent(ShareAnnotationsPanel)) .component('shareAnnotationsPanel', wrapComponent(ShareAnnotationsPanel))
.component('streamContent', streamContent) .component('streamContent', streamContent)
.component('svgIcon', wrapComponent(SvgIcon)) .component('svgIcon', wrapComponent(SvgIcon))
.component('tagEditor', wrapComponent(TagEditor))
.component('tagList', wrapComponent(TagList))
.component('threadList', threadList) .component('threadList', threadList)
.component('toastMessages', wrapComponent(ToastMessages)) .component('toastMessages', wrapComponent(ToastMessages))
.component('topBar', wrapComponent(TopBar)) .component('topBar', wrapComponent(TopBar))
...@@ -310,7 +284,6 @@ function startAngularApp(config) { ...@@ -310,7 +284,6 @@ function startAngularApp(config) {
.value('isSidebar', container.get('isSidebar')) .value('isSidebar', container.get('isSidebar'))
.value('settings', container.get('settings')) .value('settings', container.get('settings'))
.config(configureLocation)
.config(configureToastr) .config(configureToastr)
// Make Angular built-ins available to services constructed by `container`. // Make Angular built-ins available to services constructed by `container`.
......
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