BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6bf4a06e
Commit
6bf4a06e
authored
Aug 10, 2017
by
Eric Eastwood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove overflow tabs logic (no longer used)
Fix
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12198#note_37143794
parent
15f37411
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
26 deletions
+3
-26
repo_tabs.vue
app/assets/javascripts/repo/components/repo_tabs.vue
+3
-14
repo_store.js
app/assets/javascripts/repo/stores/repo_store.js
+0
-1
repo_tabs_spec.js
spec/javascripts/repo/components/repo_tabs_spec.js
+0
-11
No files found.
app/assets/javascripts/repo/components/repo_tabs.vue
View file @
6bf4a06e
<
script
>
import
Vue
from
'vue'
;
import
Store
from
'../stores/repo_store'
;
import
RepoTab
from
'./repo_tab.vue'
;
import
RepoMixin
from
'../mixins/repo_mixin'
;
...
...
@@ -14,29 +13,19 @@ const RepoTabs = {
data
:
()
=>
Store
,
methods
:
{
isOverflow
()
{
return
this
.
$el
.
scrollWidth
>
this
.
$el
.
offsetWidth
;
},
xClicked
(
file
)
{
Store
.
removeFromOpenedFiles
(
file
);
},
},
watch
:
{
openedFiles
()
{
Vue
.
nextTick
(()
=>
{
this
.
tabsOverflow
=
this
.
isOverflow
();
});
},
},
};
export
default
RepoTabs
;
</
script
>
<
template
>
<ul
id=
"tabs"
v-if=
"isMini"
v-cloak
:class=
"
{'overflown': tabsOverflow}">
<ul
v-if=
"isMini"
id=
"tabs"
>
<repo-tab
v-for=
"tab in openedFiles"
:key=
"tab.id"
:tab=
"tab"
:class=
"
{'active' : tab.active}" @xclicked="xClicked"/>
<li
class=
"tabs-divider"
/>
</ul>
...
...
app/assets/javascripts/repo/stores/repo_store.js
View file @
6bf4a06e
...
...
@@ -27,7 +27,6 @@ const RepoStore = {
tabSize
:
100
,
defaultTabSize
:
100
,
minTabSize
:
30
,
tabsOverflow
:
41
,
submitCommitsLoading
:
false
,
binaryLoaded
:
false
,
dialog
:
{
...
...
spec/javascripts/repo/components/repo_tabs_spec.js
View file @
6bf4a06e
...
...
@@ -18,13 +18,11 @@ describe('RepoTabs', () => {
it
(
'renders a list of tabs'
,
()
=>
{
RepoStore
.
openedFiles
=
openedFiles
;
RepoStore
.
tabsOverflow
=
true
;
const
vm
=
createComponent
();
const
tabs
=
[...
vm
.
$el
.
querySelectorAll
(
':scope > li'
)];
expect
(
vm
.
$el
.
id
).
toEqual
(
'tabs'
);
expect
(
vm
.
$el
.
classList
.
contains
(
'overflown'
)).
toBeTruthy
();
expect
(
tabs
.
length
).
toEqual
(
3
);
expect
(
tabs
[
0
].
classList
.
contains
(
'active'
)).
toBeTruthy
();
expect
(
tabs
[
1
].
classList
.
contains
(
'active'
)).
toBeFalsy
();
...
...
@@ -39,15 +37,6 @@ describe('RepoTabs', () => {
expect
(
vm
.
$el
.
innerHTML
).
toBeFalsy
();
});
it
(
'does not apply overflown class if not tabsOverflow'
,
()
=>
{
RepoStore
.
openedFiles
=
openedFiles
;
RepoStore
.
tabsOverflow
=
false
;
const
vm
=
createComponent
();
expect
(
vm
.
$el
.
classList
.
contains
(
'overflown'
)).
toBeFalsy
();
});
describe
(
'methods'
,
()
=>
{
describe
(
'xClicked'
,
()
=>
{
it
(
'calls removeFromOpenedFiles with file obj'
,
()
=>
{
...
...
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