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
8bd0146b
Commit
8bd0146b
authored
Apr 08, 2020
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move issue board focus mode into Core
to be avilable for everyone
parent
f59106fc
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
90 additions
and
96 deletions
+90
-96
app/assets/javascripts/boards/icons/fullscreen_collapse.svg
app/assets/javascripts/boards/icons/fullscreen_collapse.svg
+0
-0
app/assets/javascripts/boards/icons/fullscreen_expand.svg
app/assets/javascripts/boards/icons/fullscreen_expand.svg
+0
-0
app/assets/javascripts/boards/index.js
app/assets/javascripts/boards/index.js
+3
-3
app/assets/javascripts/boards/toggle_focus.js
app/assets/javascripts/boards/toggle_focus.js
+45
-1
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+24
-0
changelogs/unreleased/212331-move-features-to-core-issue-board-focus-mode.yml
...d/212331-move-features-to-core-issue-board-focus-mode.yml
+5
-0
ee/app/assets/javascripts/boards/ee_functions.js
ee/app/assets/javascripts/boards/ee_functions.js
+1
-2
ee/app/assets/javascripts/boards/toggle_focus.js
ee/app/assets/javascripts/boards/toggle_focus.js
+0
-51
ee/app/assets/stylesheets/pages/boards.scss
ee/app/assets/stylesheets/pages/boards.scss
+0
-24
ee/app/helpers/ee/boards_helper.rb
ee/app/helpers/ee/boards_helper.rb
+0
-1
ee/spec/features/boards/boards_spec.rb
ee/spec/features/boards/boards_spec.rb
+0
-13
qa/qa/specs/features/browser_ui/2_plan/issue_boards/focus_mode_spec.rb
...eatures/browser_ui/2_plan/issue_boards/focus_mode_spec.rb
+0
-0
spec/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+11
-0
spec/features/boards/focus_mode_spec.rb
spec/features/boards/focus_mode_spec.rb
+1
-1
No files found.
ee/
app/assets/javascripts/boards/icons/fullscreen_collapse.svg
→
app/assets/javascripts/boards/icons/fullscreen_collapse.svg
View file @
8bd0146b
File moved
ee/
app/assets/javascripts/boards/icons/fullscreen_expand.svg
→
app/assets/javascripts/boards/icons/fullscreen_expand.svg
View file @
8bd0146b
File moved
app/assets/javascripts/boards/index.js
View file @
8bd0146b
...
...
@@ -6,7 +6,6 @@ import 'ee_else_ce/boards/models/list';
import
BoardSidebar
from
'
ee_else_ce/boards/components/board_sidebar
'
;
import
initNewListDropdown
from
'
ee_else_ce/boards/components/new_list_dropdown
'
;
import
boardConfigToggle
from
'
ee_else_ce/boards/config_toggle
'
;
import
toggleFocusMode
from
'
ee_else_ce/boards/toggle_focus
'
;
import
toggleLabels
from
'
ee_else_ce/boards/toggle_labels
'
;
import
{
setPromotionState
,
...
...
@@ -24,6 +23,7 @@ import './models/label';
import
'
./models/assignee
'
;
import
{
BoardType
}
from
'
./constants
'
;
import
toggleFocusMode
from
'
~/boards/toggle_focus
'
;
import
FilteredSearchBoards
from
'
~/boards/filtered_search_boards
'
;
import
eventHub
from
'
~/boards/eventhub
'
;
import
sidebarEventHub
from
'
~/sidebar/event_hub
'
;
...
...
@@ -305,7 +305,7 @@ export default () => {
return
{
modal
:
ModalStore
.
store
,
store
:
boardsStore
.
state
,
...
getBoardsModalData
(
$boardApp
),
...
getBoardsModalData
(),
canAdminList
:
this
.
$options
.
el
.
hasAttribute
(
'
data-can-admin-list
'
),
};
},
...
...
@@ -369,7 +369,7 @@ export default () => {
});
}
toggleFocusMode
(
ModalStore
,
boardsStore
,
$boardApp
);
toggleFocusMode
(
ModalStore
,
boardsStore
);
toggleLabels
();
mountMultipleBoardsSwitcher
();
};
app/assets/javascripts/boards/toggle_focus.js
View file @
8bd0146b
export
default
()
=>
{};
import
$
from
'
jquery
'
;
import
Vue
from
'
vue
'
;
import
collapseIcon
from
'
./icons/fullscreen_collapse.svg
'
;
import
expandIcon
from
'
./icons/fullscreen_expand.svg
'
;
export
default
(
ModalStore
,
boardsStore
)
=>
{
const
issueBoardsContent
=
document
.
querySelector
(
'
.content-wrapper > .js-focus-mode-board
'
);
return
new
Vue
({
el
:
document
.
getElementById
(
'
js-toggle-focus-btn
'
),
data
:
{
modal
:
ModalStore
.
store
,
store
:
boardsStore
.
state
,
isFullscreen
:
false
,
},
methods
:
{
toggleFocusMode
()
{
$
(
this
.
$refs
.
toggleFocusModeButton
).
tooltip
(
'
hide
'
);
issueBoardsContent
.
classList
.
toggle
(
'
is-focused
'
);
this
.
isFullscreen
=
!
this
.
isFullscreen
;
},
},
template
:
`
<div class="board-extra-actions">
<a
href="#"
class="btn btn-default has-tooltip prepend-left-10 js-focus-mode-btn"
data-qa-selector="focus_mode_button"
role="button"
aria-label="Toggle focus mode"
title="Toggle focus mode"
ref="toggleFocusModeButton"
@click="toggleFocusMode">
<span v-show="isFullscreen">
${
collapseIcon
}
</span>
<span v-show="!isFullscreen">
${
expandIcon
}
</span>
</a>
</div>
`
,
});
};
app/assets/stylesheets/pages/boards.scss
View file @
8bd0146b
...
...
@@ -548,3 +548,27 @@
*/
height
:
$input-height
;
}
.issue-boards-content.is-focused
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
top
:
0
;
left
:
0
;
background
:
$white
;
z-index
:
9000
;
@include
media-breakpoint-down
(
sm
)
{
padding-top
:
10px
;
}
.boards-list
{
height
:
calc
(
100vh
-
#{
$issue-boards-filter-height
}
);
overflow-x
:
scroll
;
}
.issue-boards-sidebar
{
height
:
100%
;
top
:
0
;
}
}
changelogs/unreleased/212331-move-features-to-core-issue-board-focus-mode.yml
0 → 100644
View file @
8bd0146b
---
title
:
Moved issue board focus mode to Core and available for for everyone
merge_request
:
29200
author
:
type
:
added
ee/app/assets/javascripts/boards/ee_functions.js
View file @
8bd0146b
...
...
@@ -13,7 +13,6 @@ export const getMilestoneTitle = $boardApp => ({
milestoneTitle
:
$boardApp
.
dataset
.
boardMilestoneTitle
,
});
export
const
getBoardsModalData
=
$boardApp
=>
({
export
const
getBoardsModalData
=
()
=>
({
isFullscreen
:
false
,
focusModeAvailable
:
$boardApp
.
hasAttribute
(
'
data-focus-mode-available
'
),
});
ee/app/assets/javascripts/boards/toggle_focus.js
deleted
100644 → 0
View file @
f59106fc
import
$
from
'
jquery
'
;
import
Vue
from
'
vue
'
;
import
collapseIcon
from
'
ee/boards/icons/fullscreen_collapse.svg
'
;
import
expandIcon
from
'
ee/boards/icons/fullscreen_expand.svg
'
;
export
default
(
ModalStore
,
boardsStore
,
$boardApp
)
=>
{
const
issueBoardsContent
=
document
.
querySelector
(
'
.content-wrapper > .js-focus-mode-board
'
);
return
new
Vue
({
el
:
document
.
getElementById
(
'
js-toggle-focus-btn
'
),
data
:
{
modal
:
ModalStore
.
store
,
store
:
boardsStore
.
state
,
isFullscreen
:
false
,
focusModeAvailable
:
$boardApp
.
hasAttribute
(
'
data-focus-mode-available
'
),
},
methods
:
{
toggleFocusMode
()
{
if
(
!
this
.
focusModeAvailable
)
{
return
;
}
$
(
this
.
$refs
.
toggleFocusModeButton
).
tooltip
(
'
hide
'
);
issueBoardsContent
.
classList
.
toggle
(
'
is-focused
'
);
this
.
isFullscreen
=
!
this
.
isFullscreen
;
},
},
template
:
`
<div class="board-extra-actions">
<a
href="#"
class="btn btn-default has-tooltip prepend-left-10 js-focus-mode-btn"
data-qa-selector="focus_mode_button"
role="button"
aria-label="Toggle focus mode"
title="Toggle focus mode"
ref="toggleFocusModeButton"
v-if="focusModeAvailable"
@click="toggleFocusMode">
<span v-show="isFullscreen">
${
collapseIcon
}
</span>
<span v-show="!isFullscreen">
${
expandIcon
}
</span>
</a>
</div>
`
,
});
};
ee/app/assets/stylesheets/pages/boards.scss
View file @
8bd0146b
...
...
@@ -84,30 +84,6 @@
}
}
.issue-boards-content.is-focused
{
position
:
fixed
;
width
:
100%
;
height
:
100%
;
top
:
0
;
left
:
0
;
background
:
$white
;
z-index
:
9000
;
@include
media-breakpoint-down
(
sm
)
{
padding-top
:
10px
;
}
.boards-list
{
height
:
calc
(
100vh
-
#{
$issue-boards-filter-height
}
);
overflow-x
:
scroll
;
}
.issue-boards-sidebar
{
height
:
100%
;
top
:
0
;
}
}
.form-section-title
{
font-size
:
16px
;
...
...
ee/app/helpers/ee/boards_helper.rb
View file @
8bd0146b
...
...
@@ -22,7 +22,6 @@ module EE
label_ids:
board
.
label_ids
,
labels:
board
.
labels
.
to_json
(
only:
[
:id
,
:title
,
:color
,
:text_color
]
),
board_weight:
board
.
weight
,
focus_mode_available:
true
,
weight_feature_available:
current_board_parent
.
feature_available?
(
:issue_weights
).
to_s
,
show_promotion:
show_feature_promotion
,
scoped_labels:
current_board_parent
.
feature_available?
(
:scoped_labels
)
&
.
to_s
...
...
ee/spec/features/boards/boards_spec.rb
View file @
8bd0146b
...
...
@@ -11,19 +11,6 @@ describe 'issue boards', :js do
let
(
:milestone
)
{
create
(
:milestone
,
title:
"v2.2"
,
project:
project
)
}
let!
(
:board_with_milestone
)
{
create
(
:board
,
project:
project
,
milestone:
milestone
)
}
context
'issue board focus mode'
do
before
do
project
.
add_developer
(
user
)
login_as
(
user
)
end
it
'shows the button'
do
visit_board_page
expect
(
page
).
to
have_link
(
'Toggle focus mode'
)
end
end
context
'with group and reporter'
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
...
...
qa/qa/specs/features/
ee/
browser_ui/2_plan/issue_boards/focus_mode_spec.rb
→
qa/qa/specs/features/browser_ui/2_plan/issue_boards/focus_mode_spec.rb
View file @
8bd0146b
File moved
spec/features/boards/boards_spec.rb
View file @
8bd0146b
...
...
@@ -549,6 +549,17 @@ describe 'Issue Boards', :js do
end
end
context
'issue board focus mode'
do
before
do
visit
project_board_path
(
project
,
board
)
wait_for_requests
end
it
'shows the button'
do
expect
(
page
).
to
have_link
(
'Toggle focus mode'
)
end
end
context
'keyboard shortcuts'
do
before
do
visit
project_board_path
(
project
,
board
)
...
...
ee/
spec/features/boards/focus_mode_spec.rb
→
spec/features/boards/focus_mode_spec.rb
View file @
8bd0146b
...
...
@@ -11,7 +11,7 @@ describe 'Issue Boards focus mode', :js do
wait_for_requests
end
it
"shows focus mode button to guest users"
do
it
'shows focus mode button to guest users'
do
expect
(
page
).
to
have_selector
(
'.board-extra-actions .js-focus-mode-btn'
)
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