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
27a1348f
Commit
27a1348f
authored
Jun 27, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
split emoji support methods from the async module
parent
88114c41
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
12 deletions
+16
-12
gl_emoji.js
app/assets/javascripts/behaviors/gl_emoji.js
+3
-5
index.js
app/assets/javascripts/emoji/index.js
+0
-4
index.js
app/assets/javascripts/emoji/support/index.js
+10
-0
is_emoji_unicode_supported.js
...s/javascripts/emoji/support/is_emoji_unicode_supported.js
+0
-0
unicode_support_map.js
app/assets/javascripts/emoji/support/unicode_support_map.js
+1
-1
unicode_support_map_spec.js
...avascripts/behaviors/gl_emoji/unicode_support_map_spec.js
+1
-1
gl_emoji_spec.js
spec/javascripts/gl_emoji_spec.js
+1
-1
No files found.
app/assets/javascripts/behaviors/gl_emoji.js
View file @
27a1348f
import
installCustomElements
from
'document-register-element'
;
import
{
emojiMap
,
normalizeEmojiName
,
isEmojiUnicodeSupported
,
getUnicodeSupportMap
}
from
'../emoji'
;
import
{
emojiMap
,
normalizeEmojiName
}
from
'../emoji'
;
import
isEmojiUnicodeSupported
from
'../emoji/support'
;
installCustomElements
(
window
);
const
generatedUnicodeSupportMap
=
getUnicodeSupportMap
();
function
emojiImageTag
(
name
,
src
)
{
return
`<img class="emoji" title=":
${
name
}
:" alt=":
${
name
}
:" src="
${
src
}
" width="20" height="20" align="absmiddle" />`
;
}
...
...
@@ -82,7 +81,7 @@ function installGlEmojiElement() {
if
(
emojiUnicode
&&
isEmojiUnicode
&&
!
isEmojiUnicodeSupported
(
generatedUnicodeSupportMap
,
emojiUnicode
,
unicodeVersion
)
!
isEmojiUnicodeSupported
(
emojiUnicode
,
unicodeVersion
)
)
{
// CSS sprite fallback takes precedence over image fallback
if
(
hasCssSpriteFalback
)
{
...
...
@@ -106,5 +105,4 @@ function installGlEmojiElement() {
export
{
installGlEmojiElement
,
glEmojiTag
,
emojiImageTag
,
};
app/assets/javascripts/emoji/index.js
View file @
27a1348f
import
emojiMap
from
'emojis/digests.json'
;
import
emojiAliases
from
'emojis/aliases.json'
;
import
getUnicodeSupportMap
from
'./unicode_support_map'
;
import
isEmojiUnicodeSupported
from
'./is_emoji_unicode_supported'
;
const
validEmojiNames
=
[...
Object
.
keys
(
emojiMap
),
...
Object
.
keys
(
emojiAliases
)];
...
...
@@ -52,8 +50,6 @@ export {
filterEmojiNames
,
filterEmojiNamesByAlias
,
getEmojiByCategory
,
getUnicodeSupportMap
,
isEmojiNameValid
,
isEmojiUnicodeSupported
,
validEmojiNames
,
};
app/assets/javascripts/emoji/support/index.js
0 → 100644
View file @
27a1348f
import
isEmojiUnicodeSupported
from
'./is_emoji_unicode_supported'
;
import
getUnicodeSupportMap
from
'./unicode_support_map'
;
// cache browser support map between calls
let
browserUnicodeSupportMap
;
export
default
function
isEmojiUnicodeSupportedByBrowser
(
emojiUnicode
,
unicodeVersion
)
{
browserUnicodeSupportMap
=
browserUnicodeSupportMap
||
getUnicodeSupportMap
();
return
isEmojiUnicodeSupported
(
browserUnicodeSupportMap
,
emojiUnicode
,
unicodeVersion
);
}
app/assets/javascripts/emoji/is_emoji_unicode_supported.js
→
app/assets/javascripts/emoji/
support/
is_emoji_unicode_supported.js
View file @
27a1348f
File moved
app/assets/javascripts/emoji/unicode_support_map.js
→
app/assets/javascripts/emoji/
support/
unicode_support_map.js
View file @
27a1348f
import
AccessorUtilities
from
'../lib/utils/accessor'
;
import
AccessorUtilities
from
'../
../
lib/utils/accessor'
;
const
unicodeSupportTestMap
=
{
// man, student (emojione does not have any of these yet), http://emojipedia.org/emoji-zwj-sequences/
...
...
spec/javascripts/behaviors/gl_emoji/unicode_support_map_spec.js
View file @
27a1348f
import
getUnicodeSupportMap
from
'~/emoji/unicode_support_map'
;
import
getUnicodeSupportMap
from
'~/emoji/
support/
unicode_support_map'
;
import
AccessorUtilities
from
'~/lib/utils/accessor'
;
describe
(
'Unicode Support Map'
,
()
=>
{
...
...
spec/javascripts/gl_emoji_spec.js
View file @
27a1348f
...
...
@@ -5,7 +5,7 @@ import isEmojiUnicodeSupported, {
isSkinToneComboEmoji
,
isHorceRacingSkinToneComboEmoji
,
isPersonZwjEmoji
,
}
from
'~/emoji/is_emoji_unicode_supported'
;
}
from
'~/emoji/
support/
is_emoji_unicode_supported'
;
const
emptySupportMap
=
{
personZwj
:
false
,
...
...
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