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
9e441d21
Commit
9e441d21
authored
Jun 06, 2019
by
Lyza Danger Gardner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace `sort-dropdown` with `SortMenu` in `top-bar` component
parent
617ebe4b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
30 deletions
+1
-30
top-bar-test.js
src/sidebar/components/test/top-bar-test.js
+0
-22
top-bar.js
src/sidebar/components/top-bar.js
+0
-3
top-bar.html
src/sidebar/templates/top-bar.html
+1
-5
No files found.
src/sidebar/components/test/top-bar-test.js
View file @
9e441d21
...
...
@@ -18,9 +18,6 @@ describe('topBar', function() {
})
.
component
(
'searchInput'
,
{
bindings
:
require
(
'../search-input'
).
bindings
,
})
.
component
(
'sortDropdown'
,
{
bindings
:
require
(
'../sort-dropdown'
).
bindings
,
});
});
...
...
@@ -160,25 +157,6 @@ describe('topBar', function() {
assert
.
calledWith
(
onSearch
,
'new-query'
);
});
it
(
'displays the sort dropdown and propagates sort key changes'
,
function
()
{
const
onChangeSortKey
=
sinon
.
stub
();
const
el
=
createTopBar
({
sortKeysAvailable
:
[
'Newest'
,
'Oldest'
],
sortKey
:
'Newest'
,
onChangeSortKey
:
{
args
:
[
'sortKey'
],
callback
:
onChangeSortKey
,
},
});
const
sortDropdown
=
el
.
find
(
'sort-dropdown'
).
controller
(
'sortDropdown'
);
assert
.
deepEqual
(
sortDropdown
.
sortKeysAvailable
,
[
'Newest'
,
'Oldest'
]);
assert
.
deepEqual
(
sortDropdown
.
sortKey
,
'Newest'
);
sortDropdown
.
onChangeSortKey
({
sortKey
:
'Oldest'
});
assert
.
calledWith
(
onChangeSortKey
,
'Oldest'
);
});
it
(
'shows the clean theme when settings contains the clean theme option'
,
function
()
{
angular
.
mock
.
module
(
'app'
,
{
settings
:
{
theme
:
'clean'
},
...
...
src/sidebar/components/top-bar.js
View file @
9e441d21
...
...
@@ -25,9 +25,6 @@ module.exports = {
onSharePage
:
'&'
,
onSignUp
:
'&'
,
searchController
:
'<'
,
sortKey
:
'<'
,
sortKeysAvailable
:
'<'
,
onChangeSortKey
:
'&'
,
pendingUpdateCount
:
'<'
,
onApplyPendingUpdates
:
'&'
,
},
...
...
src/sidebar/templates/top-bar.html
View file @
9e441d21
...
...
@@ -41,11 +41,7 @@
on-search=
"vm.searchController.update($query)"
title=
"Filter the annotation list"
>
</search-input>
<sort-dropdown
sort-keys-available=
"vm.sortKeysAvailable"
sort-key=
"vm.sortKey"
on-change-sort-key=
"vm.onChangeSortKey({sortKey: sortKey})"
>
</sort-dropdown>
<sort-menu></sort-menu>
<button
class=
"top-bar__btn"
ng-click=
"vm.onSharePage()"
ng-if=
"vm.showSharePageButton()"
...
...
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