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
0
Merge Requests
0
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
Jérome Perrin
gitlab-ce
Commits
dc2f702a
Commit
dc2f702a
authored
Apr 24, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added emoji description title to award emoji buttons
Closes #29971
parent
90f73438
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1809 additions
and
6 deletions
+1809
-6
app/assets/javascripts/awards_handler.js
app/assets/javascripts/awards_handler.js
+12
-5
changelogs/unreleased/emoji-button-titles.yml
changelogs/unreleased/emoji-button-titles.yml
+4
-0
fixtures/emojis/digests.json
fixtures/emojis/digests.json
+1791
-0
lib/tasks/gemojione.rake
lib/tasks/gemojione.rake
+2
-1
No files found.
app/assets/javascripts/awards_handler.js
View file @
dc2f702a
...
@@ -29,11 +29,18 @@ const categoryLabelMap = {
...
@@ -29,11 +29,18 @@ const categoryLabelMap = {
flags
:
'
Flags
'
,
flags
:
'
Flags
'
,
};
};
function
createEmojiObject
(
alias
)
{
return
{
alias
,
description
:
emojiMap
[
alias
].
description
,
};
};
function
buildCategoryMap
()
{
function
buildCategoryMap
()
{
return
Object
.
keys
(
emojiMap
).
reduce
((
currentCategoryMap
,
emojiNameKey
)
=>
{
return
Object
.
keys
(
emojiMap
).
reduce
((
currentCategoryMap
,
emojiNameKey
)
=>
{
const
emojiInfo
=
emojiMap
[
emojiNameKey
];
const
emojiInfo
=
emojiMap
[
emojiNameKey
];
if
(
currentCategoryMap
[
emojiInfo
.
category
])
{
if
(
currentCategoryMap
[
emojiInfo
.
category
])
{
currentCategoryMap
[
emojiInfo
.
category
].
push
(
emojiNameKey
);
currentCategoryMap
[
emojiInfo
.
category
].
push
(
createEmojiObject
(
emojiNameKey
)
);
}
}
return
currentCategoryMap
;
return
currentCategoryMap
;
...
@@ -55,10 +62,10 @@ function renderCategory(name, emojiList, opts = {}) {
...
@@ -55,10 +62,10 @@ function renderCategory(name, emojiList, opts = {}) {
${
name
}
${
name
}
</h5>
</h5>
<ul class="clearfix emoji-menu-list
${
opts
.
menuListClass
||
''
}
">
<ul class="clearfix emoji-menu-list
${
opts
.
menuListClass
||
''
}
">
${
emojiList
.
map
(
emoji
Name
=>
`
${
emojiList
.
map
(
emoji
=>
`
<li class="emoji-menu-list-item">
<li class="emoji-menu-list-item">
<button class="emoji-menu-btn text-center js-emoji-btn" type="button">
<button class="emoji-menu-btn text-center js-emoji-btn" type="button"
title="
${
emoji
.
description
}
"
>
${
glEmojiTag
(
emoji
Name
,
{
${
glEmojiTag
(
emoji
.
alias
,
{
sprite
:
true
,
sprite
:
true
,
})}
})}
</button>
</button>
...
@@ -498,7 +505,7 @@ AwardsHandler.prototype.getFrequentlyUsedEmojis = function getFrequentlyUsedEmoj
...
@@ -498,7 +505,7 @@ AwardsHandler.prototype.getFrequentlyUsedEmojis = function getFrequentlyUsedEmoj
const
frequentlyUsedEmojis
=
_
.
uniq
((
Cookies
.
get
(
'
frequently_used_emojis
'
)
||
''
).
split
(
'
,
'
));
const
frequentlyUsedEmojis
=
_
.
uniq
((
Cookies
.
get
(
'
frequently_used_emojis
'
)
||
''
).
split
(
'
,
'
));
this
.
frequentlyUsedEmojis
=
frequentlyUsedEmojis
.
filter
(
this
.
frequentlyUsedEmojis
=
frequentlyUsedEmojis
.
filter
(
inputName
=>
isEmojiNameValid
(
inputName
),
inputName
=>
isEmojiNameValid
(
inputName
),
);
)
.
map
(
emojiNameKey
=>
createEmojiObject
(
emojiNameKey
))
;
return
this
.
frequentlyUsedEmojis
;
return
this
.
frequentlyUsedEmojis
;
})();
})();
...
...
changelogs/unreleased/emoji-button-titles.yml
0 → 100644
View file @
dc2f702a
---
title
:
Added title to award emoji buttons
merge_request
:
author
:
fixtures/emojis/digests.json
View file @
dc2f702a
This diff is collapsed.
Click to expand it.
lib/tasks/gemojione.rake
View file @
dc2f702a
namespace
:gemojione
do
namespace
:gemojione
do
desc
'Generates Emoji SHA256 digests'
desc
'Generates Emoji SHA256 digests'
task
digests:
[
'
yarn:check'
,
'
environment'
]
do
task
digests:
[
'environment'
]
do
require
'digest/sha2'
require
'digest/sha2'
require
'json'
require
'json'
...
@@ -19,6 +19,7 @@ namespace :gemojione do
...
@@ -19,6 +19,7 @@ namespace :gemojione do
entry
=
{
entry
=
{
category:
emoji_hash
[
'category'
],
category:
emoji_hash
[
'category'
],
moji:
emoji_hash
[
'moji'
],
moji:
emoji_hash
[
'moji'
],
description:
emoji_hash
[
'description'
],
unicodeVersion:
Gitlab
::
Emoji
.
emoji_unicode_version
(
name
),
unicodeVersion:
Gitlab
::
Emoji
.
emoji_unicode_version
(
name
),
digest:
hash_digest
,
digest:
hash_digest
,
}
}
...
...
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