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
05333253
Commit
05333253
authored
Jun 29, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide `Focus mode` on issue boards
parent
c7eeceec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
0 deletions
+48
-0
app/assets/javascripts/boards/boards_bundle.js
app/assets/javascripts/boards/boards_bundle.js
+4
-0
app/helpers/boards_helper.rb
app/helpers/boards_helper.rb
+2
-0
app/helpers/ee/boards_helper.rb
app/helpers/ee/boards_helper.rb
+7
-0
spec/features/boards/ee/boards_spec.rb
spec/features/boards/ee/boards_spec.rb
+35
-0
No files found.
app/assets/javascripts/boards/boards_bundle.js
View file @
05333253
...
...
@@ -141,6 +141,7 @@ $(() => {
modal
:
ModalStore
.
store
,
store
:
Store
.
state
,
isFullscreen
:
false
,
focusModeAvailable
:
gl
.
utils
.
convertPermissionToBoolean
(
$boardApp
.
dataset
.
focusModeAvailable
),
},
watch
:
{
disabled
()
{
...
...
@@ -177,6 +178,8 @@ $(() => {
}
},
toggleFocusMode
()
{
if
(
!
this
.
focusModeAvailable
)
{
return
;
}
$
(
this
.
$refs
.
toggleFocusModeButton
).
tooltip
(
'
hide
'
);
issueBoardsContent
.
classList
.
toggle
(
'
is-focused
'
);
...
...
@@ -206,6 +209,7 @@ $(() => {
aria-label="Toggle focus mode"
title="Toggle focus mode"
ref="toggleFocusModeButton"
v-if="focusModeAvailable"
@click="toggleFocusMode">
<span v-show="isFullscreen">
${
collapseIcon
}
...
...
app/helpers/boards_helper.rb
View file @
05333253
module
BoardsHelper
prepend
EE
::
BoardsHelper
def
board_data
board
=
@board
||
@boards
.
first
...
...
app/helpers/ee/boards_helper.rb
0 → 100644
View file @
05333253
module
EE
module
BoardsHelper
def
board_data
super
.
merge
(
focus_mode_available:
@project
.
feature_available?
(
:issue_board_focus_mode
).
to_s
)
end
end
end
spec/features/boards/ee/boards_spec.rb
0 → 100644
View file @
05333253
require
'spec_helper'
describe
'issue boards'
,
feature:
true
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let!
(
:board
)
{
create
(
:board
,
project:
project
)
}
before
do
project
.
add_developer
(
user
)
login_as
(
user
)
end
context
'issue board focus mode'
do
it
'shows the button when the feature is enabled'
do
stub_licensed_features
(
issue_board_focus_mode:
true
)
visit_board_page
expect
(
page
).
to
have_link
(
'Toggle focus mode'
)
end
it
'hides the button when the feature is enabled'
do
stub_licensed_features
(
issue_board_focus_mode:
false
)
visit_board_page
expect
(
page
).
not_to
have_link
(
'Toggle focus mode'
)
end
end
def
visit_board_page
visit
namespace_project_boards_path
(
project
.
namespace
,
project
)
wait_for_requests
end
end
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