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
a0363e39
Commit
a0363e39
authored
Dec 29, 2021
by
Kushal Pandya
Committed by
Natalia Tepluhina
Dec 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix user status emoji picker positioning
parent
b991ae65
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
app/assets/javascripts/emoji/components/picker.vue
app/assets/javascripts/emoji/components/picker.vue
+12
-2
app/assets/javascripts/set_status_modal/set_status_modal_wrapper.vue
...javascripts/set_status_modal/set_status_modal_wrapper.vue
+2
-0
spec/frontend/set_status_modal/set_status_modal_wrapper_spec.js
...rontend/set_status_modal/set_status_modal_wrapper_spec.js
+10
-1
No files found.
app/assets/javascripts/emoji/components/picker.vue
View file @
a0363e39
...
...
@@ -28,6 +28,16 @@ export default {
required
:
false
,
default
:
()
=>
[],
},
right
:
{
type
:
Boolean
,
required
:
false
,
default
:
true
,
},
boundary
:
{
type
:
String
,
required
:
false
,
default
:
''
,
},
},
data
()
{
return
{
...
...
@@ -62,7 +72,7 @@ export default {
addToFrequentlyUsed
(
name
);
},
getBoundaryElement
()
{
return
document
.
querySelector
(
'
.content-wrapper
'
)
||
'
scrollParent
'
;
return
this
.
boundary
||
document
.
querySelector
(
'
.content-wrapper
'
)
||
'
scrollParent
'
;
},
onSearchInput
()
{
this
.
$refs
.
virtualScoller
.
setScrollTop
(
0
);
...
...
@@ -87,7 +97,7 @@ export default {
menu-class=
"dropdown-extended-height"
category=
"secondary"
no-flip
right
:right=
"right"
lazy
@
shown=
"$emit('shown')"
@
hidden=
"$emit('hidden')"
...
...
app/assets/javascripts/set_status_modal/set_status_modal_wrapper.vue
View file @
a0363e39
...
...
@@ -267,6 +267,8 @@ export default {
v-if=
"glFeatures.improvedEmojiPicker"
dropdown-class=
"gl-h-full"
toggle-class=
"btn emoji-menu-toggle-button gl-px-4! gl-rounded-top-right-none! gl-rounded-bottom-right-none!"
boundary=
"viewport"
:right=
"false"
@
click=
"setEmoji"
>
<template
#button-content
>
...
...
spec/frontend/set_status_modal/set_status_modal_wrapper_spec.js
View file @
a0363e39
...
...
@@ -110,14 +110,23 @@ describe('SetStatusModalWrapper', () => {
});
describe
(
'
improvedEmojiPicker is true
'
,
()
=>
{
const
getEmojiPicker
=
()
=>
wrapper
.
findComponent
(
EmojiPicker
);
beforeEach
(
async
()
=>
{
await
initEmojiMock
();
wrapper
=
createComponent
({},
true
);
return
initModal
();
});
it
(
'
renders emoji picker dropdown with custom positioning
'
,
()
=>
{
expect
(
getEmojiPicker
().
props
()).
toMatchObject
({
right
:
false
,
boundary
:
'
viewport
'
,
});
});
it
(
'
sets emojiTag when clicking in emoji picker
'
,
async
()
=>
{
await
wrapper
.
findComponent
(
EmojiPicker
).
vm
.
$emit
(
'
click
'
,
'
thumbsup
'
);
await
getEmojiPicker
(
).
vm
.
$emit
(
'
click
'
,
'
thumbsup
'
);
expect
(
wrapper
.
vm
.
emojiTag
).
toContain
(
'
data-name="thumbsup"
'
);
});
...
...
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