Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
ec8d9ce4
Commit
ec8d9ce4
authored
Jun 06, 2019
by
Lyza Danger Gardner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused/old `sort-dropdown` component
parent
9e441d21
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
62 deletions
+1
-62
hypothesis-app.js
src/sidebar/components/hypothesis-app.js
+0
-10
sort-dropdown.js
src/sidebar/components/sort-dropdown.js
+0
-15
sort-dropdown-test.js
src/sidebar/components/test/sort-dropdown-test.js
+0
-32
index.js
src/sidebar/index.js
+0
-1
hypothesis-app.html
src/sidebar/templates/hypothesis-app.html
+1
-4
No files found.
src/sidebar/components/hypothesis-app.js
View file @
ec8d9ce4
...
...
@@ -73,16 +73,6 @@ function HypothesisAppController(
frameSync
.
connect
();
}
this
.
sortKey
=
function
()
{
return
store
.
getState
().
sortKey
;
};
this
.
sortKeysAvailable
=
function
()
{
return
store
.
getState
().
sortKeysAvailable
;
};
this
.
setSortKey
=
store
.
setSortKey
;
// Reload the view when the user switches accounts
$scope
.
$on
(
events
.
USER_CHANGED
,
function
(
event
,
data
)
{
self
.
auth
=
authStateFromProfile
(
data
.
profile
);
...
...
src/sidebar/components/sort-dropdown.js
deleted
100644 → 0
View file @
9e441d21
'use strict'
;
module
.
exports
=
{
controllerAs
:
'vm'
,
controller
:
function
()
{},
bindings
:
{
/** The name of the currently selected sort key. */
sortKey
:
'<'
,
/** A list of possible keys that the user can opt to sort by. */
sortKeysAvailable
:
'<'
,
/** Called when the user changes the sort key. */
onChangeSortKey
:
'&'
,
},
template
:
require
(
'../templates/sort-dropdown.html'
),
};
src/sidebar/components/test/sort-dropdown-test.js
deleted
100644 → 0
View file @
9e441d21
'use strict'
;
const
angular
=
require
(
'angular'
);
const
util
=
require
(
'../../directive/test/util'
);
describe
(
'sortDropdown'
,
function
()
{
before
(
function
()
{
angular
.
module
(
'app'
,
[])
.
component
(
'sortDropdown'
,
require
(
'../sort-dropdown'
));
});
beforeEach
(
function
()
{
angular
.
mock
.
module
(
'app'
);
});
it
(
'should update the sort key on click'
,
function
()
{
const
changeSpy
=
sinon
.
spy
();
const
elem
=
util
.
createDirective
(
document
,
'sortDropdown'
,
{
sortKeysAvailable
:
[
'Newest'
,
'Oldest'
],
sortKey
:
'Newest'
,
onChangeSortKey
:
{
args
:
[
'sortKey'
],
callback
:
changeSpy
,
},
});
const
links
=
elem
.
find
(
'li'
);
angular
.
element
(
links
[
0
]).
click
();
assert
.
calledWith
(
changeSpy
,
'Newest'
);
});
});
src/sidebar/index.js
View file @
ec8d9ce4
...
...
@@ -184,7 +184,6 @@ function startAngularApp(config) {
)
.
component
(
'sidebarTutorial'
,
require
(
'./components/sidebar-tutorial'
))
.
component
(
'shareDialog'
,
require
(
'./components/share-dialog'
))
.
component
(
'sortDropdown'
,
require
(
'./components/sort-dropdown'
))
.
component
(
'sortMenu'
,
wrapReactComponent
(
require
(
'./components/sort-menu'
))
...
...
src/sidebar/templates/hypothesis-app.html
View file @
ec8d9ce4
...
...
@@ -9,10 +9,7 @@
is-sidebar=
"::vm.isSidebar"
pending-update-count=
"vm.countPendingUpdates()"
on-apply-pending-updates=
"vm.applyPendingUpdates()"
search-controller=
"vm.search"
sort-key=
"vm.sortKey()"
sort-keys-available=
"vm.sortKeysAvailable()"
on-change-sort-key=
"vm.setSortKey(sortKey)"
>
search-controller=
"vm.search"
>
</top-bar>
<div
class=
"content"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment