From b728b25c102d10ac9447fee27a2b667e58f78b9b Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 11 Oct 2022 12:36:24 +0200 Subject: [PATCH] Move flavours/glitch/utils/emoji back to flavours/glitch/features/emoji --- app/javascript/flavours/glitch/actions/compose.js | 2 +- app/javascript/flavours/glitch/actions/importer/normalizer.js | 2 +- .../flavours/glitch/components/autosuggest_emoji.js | 2 +- app/javascript/flavours/glitch/components/poll.js | 2 +- .../glitch/{utils/emoji/index.js => features/emoji/emoji.js} | 0 .../glitch/{utils => features}/emoji/emoji_compressed.js | 0 .../flavours/glitch/{utils => features}/emoji/emoji_map.json | 0 .../glitch/{utils => features}/emoji/emoji_mart_data_light.js | 0 .../{utils => features}/emoji/emoji_mart_search_light.js | 0 .../flavours/glitch/{utils => features}/emoji/emoji_picker.js | 0 .../{utils => features}/emoji/emoji_unicode_mapping_light.js | 0 .../flavours/glitch/{utils => features}/emoji/emoji_utils.js | 0 .../glitch/{utils => features}/emoji/unicode_to_filename.js | 0 .../{utils => features}/emoji/unicode_to_unified_name.js | 0 app/javascript/flavours/glitch/features/emoji_picker/index.js | 2 +- .../features/getting_started/components/announcements.js | 2 +- .../glitch/features/ui/components/compare_history_modal.js | 2 +- .../flavours/glitch/features/ui/util/async-components.js | 2 +- app/javascript/flavours/glitch/packs/public.js | 2 +- app/javascript/flavours/glitch/reducers/custom_emojis.js | 4 ++-- 20 files changed, 11 insertions(+), 11 deletions(-) rename app/javascript/flavours/glitch/{utils/emoji/index.js => features/emoji/emoji.js} (100%) rename app/javascript/flavours/glitch/{utils => features}/emoji/emoji_compressed.js (100%) rename app/javascript/flavours/glitch/{utils => features}/emoji/emoji_map.json (100%) rename app/javascript/flavours/glitch/{utils => features}/emoji/emoji_mart_data_light.js (100%) rename app/javascript/flavours/glitch/{utils => features}/emoji/emoji_mart_search_light.js (100%) rename app/javascript/flavours/glitch/{utils => features}/emoji/emoji_picker.js (100%) rename app/javascript/flavours/glitch/{utils => features}/emoji/emoji_unicode_mapping_light.js (100%) rename app/javascript/flavours/glitch/{utils => features}/emoji/emoji_utils.js (100%) rename app/javascript/flavours/glitch/{utils => features}/emoji/unicode_to_filename.js (100%) rename app/javascript/flavours/glitch/{utils => features}/emoji/unicode_to_unified_name.js (100%) diff --git a/app/javascript/flavours/glitch/actions/compose.js b/app/javascript/flavours/glitch/actions/compose.js index 0ef5053636..02aa4f144c 100644 --- a/app/javascript/flavours/glitch/actions/compose.js +++ b/app/javascript/flavours/glitch/actions/compose.js @@ -1,7 +1,7 @@ import api from '../api'; import { CancelToken, isCancel } from 'axios'; import { throttle } from 'lodash'; -import { search as emojiSearch } from 'flavours/glitch/utils/emoji/emoji_mart_search_light'; +import { search as emojiSearch } from 'flavours/glitch/features/emoji/emoji_mart_search_light'; import { useEmoji } from './emojis'; import { tagHistory } from '../settings'; import { recoverHashtags } from 'flavours/glitch/utils/hashtag'; diff --git a/app/javascript/flavours/glitch/actions/importer/normalizer.js b/app/javascript/flavours/glitch/actions/importer/normalizer.js index bf1e129a26..1c9f524e43 100644 --- a/app/javascript/flavours/glitch/actions/importer/normalizer.js +++ b/app/javascript/flavours/glitch/actions/importer/normalizer.js @@ -1,5 +1,5 @@ import escapeTextContentForBrowser from 'escape-html'; -import emojify from 'flavours/glitch/utils/emoji'; +import emojify from 'flavours/glitch/features/emoji/emoji'; import { unescapeHTML } from 'flavours/glitch/utils/html'; import { autoHideCW } from 'flavours/glitch/utils/content_warning'; diff --git a/app/javascript/flavours/glitch/components/autosuggest_emoji.js b/app/javascript/flavours/glitch/components/autosuggest_emoji.js index dd756544bf..83fafbd10d 100644 --- a/app/javascript/flavours/glitch/components/autosuggest_emoji.js +++ b/app/javascript/flavours/glitch/components/autosuggest_emoji.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import unicodeMapping from 'flavours/glitch/utils/emoji/emoji_unicode_mapping_light'; +import unicodeMapping from 'flavours/glitch/features/emoji/emoji_unicode_mapping_light'; import { assetHost } from 'flavours/glitch/utils/config'; diff --git a/app/javascript/flavours/glitch/components/poll.js b/app/javascript/flavours/glitch/components/poll.js index 6dfa73f495..da65cd2415 100644 --- a/app/javascript/flavours/glitch/components/poll.js +++ b/app/javascript/flavours/glitch/components/poll.js @@ -7,7 +7,7 @@ import classNames from 'classnames'; import Motion from 'flavours/glitch/features/ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; import escapeTextContentForBrowser from 'escape-html'; -import emojify from 'flavours/glitch/utils/emoji'; +import emojify from 'flavours/glitch/features/emoji/emoji'; import RelativeTimestamp from './relative_timestamp'; import Icon from 'flavours/glitch/components/icon'; diff --git a/app/javascript/flavours/glitch/utils/emoji/index.js b/app/javascript/flavours/glitch/features/emoji/emoji.js similarity index 100% rename from app/javascript/flavours/glitch/utils/emoji/index.js rename to app/javascript/flavours/glitch/features/emoji/emoji.js diff --git a/app/javascript/flavours/glitch/utils/emoji/emoji_compressed.js b/app/javascript/flavours/glitch/features/emoji/emoji_compressed.js similarity index 100% rename from app/javascript/flavours/glitch/utils/emoji/emoji_compressed.js rename to app/javascript/flavours/glitch/features/emoji/emoji_compressed.js diff --git a/app/javascript/flavours/glitch/utils/emoji/emoji_map.json b/app/javascript/flavours/glitch/features/emoji/emoji_map.json similarity index 100% rename from app/javascript/flavours/glitch/utils/emoji/emoji_map.json rename to app/javascript/flavours/glitch/features/emoji/emoji_map.json diff --git a/app/javascript/flavours/glitch/utils/emoji/emoji_mart_data_light.js b/app/javascript/flavours/glitch/features/emoji/emoji_mart_data_light.js similarity index 100% rename from app/javascript/flavours/glitch/utils/emoji/emoji_mart_data_light.js rename to app/javascript/flavours/glitch/features/emoji/emoji_mart_data_light.js diff --git a/app/javascript/flavours/glitch/utils/emoji/emoji_mart_search_light.js b/app/javascript/flavours/glitch/features/emoji/emoji_mart_search_light.js similarity index 100% rename from app/javascript/flavours/glitch/utils/emoji/emoji_mart_search_light.js rename to app/javascript/flavours/glitch/features/emoji/emoji_mart_search_light.js diff --git a/app/javascript/flavours/glitch/utils/emoji/emoji_picker.js b/app/javascript/flavours/glitch/features/emoji/emoji_picker.js similarity index 100% rename from app/javascript/flavours/glitch/utils/emoji/emoji_picker.js rename to app/javascript/flavours/glitch/features/emoji/emoji_picker.js diff --git a/app/javascript/flavours/glitch/utils/emoji/emoji_unicode_mapping_light.js b/app/javascript/flavours/glitch/features/emoji/emoji_unicode_mapping_light.js similarity index 100% rename from app/javascript/flavours/glitch/utils/emoji/emoji_unicode_mapping_light.js rename to app/javascript/flavours/glitch/features/emoji/emoji_unicode_mapping_light.js diff --git a/app/javascript/flavours/glitch/utils/emoji/emoji_utils.js b/app/javascript/flavours/glitch/features/emoji/emoji_utils.js similarity index 100% rename from app/javascript/flavours/glitch/utils/emoji/emoji_utils.js rename to app/javascript/flavours/glitch/features/emoji/emoji_utils.js diff --git a/app/javascript/flavours/glitch/utils/emoji/unicode_to_filename.js b/app/javascript/flavours/glitch/features/emoji/unicode_to_filename.js similarity index 100% rename from app/javascript/flavours/glitch/utils/emoji/unicode_to_filename.js rename to app/javascript/flavours/glitch/features/emoji/unicode_to_filename.js diff --git a/app/javascript/flavours/glitch/utils/emoji/unicode_to_unified_name.js b/app/javascript/flavours/glitch/features/emoji/unicode_to_unified_name.js similarity index 100% rename from app/javascript/flavours/glitch/utils/emoji/unicode_to_unified_name.js rename to app/javascript/flavours/glitch/features/emoji/unicode_to_unified_name.js diff --git a/app/javascript/flavours/glitch/features/emoji_picker/index.js b/app/javascript/flavours/glitch/features/emoji_picker/index.js index 97032e107d..05ae2c09f7 100644 --- a/app/javascript/flavours/glitch/features/emoji_picker/index.js +++ b/app/javascript/flavours/glitch/features/emoji_picker/index.js @@ -11,7 +11,7 @@ import Overlay from 'react-overlays/lib/Overlay'; import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { supportsPassiveEvents } from 'detect-passive-events'; -import { buildCustomEmojis, categoriesFromEmojis } from 'flavours/glitch/utils/emoji'; +import { buildCustomEmojis, categoriesFromEmojis } from 'flavours/glitch/features/emoji/emoji'; import { useSystemEmojiFont } from 'flavours/glitch/initial_state'; import { assetHost } from 'flavours/glitch/utils/config'; diff --git a/app/javascript/flavours/glitch/features/getting_started/components/announcements.js b/app/javascript/flavours/glitch/features/getting_started/components/announcements.js index b2b9af2186..ecbda56f02 100644 --- a/app/javascript/flavours/glitch/features/getting_started/components/announcements.js +++ b/app/javascript/flavours/glitch/features/getting_started/components/announcements.js @@ -9,7 +9,7 @@ import { defineMessages, injectIntl, FormattedMessage, FormattedDate } from 'rea import { autoPlayGif, reduceMotion, disableSwiping } from 'flavours/glitch/initial_state'; import elephantUIPlane from 'mastodon/../images/elephant_ui_plane.svg'; import { mascot } from 'flavours/glitch/initial_state'; -import unicodeMapping from 'flavours/glitch/utils/emoji/emoji_unicode_mapping_light'; +import unicodeMapping from 'flavours/glitch/features/emoji/emoji_unicode_mapping_light'; import classNames from 'classnames'; import EmojiPickerDropdown from 'flavours/glitch/features/emoji_picker'; import AnimatedNumber from 'flavours/glitch/components/animated_number'; diff --git a/app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js b/app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js index 4b1fb1d141..baf7f25bec 100644 --- a/app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js @@ -4,7 +4,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import { FormattedMessage } from 'react-intl'; import { closeModal } from 'flavours/glitch/actions/modal'; -import emojify from 'flavours/glitch/utils/emoji'; +import emojify from 'flavours/glitch/features/emoji/emoji'; import escapeTextContentForBrowser from 'escape-html'; import InlineAccount from 'flavours/glitch/components/inline_account'; import IconButton from 'flavours/glitch/components/icon_button'; diff --git a/app/javascript/flavours/glitch/features/ui/util/async-components.js b/app/javascript/flavours/glitch/features/ui/util/async-components.js index 325efe74c9..eef3a941d2 100644 --- a/app/javascript/flavours/glitch/features/ui/util/async-components.js +++ b/app/javascript/flavours/glitch/features/ui/util/async-components.js @@ -1,5 +1,5 @@ export function EmojiPicker () { - return import(/* webpackChunkName: "flavours/glitch/async/emoji_picker" */'flavours/glitch/utils/emoji/emoji_picker'); + return import(/* webpackChunkName: "flavours/glitch/async/emoji_picker" */'flavours/glitch/features/emoji/emoji_picker'); } export function Compose () { diff --git a/app/javascript/flavours/glitch/packs/public.js b/app/javascript/flavours/glitch/packs/public.js index 4b5b7343e9..ae1899638a 100644 --- a/app/javascript/flavours/glitch/packs/public.js +++ b/app/javascript/flavours/glitch/packs/public.js @@ -7,7 +7,7 @@ function main() { const IntlMessageFormat = require('intl-messageformat').default; const { timeAgoString } = require('flavours/glitch/components/relative_timestamp'); const { delegate } = require('@rails/ujs'); - const emojify = require('flavours/glitch/utils/emoji').default; + const emojify = require('flavours/glitch/features/emoji/emoji').default; const { getLocale } = require('locales'); const { messages } = getLocale(); const React = require('react'); diff --git a/app/javascript/flavours/glitch/reducers/custom_emojis.js b/app/javascript/flavours/glitch/reducers/custom_emojis.js index 0f6796e720..f490d0db1e 100644 --- a/app/javascript/flavours/glitch/reducers/custom_emojis.js +++ b/app/javascript/flavours/glitch/reducers/custom_emojis.js @@ -1,7 +1,7 @@ import { List as ImmutableList, fromJS as ConvertToImmutable } from 'immutable'; import { CUSTOM_EMOJIS_FETCH_SUCCESS } from 'flavours/glitch/actions/custom_emojis'; -import { search as emojiSearch } from 'flavours/glitch/utils/emoji/emoji_mart_search_light'; -import { buildCustomEmojis } from 'flavours/glitch/utils/emoji'; +import { search as emojiSearch } from 'flavours/glitch/features/emoji/emoji_mart_search_light'; +import { buildCustomEmojis } from 'flavours/glitch/features/emoji/emoji'; const initialState = ImmutableList([]);