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
b37eb36d
Commit
b37eb36d
authored
Apr 09, 2021
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Zen Mode support to Issuable Show
Adds support for Zen Mode in `issuable_show` app
parent
73dbd818
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
0 deletions
+35
-0
app/assets/javascripts/issuable_show/components/issuable_body.vue
...ts/javascripts/issuable_show/components/issuable_body.vue
+5
-0
app/assets/javascripts/issuable_show/components/issuable_edit_form.vue
...vascripts/issuable_show/components/issuable_edit_form.vue
+8
-0
app/assets/javascripts/issuable_show/components/issuable_show_root.vue
...vascripts/issuable_show/components/issuable_show_root.vue
+6
-0
ee/app/assets/javascripts/requirements/components/requirement_form.vue
.../javascripts/requirements/components/requirement_form.vue
+1
-0
ee/changelogs/unreleased/kp-add-zen-mode-support-issuable-show.yml
...logs/unreleased/kp-add-zen-mode-support-issuable-show.yml
+5
-0
ee/spec/features/projects/quality/test_case_show_spec.rb
ee/spec/features/projects/quality/test_case_show_spec.rb
+9
-0
spec/frontend/issuable_show/mock_data.js
spec/frontend/issuable_show/mock_data.js
+1
-0
No files found.
app/assets/javascripts/issuable_show/components/issuable_body.vue
View file @
b37eb36d
...
@@ -42,6 +42,10 @@ export default {
...
@@ -42,6 +42,10 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
required
:
true
,
required
:
true
,
},
},
enableZenMode
:
{
type
:
Boolean
,
required
:
true
,
},
enableTaskList
:
{
enableTaskList
:
{
type
:
Boolean
,
type
:
Boolean
,
required
:
false
,
required
:
false
,
...
@@ -144,6 +148,7 @@ export default {
...
@@ -144,6 +148,7 @@ export default {
:issuable=
"issuable"
:issuable=
"issuable"
:enable-autocomplete=
"enableAutocomplete"
:enable-autocomplete=
"enableAutocomplete"
:enable-autosave=
"enableAutosave"
:enable-autosave=
"enableAutosave"
:enable-zen-mode=
"enableZenMode"
:show-field-title=
"showFieldTitle"
:show-field-title=
"showFieldTitle"
:description-preview-path=
"descriptionPreviewPath"
:description-preview-path=
"descriptionPreviewPath"
:description-help-path=
"descriptionHelpPath"
:description-help-path=
"descriptionHelpPath"
...
...
app/assets/javascripts/issuable_show/components/issuable_edit_form.vue
View file @
b37eb36d
...
@@ -4,6 +4,7 @@ import $ from 'jquery';
...
@@ -4,6 +4,7 @@ import $ from 'jquery';
import
Autosave
from
'
~/autosave
'
;
import
Autosave
from
'
~/autosave
'
;
import
MarkdownField
from
'
~/vue_shared/components/markdown/field.vue
'
;
import
MarkdownField
from
'
~/vue_shared/components/markdown/field.vue
'
;
import
ZenMode
from
'
~/zen_mode
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
...
@@ -27,6 +28,10 @@ export default {
...
@@ -27,6 +28,10 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
required
:
true
,
required
:
true
,
},
},
enableZenMode
:
{
type
:
Boolean
,
required
:
true
,
},
showFieldTitle
:
{
showFieldTitle
:
{
type
:
Boolean
,
type
:
Boolean
,
required
:
true
,
required
:
true
,
...
@@ -62,6 +67,9 @@ export default {
...
@@ -62,6 +67,9 @@ export default {
},
},
mounted
()
{
mounted
()
{
if
(
this
.
enableAutosave
)
this
.
initAutosave
();
if
(
this
.
enableAutosave
)
this
.
initAutosave
();
// eslint-disable-next-line no-new
if
(
this
.
enableZenMode
)
new
ZenMode
();
},
},
beforeDestroy
()
{
beforeDestroy
()
{
eventHub
.
$off
(
'
update.issuable
'
,
this
.
resetAutosave
);
eventHub
.
$off
(
'
update.issuable
'
,
this
.
resetAutosave
);
...
...
app/assets/javascripts/issuable_show/components/issuable_show_root.vue
View file @
b37eb36d
...
@@ -42,6 +42,11 @@ export default {
...
@@ -42,6 +42,11 @@ export default {
required
:
false
,
required
:
false
,
default
:
true
,
default
:
true
,
},
},
enableZenMode
:
{
type
:
Boolean
,
required
:
false
,
default
:
true
,
},
enableTaskList
:
{
enableTaskList
:
{
type
:
Boolean
,
type
:
Boolean
,
required
:
false
,
required
:
false
,
...
@@ -120,6 +125,7 @@ export default {
...
@@ -120,6 +125,7 @@ export default {
:enable-edit=
"enableEdit"
:enable-edit=
"enableEdit"
:enable-autocomplete=
"enableAutocomplete"
:enable-autocomplete=
"enableAutocomplete"
:enable-autosave=
"enableAutosave"
:enable-autosave=
"enableAutosave"
:enable-zen-mode=
"enableZenMode"
:enable-task-list=
"enableTaskList"
:enable-task-list=
"enableTaskList"
:edit-form-visible=
"editFormVisible"
:edit-form-visible=
"editFormVisible"
:show-field-title=
"showFieldTitle"
:show-field-title=
"showFieldTitle"
...
...
ee/app/assets/javascripts/requirements/components/requirement_form.vue
View file @
b37eb36d
...
@@ -250,6 +250,7 @@ export default {
...
@@ -250,6 +250,7 @@ export default {
:enable-edit=
"canEditRequirement"
:enable-edit=
"canEditRequirement"
:enable-autocomplete=
"false"
:enable-autocomplete=
"false"
:enable-autosave=
"false"
:enable-autosave=
"false"
:enable-zen-mode=
"false"
:edit-form-visible=
"enableRequirementEdit || isCreate"
:edit-form-visible=
"enableRequirementEdit || isCreate"
:show-field-title=
"true"
:show-field-title=
"true"
:description-preview-path=
"descriptionPreviewPath"
:description-preview-path=
"descriptionPreviewPath"
...
...
ee/changelogs/unreleased/kp-add-zen-mode-support-issuable-show.yml
0 → 100644
View file @
b37eb36d
---
title
:
Make Zen Mode functional while editing Test Case description
merge_request
:
58984
author
:
type
:
fixed
ee/spec/features/projects/quality/test_case_show_spec.rb
View file @
b37eb36d
...
@@ -72,6 +72,15 @@ RSpec.describe 'Test Cases', :js do
...
@@ -72,6 +72,15 @@ RSpec.describe 'Test Cases', :js do
end
end
end
end
it
'enters into zen mode when clicking on zen mode button'
do
page
.
within
(
'.test-case-container .issuable-details'
)
do
page
.
find
(
'.js-issuable-edit'
).
click
page
.
find
(
'.js-vue-markdown-field button.js-zen-enter'
).
click
expect
(
page
).
to
have_selector
(
'.zen-backdrop.fullscreen'
)
end
end
it
'update title and description'
do
it
'update title and description'
do
title
=
'Updated title'
title
=
'Updated title'
description
=
'Updated test case description.'
description
=
'Updated test case description.'
...
...
spec/frontend/issuable_show/mock_data.js
View file @
b37eb36d
...
@@ -32,6 +32,7 @@ export const mockIssuableShowProps = {
...
@@ -32,6 +32,7 @@ export const mockIssuableShowProps = {
editFormVisible
:
false
,
editFormVisible
:
false
,
enableAutocomplete
:
true
,
enableAutocomplete
:
true
,
enableAutosave
:
true
,
enableAutosave
:
true
,
enableZenMode
:
true
,
enableTaskList
:
true
,
enableTaskList
:
true
,
enableEdit
:
true
,
enableEdit
:
true
,
showFieldTitle
:
false
,
showFieldTitle
:
false
,
...
...
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