BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
81a37ca1
Commit
81a37ca1
authored
Apr 24, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved the title onto the emoji tag
This adds the description in all places emojis are used
parent
4bde6eae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
13 deletions
+7
-13
awards_handler.js
app/assets/javascripts/awards_handler.js
+5
-12
gl_emoji.js
app/assets/javascripts/behaviors/gl_emoji.js
+1
-0
emoji.rb
lib/gitlab/emoji.rb
+1
-1
No files found.
app/assets/javascripts/awards_handler.js
View file @
81a37ca1
...
...
@@ -29,18 +29,11 @@ const categoryLabelMap = {
flags
:
'Flags'
,
};
function
createEmojiObject
(
alias
)
{
return
{
alias
,
description
:
emojiMap
[
alias
].
description
,
};
};
function
buildCategoryMap
()
{
return
Object
.
keys
(
emojiMap
).
reduce
((
currentCategoryMap
,
emojiNameKey
)
=>
{
const
emojiInfo
=
emojiMap
[
emojiNameKey
];
if
(
currentCategoryMap
[
emojiInfo
.
category
])
{
currentCategoryMap
[
emojiInfo
.
category
].
push
(
createEmojiObject
(
emojiNameKey
)
);
currentCategoryMap
[
emojiInfo
.
category
].
push
(
emojiNameKey
);
}
return
currentCategoryMap
;
...
...
@@ -62,10 +55,10 @@ function renderCategory(name, emojiList, opts = {}) {
${
name
}
</h5>
<ul class="clearfix emoji-menu-list
${
opts
.
menuListClass
||
''
}
">
${
emojiList
.
map
(
emoji
=>
`
${
emojiList
.
map
(
emoji
Name
=>
`
<li class="emoji-menu-list-item">
<button class="emoji-menu-btn text-center js-emoji-btn" type="button"
title="
${
emoji
.
description
}
"
>
${
glEmojiTag
(
emoji
.
alias
,
{
<button class="emoji-menu-btn text-center js-emoji-btn" type="button">
${
glEmojiTag
(
emoji
Name
,
{
sprite
:
true
,
})}
</button>
...
...
@@ -505,7 +498,7 @@ AwardsHandler.prototype.getFrequentlyUsedEmojis = function getFrequentlyUsedEmoj
const
frequentlyUsedEmojis
=
_
.
uniq
((
Cookies
.
get
(
'frequently_used_emojis'
)
||
''
).
split
(
','
));
this
.
frequentlyUsedEmojis
=
frequentlyUsedEmojis
.
filter
(
inputName
=>
isEmojiNameValid
(
inputName
),
)
.
map
(
emojiNameKey
=>
createEmojiObject
(
emojiNameKey
))
;
);
return
this
.
frequentlyUsedEmojis
;
})();
...
...
app/assets/javascripts/behaviors/gl_emoji.js
View file @
81a37ca1
...
...
@@ -62,6 +62,7 @@ function glEmojiTag(inputName, options) {
data-fallback-src="
${
fallbackImageSrc
}
"
${
fallbackSpriteAttribute
}
data-unicode-version="
${
emojiInfo
.
unicodeVersion
}
"
title=
${
emojiInfo
.
description
}
>
${
contents
}
</gl-emoji>
...
...
lib/gitlab/emoji.rb
View file @
81a37ca1
...
...
@@ -54,7 +54,7 @@ module Gitlab
unicode_version:
emoji_unicode_version
(
emoji_name
)
}
ActionController
::
Base
.
helpers
.
content_tag
(
'gl-emoji'
,
emoji_info
[
'moji'
],
data:
data
)
ActionController
::
Base
.
helpers
.
content_tag
(
'gl-emoji'
,
emoji_info
[
'moji'
],
title:
emoji_info
[
'description'
],
data:
data
)
end
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