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
2a7bfacf
Commit
2a7bfacf
authored
May 03, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved success message after commit with new sidebar
parent
93f0eb07
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
54 additions
and
38 deletions
+54
-38
app/assets/javascripts/ide/components/activity_bar.vue
app/assets/javascripts/ide/components/activity_bar.vue
+2
-2
app/assets/javascripts/ide/components/commit_sidebar/actions.vue
...ets/javascripts/ide/components/commit_sidebar/actions.vue
+1
-1
app/assets/javascripts/ide/components/commit_sidebar/form.vue
...assets/javascripts/ide/components/commit_sidebar/form.vue
+3
-7
app/assets/javascripts/ide/components/commit_sidebar/success_message.vue
...scripts/ide/components/commit_sidebar/success_message.vue
+1
-7
app/assets/javascripts/ide/components/ide_side_bar.vue
app/assets/javascripts/ide/components/ide_side_bar.vue
+21
-2
app/assets/javascripts/ide/components/repo_commit_section.vue
...assets/javascripts/ide/components/repo_commit_section.vue
+1
-4
app/assets/javascripts/ide/components/repo_editor.vue
app/assets/javascripts/ide/components/repo_editor.vue
+1
-0
app/assets/javascripts/ide/stores/getters.js
app/assets/javascripts/ide/stores/getters.js
+4
-0
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+20
-15
No files found.
app/assets/javascripts/ide/components/activity_bar.vue
View file @
2a7bfacf
...
@@ -51,7 +51,7 @@ export default {
...
@@ -51,7 +51,7 @@ export default {
/>
/>
</button>
</button>
</li>
</li>
<li
v-show=
"hasChanges"
>
<li>
<button
<button
type=
"button"
type=
"button"
class=
"ide-sidebar-link js-ide-review-mode"
class=
"ide-sidebar-link js-ide-review-mode"
...
@@ -65,7 +65,7 @@ export default {
...
@@ -65,7 +65,7 @@ export default {
/>
/>
</button>
</button>
</li>
</li>
<li>
<li
v-show=
"hasChanges"
>
<button
<button
type=
"button"
type=
"button"
class=
"ide-sidebar-link js-ide-commit-mode"
class=
"ide-sidebar-link js-ide-commit-mode"
...
...
app/assets/javascripts/ide/components/commit_sidebar/actions.vue
View file @
2a7bfacf
<
script
>
<
script
>
import
{
map
Getters
,
map
State
}
from
'
vuex
'
;
import
{
mapState
}
from
'
vuex
'
;
import
{
sprintf
,
__
}
from
'
~/locale
'
;
import
{
sprintf
,
__
}
from
'
~/locale
'
;
import
*
as
consts
from
'
../../stores/modules/commit/constants
'
;
import
*
as
consts
from
'
../../stores/modules/commit/constants
'
;
import
RadioGroup
from
'
./radio_group.vue
'
;
import
RadioGroup
from
'
./radio_group.vue
'
;
...
...
app/assets/javascripts/ide/components/commit_sidebar/form.vue
View file @
2a7bfacf
...
@@ -21,13 +21,10 @@ export default {
...
@@ -21,13 +21,10 @@ export default {
};
};
},
},
computed
:
{
computed
:
{
...
mapState
([
'
lastCommitMsg
'
,
'
changedFiles
'
,
'
stagedFiles
'
,
'
currentActivityView
'
]),
...
mapState
([
'
changedFiles
'
,
'
stagedFiles
'
,
'
currentActivityView
'
,
'
lastCommitMsg
'
]),
...
mapState
(
'
commit
'
,
[
'
commitMessage
'
,
'
submitCommitLoading
'
]),
...
mapState
(
'
commit
'
,
[
'
commitMessage
'
,
'
submitCommitLoading
'
]),
...
mapGetters
([
'
hasChanges
'
]),
...
mapGetters
([
'
hasChanges
'
,
'
someUncommitedChanges
'
]),
...
mapGetters
(
'
commit
'
,
[
'
commitButtonDisabled
'
,
'
discardDraftButtonDisabled
'
]),
...
mapGetters
(
'
commit
'
,
[
'
commitButtonDisabled
'
,
'
discardDraftButtonDisabled
'
]),
someUncommitedChanges
()
{
return
!!
(
this
.
changedFiles
.
length
||
this
.
stagedFiles
.
length
);
},
overviewText
()
{
overviewText
()
{
return
sprintf
(
return
sprintf
(
__
(
__
(
...
@@ -126,8 +123,7 @@ export default {
...
@@ -126,8 +123,7 @@ export default {
ref=
"formEl"
ref=
"formEl"
>
>
<success-message
<success-message
v-if=
"lastCommitMsg && !someUncommitedChanges"
v-show=
"(lastCommitMsg && someUncommitedChanges)"
:committed-state-svg-path=
"committedStateSvgPath"
/>
/>
<commit-message-field
<commit-message-field
:text=
"commitMessage"
:text=
"commitMessage"
...
...
app/assets/javascripts/ide/components/commit_sidebar/success_message.vue
View file @
2a7bfacf
...
@@ -2,14 +2,8 @@
...
@@ -2,14 +2,8 @@
import
{
mapState
}
from
'
vuex
'
;
import
{
mapState
}
from
'
vuex
'
;
export
default
{
export
default
{
props
:
{
committedStateSvgPath
:
{
type
:
String
,
required
:
true
,
},
},
computed
:
{
computed
:
{
...
mapState
([
'
lastCommitMsg
'
]),
...
mapState
([
'
lastCommitMsg
'
,
'
committedStateSvgPath
'
]),
},
},
};
};
</
script
>
</
script
>
...
...
app/assets/javascripts/ide/components/ide_side_bar.vue
View file @
2a7bfacf
...
@@ -11,6 +11,8 @@ import ActivityBar from './activity_bar.vue';
...
@@ -11,6 +11,8 @@ import ActivityBar from './activity_bar.vue';
import
CommitSection
from
'
./repo_commit_section.vue
'
;
import
CommitSection
from
'
./repo_commit_section.vue
'
;
import
CommitForm
from
'
./commit_sidebar/form.vue
'
;
import
CommitForm
from
'
./commit_sidebar/form.vue
'
;
import
IdeReview
from
'
./ide_review.vue
'
;
import
IdeReview
from
'
./ide_review.vue
'
;
import
SuccessMessage
from
'
./commit_sidebar/success_message.vue
'
;
import
{
activityBarViews
}
from
'
../constants
'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -25,10 +27,24 @@ export default {
...
@@ -25,10 +27,24 @@ export default {
IdeTree
,
IdeTree
,
CommitForm
,
CommitForm
,
IdeReview
,
IdeReview
,
SuccessMessage
,
},
},
computed
:
{
computed
:
{
...
mapState
([
'
loading
'
,
'
currentBranchId
'
,
'
currentActivityView
'
]),
...
mapState
([
...
mapGetters
([
'
currentProject
'
]),
'
loading
'
,
'
currentBranchId
'
,
'
currentActivityView
'
,
'
changedFiles
'
,
'
stagedFiles
'
,
'
lastCommitMsg
'
,
]),
...
mapGetters
([
'
currentProject
'
,
'
someUncommitedChanges
'
]),
showSuccessMessage
()
{
return
(
this
.
currentActivityView
===
activityBarViews
.
edit
&&
(
this
.
lastCommitMsg
&&
!
this
.
someUncommitedChanges
)
);
},
},
},
};
};
</
script
>
</
script
>
...
@@ -96,6 +112,9 @@ export default {
...
@@ -96,6 +112,9 @@ export default {
/>
/>
</div>
</div>
<commit-form
/>
<commit-form
/>
<success-message
v-show=
"showSuccessMessage"
/>
</
template
>
</
template
>
</div>
</div>
</resizable-panel>
</resizable-panel>
...
...
app/assets/javascripts/ide/components/repo_commit_section.vue
View file @
2a7bfacf
...
@@ -27,14 +27,11 @@ export default {
...
@@ -27,14 +27,11 @@ export default {
'
unusedSeal
'
,
'
unusedSeal
'
,
]),
]),
...
mapState
(
'
commit
'
,
[
'
commitMessage
'
,
'
submitCommitLoading
'
]),
...
mapState
(
'
commit
'
,
[
'
commitMessage
'
,
'
submitCommitLoading
'
]),
...
mapGetters
([
'
lastOpenedFile
'
,
'
hasChanges
'
]),
...
mapGetters
([
'
lastOpenedFile
'
,
'
hasChanges
'
,
'
someUncommitedChanges
'
]),
...
mapGetters
(
'
commit
'
,
[
'
commitButtonDisabled
'
,
'
discardDraftButtonDisabled
'
]),
...
mapGetters
(
'
commit
'
,
[
'
commitButtonDisabled
'
,
'
discardDraftButtonDisabled
'
]),
showStageUnstageArea
()
{
showStageUnstageArea
()
{
return
!!
(
this
.
someUncommitedChanges
||
this
.
lastCommitMsg
||
!
this
.
unusedSeal
);
return
!!
(
this
.
someUncommitedChanges
||
this
.
lastCommitMsg
||
!
this
.
unusedSeal
);
},
},
someUncommitedChanges
()
{
return
!!
(
this
.
changedFiles
.
length
||
this
.
stagedFiles
.
length
);
},
},
},
watch
:
{
watch
:
{
hasChanges
()
{
hasChanges
()
{
...
...
app/assets/javascripts/ide/components/repo_editor.vue
View file @
2a7bfacf
...
@@ -26,6 +26,7 @@ export default {
...
@@ -26,6 +26,7 @@ export default {
'
getStagedFile
'
,
'
getStagedFile
'
,
'
isEditModeActive
'
,
'
isEditModeActive
'
,
'
isCommitModeActive
'
,
'
isCommitModeActive
'
,
'
isReviewModeActive
'
,
]),
]),
shouldHideEditor
()
{
shouldHideEditor
()
{
return
this
.
file
&&
this
.
file
.
binary
&&
!
this
.
file
.
content
;
return
this
.
file
&&
this
.
file
.
binary
&&
!
this
.
file
.
content
;
...
...
app/assets/javascripts/ide/stores/getters.js
View file @
2a7bfacf
...
@@ -59,6 +59,10 @@ export const lastOpenedFile = state =>
...
@@ -59,6 +59,10 @@ export const lastOpenedFile = state =>
export
const
isEditModeActive
=
state
=>
state
.
currentActivityView
===
activityBarViews
.
edit
;
export
const
isEditModeActive
=
state
=>
state
.
currentActivityView
===
activityBarViews
.
edit
;
export
const
isCommitModeActive
=
state
=>
state
.
currentActivityView
===
activityBarViews
.
commit
;
export
const
isCommitModeActive
=
state
=>
state
.
currentActivityView
===
activityBarViews
.
commit
;
export
const
isReviewModeActive
=
state
=>
state
.
currentActivityView
===
activityBarViews
.
review
;
export
const
someUncommitedChanges
=
state
=>
!!
(
state
.
changedFiles
.
length
||
state
.
stagedFiles
.
length
);
// prevent babel-plugin-rewire from generating an invalid default during karma tests
// prevent babel-plugin-rewire from generating an invalid default during karma tests
export
default
()
=>
{};
export
default
()
=>
{};
app/assets/stylesheets/pages/repo.scss
View file @
2a7bfacf
...
@@ -443,6 +443,7 @@
...
@@ -443,6 +443,7 @@
}
}
.multi-file-commit-panel-inner
{
.multi-file-commit-panel-inner
{
position
:
relative
;
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
height
:
100%
;
height
:
100%
;
...
@@ -485,7 +486,6 @@
...
@@ -485,7 +486,6 @@
margin-bottom
:
0
;
margin-bottom
:
0
;
border-bottom
:
1px
solid
$white-dark
;
border-bottom
:
1px
solid
$white-dark
;
padding
:
$gl-btn-padding
$gl-padding
;
padding
:
$gl-btn-padding
$gl-padding
;
min-height
:
56px
;
}
}
.multi-file-commit-panel-header-title
{
.multi-file-commit-panel-header-title
{
...
@@ -612,24 +612,14 @@
...
@@ -612,24 +612,14 @@
.btn
{
.btn
{
font-size
:
$gl-font-size
;
font-size
:
$gl-font-size
;
}
}
.multi-file-commit-panel-success-message
{
top
:
0
;
}
}
}
.multi-file-commit-panel-bottom
{
.multi-file-commit-panel-bottom
{
position
:
relative
;
position
:
relative
;
.multi-file-commit-panel-success-message
{
position
:
absolute
;
top
:
1px
;
left
:
3px
;
bottom
:
0
;
right
:
0
;
z-index
:
10
;
background
:
$gray-light
;
overflow
:
auto
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
}
}
}
.dirty-diff
{
.dirty-diff
{
...
@@ -870,6 +860,7 @@
...
@@ -870,6 +860,7 @@
.ide-activity-bar
{
.ide-activity-bar
{
position
:
relative
;
position
:
relative
;
flex
:
0
0
60px
;
flex
:
0
0
60px
;
z-index
:
1
;
}
}
.ide-file-finder-overlay
{
.ide-file-finder-overlay
{
...
@@ -1032,3 +1023,17 @@
...
@@ -1032,3 +1023,17 @@
.ide-new-modal-label
{
.ide-new-modal-label
{
line-height
:
34px
;
line-height
:
34px
;
}
}
.multi-file-commit-panel-success-message
{
position
:
absolute
;
top
:
61px
;
left
:
1px
;
bottom
:
0
;
right
:
0
;
z-index
:
10
;
background
:
$white-light
;
overflow
:
auto
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
}
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