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
072fd158
Commit
072fd158
authored
May 12, 2021
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable the improved emoji picker by default
parent
1762ca57
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
36 deletions
+25
-36
app/assets/javascripts/awards_handler.js
app/assets/javascripts/awards_handler.js
+0
-1
changelogs/unreleased/ph-enableImprovedEmojiPicker.yml
changelogs/unreleased/ph-enableImprovedEmojiPicker.yml
+5
-0
config/feature_flags/development/improved_emoji_picker.yml
config/feature_flags/development/improved_emoji_picker.yml
+1
-1
spec/features/issues/user_interacts_with_awards_spec.rb
spec/features/issues/user_interacts_with_awards_spec.rb
+19
-34
No files found.
app/assets/javascripts/awards_handler.js
View file @
072fd158
...
@@ -12,7 +12,6 @@ import axios from './lib/utils/axios_utils';
...
@@ -12,7 +12,6 @@ import axios from './lib/utils/axios_utils';
import
{
isInVueNoteablePage
}
from
'
./lib/utils/dom_utils
'
;
import
{
isInVueNoteablePage
}
from
'
./lib/utils/dom_utils
'
;
import
{
__
}
from
'
./locale
'
;
import
{
__
}
from
'
./locale
'
;
window
.
axios
=
axios
;
const
animationEndEventString
=
'
animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd
'
;
const
animationEndEventString
=
'
animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd
'
;
const
transitionEndEventString
=
'
transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd
'
;
const
transitionEndEventString
=
'
transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd
'
;
...
...
changelogs/unreleased/ph-enableImprovedEmojiPicker.yml
0 → 100644
View file @
072fd158
---
title
:
Improve UX of the award emoji picker
merge_request
:
author
:
type
:
added
config/feature_flags/development/improved_emoji_picker.yml
View file @
072fd158
...
@@ -5,4 +5,4 @@ rollout_issue_url:
...
@@ -5,4 +5,4 @@ rollout_issue_url:
milestone
:
'
13.9'
milestone
:
'
13.9'
type
:
development
type
:
development
group
:
group::code review
group
:
group::code review
default_enabled
:
fals
e
default_enabled
:
tru
e
spec/features/issues/user_interacts_with_awards_spec.rb
View file @
072fd158
...
@@ -5,10 +5,6 @@ require 'spec_helper'
...
@@ -5,10 +5,6 @@ require 'spec_helper'
RSpec
.
describe
'User interacts with awards'
do
RSpec
.
describe
'User interacts with awards'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
before
do
stub_feature_flags
(
improved_emoji_picker:
false
)
end
describe
'User interacts with awards in an issue'
,
:js
do
describe
'User interacts with awards in an issue'
,
:js
do
let
(
:issue
)
{
create
(
:issue
,
project:
project
)}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
)
}
...
@@ -55,29 +51,24 @@ RSpec.describe 'User interacts with awards' do
...
@@ -55,29 +51,24 @@ RSpec.describe 'User interacts with awards' do
it
'toggles a custom award emoji'
do
it
'toggles a custom award emoji'
do
page
.
within
(
'.awards'
)
do
page
.
within
(
'.awards'
)
do
page
.
find
(
'.
js-add-award
'
).
click
page
.
find
(
'.
add-reaction-button
'
).
click
end
end
page
.
find
(
'.emoji-menu.is-visible'
)
page
.
within
(
'.emoji-picker'
)
do
emoji_button
=
page
.
first
(
'gl-emoji[data-name="8ball"]'
)
expect
(
page
).
to
have_selector
(
'.js-emoji-menu-search'
)
expect
(
page
.
evaluate_script
(
"document.activeElement.classList.contains('js-emoji-menu-search')"
)).
to
eq
(
true
)
page
.
within
(
'.emoji-menu-content'
)
do
emoji_button
=
page
.
first
(
'.js-emoji-btn'
)
emoji_button
.
hover
emoji_button
.
hover
emoji_button
.
click
emoji_button
.
click
end
end
page
.
within
(
'.awards'
)
do
page
.
within
(
'.awards'
)
do
expect
(
page
).
to
have_selector
(
'
.js-emoji-btn
'
)
expect
(
page
).
to
have_selector
(
'
[data-testid="award-button"]
'
)
expect
(
page
.
find
(
'
.js-emoji-btn.
active .js-counter'
)).
to
have_content
(
'1'
)
expect
(
page
.
find
(
'
[data-testid="award-button"].is-
active .js-counter'
)).
to
have_content
(
'1'
)
expect
(
page
).
to
have_css
(
".js-emoji-btn.active[title='You']"
)
expect
(
page
).
to
have_css
(
'[data-testid="award-button"].is-active[title="You"]'
)
expect
do
expect
do
page
.
find
(
'
.js-emoji-btn.
active'
).
click
page
.
find
(
'
[data-testid="award-button"].is-
active'
).
click
wait_for_requests
wait_for_requests
end
.
to
change
{
page
.
all
(
'
.award-control.js-emoji-btn
'
).
size
}.
from
(
3
).
to
(
2
)
end
.
to
change
{
page
.
all
(
'
[data-testid="award-button"]
'
).
size
}.
from
(
3
).
to
(
2
)
end
end
end
end
...
@@ -212,31 +203,25 @@ RSpec.describe 'User interacts with awards' do
...
@@ -212,31 +203,25 @@ RSpec.describe 'User interacts with awards' do
end
end
it
'adds award to issue'
do
it
'adds award to issue'
do
first
(
'
.js-emoji-btn
'
).
click
first
(
'
[data-testid="award-button"]
'
).
click
expect
(
page
).
to
have_selector
(
'
.js-emoji-btn.
active'
)
expect
(
page
).
to
have_selector
(
'
[data-testid="award-button"].is-
active'
)
expect
(
first
(
'
.js-emoji-btn
'
)).
to
have_content
'1'
expect
(
first
(
'
[data-testid="award-button"]
'
)).
to
have_content
'1'
visit
project_issue_path
(
project
,
issue
)
visit
project_issue_path
(
project
,
issue
)
expect
(
first
(
'
.js-emoji-btn
'
)).
to
have_content
'1'
expect
(
first
(
'
[data-testid="award-button"]
'
)).
to
have_content
'1'
end
end
it
'removes award from issue'
do
it
'removes award from issue'
do
first
(
'
.js-emoji-btn
'
).
click
first
(
'
[data-testid="award-button"]
'
).
click
find
(
'
.js-emoji-btn.
active'
).
click
find
(
'
[data-testid="award-button"].is-
active'
).
click
expect
(
first
(
'
.js-emoji-btn
'
)).
to
have_content
'0'
expect
(
first
(
'
[data-testid="award-button"]
'
)).
to
have_content
'0'
visit
project_issue_path
(
project
,
issue
)
visit
project_issue_path
(
project
,
issue
)
expect
(
first
(
'.js-emoji-btn'
)).
to
have_content
'0'
expect
(
first
(
'[data-testid="award-button"]'
)).
to
have_content
'0'
end
it
'only has one menu on the page'
do
first
(
'.js-add-award'
).
click
expect
(
page
).
to
have_selector
(
'.emoji-menu'
,
count:
1
)
end
end
end
end
...
@@ -311,7 +296,7 @@ RSpec.describe 'User interacts with awards' do
...
@@ -311,7 +296,7 @@ RSpec.describe 'User interacts with awards' do
end
end
context
'execute /award quick action'
do
context
'execute /award quick action'
do
it
'toggles the emoji award on noteable'
,
:js
do
x
it
'toggles the emoji award on noteable'
,
:js
do
execute_quick_action
(
'/award :100:'
)
execute_quick_action
(
'/award :100:'
)
expect
(
find
(
noteable_award_counter
)).
to
have_text
(
"1"
)
expect
(
find
(
noteable_award_counter
)).
to
have_text
(
"1"
)
...
@@ -330,7 +315,7 @@ RSpec.describe 'User interacts with awards' do
...
@@ -330,7 +315,7 @@ RSpec.describe 'User interacts with awards' do
end
end
it
'has disabled emoji button'
do
it
'has disabled emoji button'
do
expect
(
first
(
'
.award-control
'
)[
:class
]).
to
have_text
(
'disabled'
)
expect
(
first
(
'
[data-testid="award-button"]
'
)[
:class
]).
to
have_text
(
'disabled'
)
end
end
end
end
...
@@ -356,7 +341,7 @@ RSpec.describe 'User interacts with awards' do
...
@@ -356,7 +341,7 @@ RSpec.describe 'User interacts with awards' do
end
end
def
noteable_award_counter
def
noteable_award_counter
".awards .active"
".awards .
is-
active"
end
end
def
toggle_smiley_emoji
(
status
)
def
toggle_smiley_emoji
(
status
)
...
...
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