Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cd0d76da
Commit
cd0d76da
authored
Jul 16, 2019
by
Winnie Hellmann
Committed by
Kushal Pandya
Jul 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support 0 weight in issue sidebar
parent
7f94e28f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
9 deletions
+26
-9
ee/app/assets/javascripts/sidebar/stores/sidebar_store.js
ee/app/assets/javascripts/sidebar/stores/sidebar_store.js
+2
-2
ee/changelogs/unreleased/winh-sidebar-weight-0-ee.yml
ee/changelogs/unreleased/winh-sidebar-weight-0-ee.yml
+5
-0
ee/spec/frontend/sidebar/ee_sidebar_store_spec.js
ee/spec/frontend/sidebar/ee_sidebar_store_spec.js
+19
-7
No files found.
ee/app/assets/javascripts/sidebar/stores/sidebar_store.js
View file @
cd0d76da
...
...
@@ -13,9 +13,9 @@ export default class SidebarStore extends CESidebarStore {
this
.
epic
=
{};
}
setWeightData
(
data
)
{
setWeightData
(
{
weight
}
)
{
this
.
isFetching
.
weight
=
false
;
this
.
weight
=
data
.
weight
||
null
;
this
.
weight
=
typeof
weight
===
'
number
'
?
Number
(
weight
)
:
null
;
}
setWeight
(
newWeight
)
{
...
...
ee/changelogs/unreleased/winh-sidebar-weight-0-ee.yml
0 → 100644
View file @
cd0d76da
---
title
:
Support 0 weight in issue sidebar
merge_request
:
14683
author
:
type
:
fixed
ee/spec/frontend/sidebar/ee_sidebar_store_spec.js
View file @
cd0d76da
...
...
@@ -17,16 +17,28 @@ describe('EE Sidebar store', () => {
CESidebarStore
.
singleton
=
null
;
});
it
(
'
sets weight data
'
,
()
=>
{
expect
(
store
.
weight
).
toEqual
(
null
);
describe
(
'
setWeightData
'
,
()
=>
{
beforeEach
(()
=>
{
expect
(
store
.
weight
).
toEqual
(
null
);
});
it
(
'
sets weight data
'
,
()
=>
{
const
weight
=
3
;
store
.
setWeightData
({
weight
,
});
const
weight
=
3
;
store
.
setWeightData
({
weight
,
expect
(
store
.
isFetching
.
weight
).
toEqual
(
false
);
expect
(
store
.
weight
).
toEqual
(
weight
);
});
expect
(
store
.
isFetching
.
weight
).
toEqual
(
false
);
expect
(
store
.
weight
).
toEqual
(
weight
);
it
(
'
supports 0 weight
'
,
()
=>
{
store
.
setWeightData
({
weight
:
0
,
});
expect
(
store
.
weight
).
toBe
(
0
);
});
});
it
(
'
set weight
'
,
()
=>
{
...
...
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