From 131e6403ccd59693e8498d175acba4fdd28268b9 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 29 Jan 2023 21:07:51 -0500 Subject: Update hasOwnProperty calls for ESLint (#23307) --- .eslintrc.js | 1 - 1 file changed, 1 deletion(-) (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index 03af2975b..e728a7f14 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -81,7 +81,6 @@ module.exports = { ], 'no-empty': 'off', 'no-nested-ternary': 'warn', - 'no-prototype-builtins': 'off', 'no-restricted-properties': [ 'error', { property: 'substring', message: 'Use .slice instead of .substring.' }, -- cgit From cbf5ea39d0cabc534a2e75ac2ceff9ad77564962 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Sun, 29 Jan 2023 21:08:37 -0500 Subject: Enable ESLint react/recommended ruleset (#22460) --- .eslintrc.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index e728a7f14..e0a92a0f4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,6 +3,7 @@ module.exports = { extends: [ 'eslint:recommended', + 'plugin:react/recommended', ], env: { @@ -112,19 +113,16 @@ module.exports = { 'react/jsx-boolean-value': 'error', 'react/jsx-closing-bracket-location': ['error', 'line-aligned'], 'react/jsx-curly-spacing': 'error', + 'react/display-name': 'off', 'react/jsx-equals-spacing': 'error', 'react/jsx-first-prop-new-line': ['error', 'multiline-multiprop'], 'react/jsx-indent': ['error', 2], 'react/jsx-no-bind': 'error', - 'react/jsx-no-duplicate-props': 'error', - 'react/jsx-no-undef': 'error', + 'react/jsx-no-target-blank': 'off', 'react/jsx-tag-spacing': 'error', - 'react/jsx-uses-react': 'error', - 'react/jsx-uses-vars': 'error', 'react/jsx-wrap-multilines': 'error', - 'react/no-multi-comp': 'off', - 'react/no-string-refs': 'error', - 'react/prop-types': 'error', + 'react/no-deprecated': 'off', + 'react/no-unknown-property': 'off', 'react/self-closing-comp': 'error', 'jsx-a11y/accessible-emoji': 'warn', -- cgit From 1032d456445a2c1479a1ed3f69c9f724e31ff71b Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 30 Jan 2023 00:17:46 -0500 Subject: Ignore ESLint nested ternary (#23310) --- .eslintrc.js | 1 - 1 file changed, 1 deletion(-) (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index e0a92a0f4..66057fb73 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -81,7 +81,6 @@ module.exports = { }, ], 'no-empty': 'off', - 'no-nested-ternary': 'warn', 'no-restricted-properties': [ 'error', { property: 'substring', message: 'Use .slice instead of .substring.' }, -- cgit From 96d26a941782f071e436f34c75e91c36462579d6 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 30 Jan 2023 00:18:12 -0500 Subject: Enable ESLint jsx-a11y/recommended ruleset (#23309) --- .eslintrc.js | 73 +++++++++++++++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 38 deletions(-) (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index 66057fb73..ca7fc83eb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,6 +4,7 @@ module.exports = { extends: [ 'eslint:recommended', 'plugin:react/recommended', + 'plugin:jsx-a11y/recommended', ], env: { @@ -124,40 +125,30 @@ module.exports = { 'react/no-unknown-property': 'off', 'react/self-closing-comp': 'error', + // recommended values found in https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/src/index.js 'jsx-a11y/accessible-emoji': 'warn', - 'jsx-a11y/alt-text': 'warn', - 'jsx-a11y/anchor-has-content': 'warn', - 'jsx-a11y/anchor-is-valid': [ - 'warn', - { - components: [ - 'Link', - 'NavLink', - ], - specialLink: [ - 'to', - ], - aspect: [ - 'noHref', - 'invalidHref', - 'preferButton', - ], - }, - ], - 'jsx-a11y/aria-activedescendant-has-tabindex': 'warn', - 'jsx-a11y/aria-props': 'warn', - 'jsx-a11y/aria-proptypes': 'warn', - 'jsx-a11y/aria-role': 'warn', - 'jsx-a11y/aria-unsupported-elements': 'warn', - 'jsx-a11y/heading-has-content': 'warn', - 'jsx-a11y/html-has-lang': 'warn', - 'jsx-a11y/iframe-has-title': 'warn', - 'jsx-a11y/img-redundant-alt': 'warn', - 'jsx-a11y/interactive-supports-focus': 'warn', - 'jsx-a11y/label-has-for': 'off', - 'jsx-a11y/mouse-events-have-key-events': 'warn', - 'jsx-a11y/no-access-key': 'warn', - 'jsx-a11y/no-distracting-elements': 'warn', + 'jsx-a11y/click-events-have-key-events': 'off', + 'jsx-a11y/label-has-associated-control': 'off', + 'jsx-a11y/media-has-caption': 'off', + 'jsx-a11y/no-autofocus': 'off', + // recommended rule is: + // 'jsx-a11y/no-interactive-element-to-noninteractive-role': [ + // 'error', + // { + // tr: ['none', 'presentation'], + // canvas: ['img'], + // }, + // ], + 'jsx-a11y/no-interactive-element-to-noninteractive-role': 'off', + // recommended rule is: + // 'jsx-a11y/no-noninteractive-element-interactions': [ + // 'error', + // { + // body: ['onError', 'onLoad'], + // iframe: ['onError', 'onLoad'], + // img: ['onError', 'onLoad'], + // }, + // ], 'jsx-a11y/no-noninteractive-element-interactions': [ 'warn', { @@ -166,8 +157,18 @@ module.exports = { ], }, ], + // recommended rule is: + // 'jsx-a11y/no-noninteractive-tabindex': [ + // 'error', + // { + // tags: [], + // roles: ['tabpanel'], + // allowExpressionValues: true, + // }, + // ], + 'jsx-a11y/no-noninteractive-tabindex': 'off', 'jsx-a11y/no-onchange': 'warn', - 'jsx-a11y/no-redundant-roles': 'warn', + // recommended is full 'error' 'jsx-a11y/no-static-element-interactions': [ 'warn', { @@ -176,10 +177,6 @@ module.exports = { ], }, ], - 'jsx-a11y/role-has-required-aria-props': 'warn', - 'jsx-a11y/role-supports-aria-props': 'off', - 'jsx-a11y/scope': 'warn', - 'jsx-a11y/tabindex-no-positive': 'warn', 'import/extensions': [ 'error', -- cgit From db2c58d47ae0db8490a30cd3846f30e615c382b5 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 13 Feb 2023 09:12:14 -0500 Subject: Enable ESLint no-useless-escape (#23311) --- .eslintrc.js | 1 - app/javascript/mastodon/actions/push_notifications/registerer.js | 2 +- app/javascript/mastodon/components/status.js | 2 +- .../mastodon/features/account_gallery/components/media_item.js | 2 +- .../mastodon/features/compose/containers/warning_container.js | 2 +- app/javascript/mastodon/features/compose/util/counter.js | 2 +- app/javascript/mastodon/features/emoji/emoji_utils.js | 2 +- .../mastodon/features/follow_recommendations/components/account.js | 2 +- .../mastodon/features/picture_in_picture/components/footer.js | 2 +- app/javascript/mastodon/features/status/components/detailed_status.js | 2 +- app/javascript/mastodon/features/ui/components/boost_modal.js | 2 +- config/webpack/shared.js | 2 +- 12 files changed, 11 insertions(+), 12 deletions(-) (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index ca7fc83eb..ef52818b0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -98,7 +98,6 @@ module.exports = { ignoreRestSiblings: true, }, ], - 'no-useless-escape': 'off', 'object-curly-spacing': ['error', 'always'], 'padded-blocks': [ 'error', diff --git a/app/javascript/mastodon/actions/push_notifications/registerer.js b/app/javascript/mastodon/actions/push_notifications/registerer.js index b0f42b6a2..b491f85c2 100644 --- a/app/javascript/mastodon/actions/push_notifications/registerer.js +++ b/app/javascript/mastodon/actions/push_notifications/registerer.js @@ -8,7 +8,7 @@ import { me } from '../../initial_state'; const urlBase64ToUint8Array = (base64String) => { const padding = '='.repeat((4 - base64String.length % 4) % 4); const base64 = (base64String + padding) - .replace(/\-/g, '+') + .replace(/-/g, '+') .replace(/_/g, '/'); return decodeBase64(base64); diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js index 6b8922608..f02910f5a 100644 --- a/app/javascript/mastodon/components/status.js +++ b/app/javascript/mastodon/components/status.js @@ -511,7 +511,7 @@ class Status extends ImmutablePureComponent {
- + {status.get('edited_at') && *} diff --git a/app/javascript/mastodon/features/account_gallery/components/media_item.js b/app/javascript/mastodon/features/account_gallery/components/media_item.js index 80e164af8..d6d60ebda 100644 --- a/app/javascript/mastodon/features/account_gallery/components/media_item.js +++ b/app/javascript/mastodon/features/account_gallery/components/media_item.js @@ -130,7 +130,7 @@ export default class MediaItem extends ImmutablePureComponent { return (
- + { '))', 'iu', ); } catch { - return /(?:^|[^\/\)\w])#(\w*[a-zA-Z·]\w*)/i; + return /(?:^|[^/)\w])#(\w*[a-zA-Z·]\w*)/i; } }; diff --git a/app/javascript/mastodon/features/compose/util/counter.js b/app/javascript/mastodon/features/compose/util/counter.js index 5a68bad99..ec2431096 100644 --- a/app/javascript/mastodon/features/compose/util/counter.js +++ b/app/javascript/mastodon/features/compose/util/counter.js @@ -5,5 +5,5 @@ const urlPlaceholder = '$2xxxxxxxxxxxxxxxxxxxxxxx'; export function countableText(inputText) { return inputText .replace(urlRegex, urlPlaceholder) - .replace(/(^|[^\/\w])@(([a-z0-9_]+)@[a-z0-9\.\-]+[a-z0-9]+)/ig, '$1@$3'); + .replace(/(^|[^/\w])@(([a-z0-9_]+)@[a-z0-9.-]+[a-z0-9]+)/ig, '$1@$3'); } diff --git a/app/javascript/mastodon/features/emoji/emoji_utils.js b/app/javascript/mastodon/features/emoji/emoji_utils.js index 571907a50..be793526d 100644 --- a/app/javascript/mastodon/features/emoji/emoji_utils.js +++ b/app/javascript/mastodon/features/emoji/emoji_utils.js @@ -73,7 +73,7 @@ const stringFromCodePoint = _String.fromCodePoint || function () { const _JSON = JSON; -const COLONS_REGEX = /^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/; +const COLONS_REGEX = /^(?::([^:]+):)(?::skin-tone-(\d):)?$/; const SKINS = [ '1F3FA', '1F3FB', '1F3FC', '1F3FD', '1F3FE', '1F3FF', diff --git a/app/javascript/mastodon/features/follow_recommendations/components/account.js b/app/javascript/mastodon/features/follow_recommendations/components/account.js index daaa2f99e..ddd0c8baa 100644 --- a/app/javascript/mastodon/features/follow_recommendations/components/account.js +++ b/app/javascript/mastodon/features/follow_recommendations/components/account.js @@ -27,7 +27,7 @@ const makeMapStateToProps = () => { }; const getFirstSentence = str => { - const arr = str.split(/(([\.\?!]+\s)|[.。?!\n•])/); + const arr = str.split(/(([.?!]+\s)|[.。?!\n•])/); return arr[0]; }; diff --git a/app/javascript/mastodon/features/picture_in_picture/components/footer.js b/app/javascript/mastodon/features/picture_in_picture/components/footer.js index 3f59b891b..0ee6d06c7 100644 --- a/app/javascript/mastodon/features/picture_in_picture/components/footer.js +++ b/app/javascript/mastodon/features/picture_in_picture/components/footer.js @@ -184,7 +184,7 @@ class Footer extends ImmutablePureComponent { - {withOpenButton && } + {withOpenButton && }
); } diff --git a/app/javascript/mastodon/features/status/components/detailed_status.js b/app/javascript/mastodon/features/status/components/detailed_status.js index 116d9f6b2..064231ffe 100644 --- a/app/javascript/mastodon/features/status/components/detailed_status.js +++ b/app/javascript/mastodon/features/status/components/detailed_status.js @@ -276,7 +276,7 @@ class DetailedStatus extends ImmutablePureComponent { {media}
- + {edited}{visibilityLink}{applicationLink}{reblogLink} · {favouriteLink}
diff --git a/app/javascript/mastodon/features/ui/components/boost_modal.js b/app/javascript/mastodon/features/ui/components/boost_modal.js index 087eadba2..d6a6cea31 100644 --- a/app/javascript/mastodon/features/ui/components/boost_modal.js +++ b/app/javascript/mastodon/features/ui/components/boost_modal.js @@ -98,7 +98,7 @@ class BoostModal extends ImmutablePureComponent {
- + diff --git a/config/webpack/shared.js b/config/webpack/shared.js index 3447e711c..78f660cfc 100644 --- a/config/webpack/shared.js +++ b/config/webpack/shared.js @@ -55,7 +55,7 @@ module.exports = { chunks: 'all', minChunks: 2, minSize: 0, - test: /^(?!.*[\\\/]node_modules[\\\/]react-intl[\\\/]).+$/, + test: /^(?!.*[\\/]node_modules[\\/]react-intl[\\/]).+$/, }, }, }, -- cgit From eddfb33dfea6a17e71377d95498b557dd0194477 Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 13 Feb 2023 09:12:31 -0500 Subject: Enable ESLint import recommended rules (#23315) --- .eslintrc.js | 3 ++- app/javascript/mastodon/features/audio/index.js | 6 ++---- .../compose/containers/poll_form_container.js | 5 ++++- .../compose/containers/upload_container.js | 3 +-- .../getting_started/components/announcements.js | 3 +-- .../containers/column_settings_container.js | 3 +-- app/javascript/mastodon/features/status/index.js | 22 +++++++++++----------- 7 files changed, 22 insertions(+), 23 deletions(-) (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index ef52818b0..4d81aa47e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,6 +5,7 @@ module.exports = { 'eslint:recommended', 'plugin:react/recommended', 'plugin:jsx-a11y/recommended', + 'plugin:import/recommended', ], env: { @@ -177,6 +178,7 @@ module.exports = { }, ], + // See https://github.com/import-js/eslint-plugin-import/blob/main/config/recommended.js 'import/extensions': [ 'error', 'always', @@ -195,7 +197,6 @@ module.exports = { ], }, ], - 'import/no-unresolved': 'error', 'import/no-webpack-loader-syntax': 'error', 'promise/catch-or-return': [ diff --git a/app/javascript/mastodon/features/audio/index.js b/app/javascript/mastodon/features/audio/index.js index a55658360..bf954c06d 100644 --- a/app/javascript/mastodon/features/audio/index.js +++ b/app/javascript/mastodon/features/audio/index.js @@ -1,12 +1,10 @@ import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, FormattedMessage, injectIntl } from 'react-intl'; -import { formatTime } from 'mastodon/features/video'; +import { formatTime, getPointerPosition, fileNameFromURL } from 'mastodon/features/video'; import Icon from 'mastodon/components/icon'; import classNames from 'classnames'; -import { throttle } from 'lodash'; -import { getPointerPosition, fileNameFromURL } from 'mastodon/features/video'; -import { debounce } from 'lodash'; +import { throttle, debounce } from 'lodash'; import Visualizer from './visualizer'; import { displayMedia, useBlurhash } from '../../initial_state'; import Blurhash from '../../components/blurhash'; diff --git a/app/javascript/mastodon/features/compose/containers/poll_form_container.js b/app/javascript/mastodon/features/compose/containers/poll_form_container.js index c47fc7500..479117e91 100644 --- a/app/javascript/mastodon/features/compose/containers/poll_form_container.js +++ b/app/javascript/mastodon/features/compose/containers/poll_form_container.js @@ -1,7 +1,10 @@ import { connect } from 'react-redux'; import PollForm from '../components/poll_form'; -import { addPollOption, removePollOption, changePollOption, changePollSettings } from '../../../actions/compose'; import { + addPollOption, + removePollOption, + changePollOption, + changePollSettings, clearComposeSuggestions, fetchComposeSuggestions, selectComposeSuggestion, diff --git a/app/javascript/mastodon/features/compose/containers/upload_container.js b/app/javascript/mastodon/features/compose/containers/upload_container.js index 05cd2ecc1..5a8a64931 100644 --- a/app/javascript/mastodon/features/compose/containers/upload_container.js +++ b/app/javascript/mastodon/features/compose/containers/upload_container.js @@ -1,7 +1,6 @@ import { connect } from 'react-redux'; import Upload from '../components/upload'; -import { undoUploadCompose, initMediaEditModal } from '../../../actions/compose'; -import { submitCompose } from '../../../actions/compose'; +import { undoUploadCompose, initMediaEditModal, submitCompose } from '../../../actions/compose'; const mapStateToProps = (state, { id }) => ({ media: state.getIn(['compose', 'media_attachments']).find(item => item.get('id') === id), diff --git a/app/javascript/mastodon/features/getting_started/components/announcements.js b/app/javascript/mastodon/features/getting_started/components/announcements.js index d4afbabe3..0cae0bd1f 100644 --- a/app/javascript/mastodon/features/getting_started/components/announcements.js +++ b/app/javascript/mastodon/features/getting_started/components/announcements.js @@ -6,9 +6,8 @@ import PropTypes from 'prop-types'; import IconButton from 'mastodon/components/icon_button'; import Icon from 'mastodon/components/icon'; import { defineMessages, injectIntl, FormattedMessage, FormattedDate } from 'react-intl'; -import { autoPlayGif, reduceMotion, disableSwiping } from 'mastodon/initial_state'; +import { autoPlayGif, reduceMotion, disableSwiping, mascot } from 'mastodon/initial_state'; import elephantUIPlane from 'mastodon/../images/elephant_ui_plane.svg'; -import { mascot } from 'mastodon/initial_state'; import unicodeMapping from 'mastodon/features/emoji/emoji_unicode_mapping_light'; import classNames from 'classnames'; import EmojiPickerDropdown from 'mastodon/features/compose/containers/emoji_picker_dropdown_container'; diff --git a/app/javascript/mastodon/features/notifications/containers/column_settings_container.js b/app/javascript/mastodon/features/notifications/containers/column_settings_container.js index 9a70bd4f3..515afaca9 100644 --- a/app/javascript/mastodon/features/notifications/containers/column_settings_container.js +++ b/app/javascript/mastodon/features/notifications/containers/column_settings_container.js @@ -2,8 +2,7 @@ import { connect } from 'react-redux'; import { defineMessages, injectIntl } from 'react-intl'; import ColumnSettings from '../components/column_settings'; import { changeSetting } from '../../../actions/settings'; -import { setFilter } from '../../../actions/notifications'; -import { clearNotifications, requestBrowserPermission } from '../../../actions/notifications'; +import { setFilter, clearNotifications, requestBrowserPermission } from '../../../actions/notifications'; import { changeAlerts as changePushNotifications } from '../../../actions/push_notifications'; import { openModal } from '../../../actions/modal'; import { showAlert } from '../../../actions/alerts'; diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js index 38bbc6895..2c6728fc0 100644 --- a/app/javascript/mastodon/features/status/index.js +++ b/app/javascript/mastodon/features/status/index.js @@ -5,7 +5,17 @@ import PropTypes from 'prop-types'; import classNames from 'classnames'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { createSelector } from 'reselect'; -import { fetchStatus } from '../../actions/statuses'; +import { + fetchStatus, + muteStatus, + unmuteStatus, + deleteStatus, + editStatus, + hideStatus, + revealStatus, + translateStatus, + undoStatusTranslation, +} from '../../actions/statuses'; import MissingIndicator from '../../components/missing_indicator'; import LoadingIndicator from 'mastodon/components/loading_indicator'; import DetailedStatus from './components/detailed_status'; @@ -26,16 +36,6 @@ import { mentionCompose, directCompose, } from '../../actions/compose'; -import { - muteStatus, - unmuteStatus, - deleteStatus, - editStatus, - hideStatus, - revealStatus, - translateStatus, - undoStatusTranslation, -} from '../../actions/statuses'; import { unblockAccount, unmuteAccount, -- cgit From 5e1c0c3d946bef488f8e156ed3b5034740e731df Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Thu, 16 Feb 2023 01:30:56 -0500 Subject: Enable ESLint Promise plugin defaults (#22229) --- .eslintrc.js | 5 +++++ app/javascript/mastodon/utils/notifications.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index 4d81aa47e..b5ab511f8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,6 +6,7 @@ module.exports = { 'plugin:react/recommended', 'plugin:jsx-a11y/recommended', 'plugin:import/recommended', + 'plugin:promise/recommended', ], env: { @@ -199,11 +200,15 @@ module.exports = { ], 'import/no-webpack-loader-syntax': 'error', + 'promise/always-return': 'off', 'promise/catch-or-return': [ 'error', { allowFinally: true, }, ], + 'promise/no-callback-in-promise': 'off', + 'promise/no-nesting': 'off', + 'promise/no-promise-in-callback': 'off', }, }; diff --git a/app/javascript/mastodon/utils/notifications.js b/app/javascript/mastodon/utils/notifications.js index 7634cac21..3cdf7caea 100644 --- a/app/javascript/mastodon/utils/notifications.js +++ b/app/javascript/mastodon/utils/notifications.js @@ -3,7 +3,7 @@ const checkNotificationPromise = () => { try { - // eslint-disable-next-line promise/catch-or-return + // eslint-disable-next-line promise/catch-or-return, promise/valid-params Notification.requestPermission().then(); } catch(e) { return false; -- cgit From 44a7d87cb1f5df953b6c14c16c59e2e4ead1bcb9 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Mon, 20 Feb 2023 03:20:59 +0100 Subject: Rename JSX files with proper `.jsx` extension (#23733) --- .eslintrc.js | 5 +- .github/workflows/lint-js.yml | 2 + .github/workflows/test-js.yml | 2 + .../__snapshots__/autosuggest_emoji-test.js.snap | 27 - .../__snapshots__/autosuggest_emoji-test.jsx.snap | 27 + .../__tests__/__snapshots__/avatar-test.js.snap | 39 -- .../__tests__/__snapshots__/avatar-test.jsx.snap | 39 ++ .../__snapshots__/avatar_overlay-test.js.snap | 54 -- .../__snapshots__/avatar_overlay-test.jsx.snap | 54 ++ .../__tests__/__snapshots__/button-test.js.snap | 66 -- .../__tests__/__snapshots__/button-test.jsx.snap | 66 ++ .../__snapshots__/display_name-test.js.snap | 27 - .../__snapshots__/display_name-test.jsx.snap | 27 + .../components/__tests__/autosuggest_emoji-test.js | 29 - .../__tests__/autosuggest_emoji-test.jsx | 29 + .../mastodon/components/__tests__/avatar-test.js | 36 -- .../mastodon/components/__tests__/avatar-test.jsx | 36 ++ .../components/__tests__/avatar_overlay-test.js | 29 - .../components/__tests__/avatar_overlay-test.jsx | 29 + .../mastodon/components/__tests__/button-test.js | 75 --- .../mastodon/components/__tests__/button-test.jsx | 75 +++ .../components/__tests__/display_name-test.js | 18 - .../components/__tests__/display_name-test.jsx | 18 + app/javascript/mastodon/components/account.js | 157 ----- app/javascript/mastodon/components/account.jsx | 157 +++++ .../mastodon/components/admin/Counter.js | 117 ---- .../mastodon/components/admin/Counter.jsx | 117 ++++ .../mastodon/components/admin/Dimension.js | 93 --- .../mastodon/components/admin/Dimension.jsx | 93 +++ .../components/admin/ReportReasonSelector.js | 159 ----- .../components/admin/ReportReasonSelector.jsx | 159 +++++ .../mastodon/components/admin/Retention.js | 151 ----- .../mastodon/components/admin/Retention.jsx | 151 +++++ app/javascript/mastodon/components/admin/Trends.js | 73 --- .../mastodon/components/admin/Trends.jsx | 73 +++ .../mastodon/components/animated_number.js | 76 --- .../mastodon/components/animated_number.jsx | 76 +++ .../mastodon/components/attachment_list.js | 48 -- .../mastodon/components/attachment_list.jsx | 48 ++ .../mastodon/components/autosuggest_emoji.js | 41 -- .../mastodon/components/autosuggest_emoji.jsx | 41 ++ .../mastodon/components/autosuggest_hashtag.js | 42 -- .../mastodon/components/autosuggest_hashtag.jsx | 42 ++ .../mastodon/components/autosuggest_input.js | 227 ------- .../mastodon/components/autosuggest_input.jsx | 227 +++++++ .../mastodon/components/autosuggest_textarea.js | 235 ------- .../mastodon/components/autosuggest_textarea.jsx | 235 +++++++ app/javascript/mastodon/components/avatar.js | 62 -- app/javascript/mastodon/components/avatar.jsx | 62 ++ .../mastodon/components/avatar_composite.js | 103 ---- .../mastodon/components/avatar_composite.jsx | 103 ++++ .../mastodon/components/avatar_overlay.js | 51 -- .../mastodon/components/avatar_overlay.jsx | 51 ++ app/javascript/mastodon/components/blurhash.js | 65 -- app/javascript/mastodon/components/blurhash.jsx | 65 ++ app/javascript/mastodon/components/button.js | 57 -- app/javascript/mastodon/components/button.jsx | 57 ++ app/javascript/mastodon/components/check.js | 9 - app/javascript/mastodon/components/check.jsx | 9 + app/javascript/mastodon/components/column.js | 62 -- app/javascript/mastodon/components/column.jsx | 62 ++ .../mastodon/components/column_back_button.js | 54 -- .../mastodon/components/column_back_button.jsx | 54 ++ .../mastodon/components/column_back_button_slim.js | 19 - .../components/column_back_button_slim.jsx | 19 + .../mastodon/components/column_header.js | 215 ------- .../mastodon/components/column_header.jsx | 215 +++++++ .../mastodon/components/common_counter.js | 62 -- .../mastodon/components/common_counter.jsx | 62 ++ .../mastodon/components/dismissable_banner.js | 51 -- .../mastodon/components/dismissable_banner.jsx | 51 ++ app/javascript/mastodon/components/display_name.js | 79 --- .../mastodon/components/display_name.jsx | 79 +++ app/javascript/mastodon/components/domain.js | 42 -- app/javascript/mastodon/components/domain.jsx | 42 ++ .../mastodon/components/dropdown_menu.js | 335 ---------- .../mastodon/components/dropdown_menu.jsx | 335 ++++++++++ .../mastodon/components/edited_timestamp/index.js | 70 --- .../mastodon/components/edited_timestamp/index.jsx | 70 +++ .../mastodon/components/error_boundary.js | 107 ---- .../mastodon/components/error_boundary.jsx | 107 ++++ app/javascript/mastodon/components/gifv.js | 73 --- app/javascript/mastodon/components/gifv.jsx | 73 +++ app/javascript/mastodon/components/hashtag.js | 113 ---- app/javascript/mastodon/components/hashtag.jsx | 113 ++++ app/javascript/mastodon/components/icon.js | 21 - app/javascript/mastodon/components/icon.jsx | 21 + app/javascript/mastodon/components/icon_button.js | 164 ----- app/javascript/mastodon/components/icon_button.jsx | 164 +++++ .../mastodon/components/icon_with_badge.js | 22 - .../mastodon/components/icon_with_badge.jsx | 22 + app/javascript/mastodon/components/image.js | 33 - app/javascript/mastodon/components/image.jsx | 33 + .../mastodon/components/inline_account.js | 34 - .../mastodon/components/inline_account.jsx | 34 + .../components/intersection_observer_article.js | 130 ---- .../components/intersection_observer_article.jsx | 130 ++++ app/javascript/mastodon/components/load_gap.js | 34 - app/javascript/mastodon/components/load_gap.jsx | 34 + app/javascript/mastodon/components/load_more.js | 27 - app/javascript/mastodon/components/load_more.jsx | 27 + app/javascript/mastodon/components/load_pending.js | 22 - .../mastodon/components/load_pending.jsx | 22 + .../mastodon/components/loading_indicator.js | 32 - .../mastodon/components/loading_indicator.jsx | 32 + app/javascript/mastodon/components/logo.js | 10 - app/javascript/mastodon/components/logo.jsx | 10 + .../mastodon/components/media_attachments.js | 116 ---- .../mastodon/components/media_attachments.jsx | 116 ++++ .../mastodon/components/media_gallery.js | 368 ----------- .../mastodon/components/media_gallery.jsx | 368 +++++++++++ .../mastodon/components/missing_indicator.js | 29 - .../mastodon/components/missing_indicator.jsx | 29 + app/javascript/mastodon/components/modal_root.js | 157 ----- app/javascript/mastodon/components/modal_root.jsx | 157 +++++ .../mastodon/components/navigation_portal.js | 35 -- .../mastodon/components/navigation_portal.jsx | 35 ++ .../mastodon/components/not_signed_in_indicator.js | 12 - .../components/not_signed_in_indicator.jsx | 12 + .../components/picture_in_picture_placeholder.js | 69 --- .../components/picture_in_picture_placeholder.jsx | 69 +++ app/javascript/mastodon/components/poll.js | 233 ------- app/javascript/mastodon/components/poll.jsx | 233 +++++++ app/javascript/mastodon/components/radio_button.js | 35 -- .../mastodon/components/radio_button.jsx | 35 ++ .../mastodon/components/regeneration_indicator.js | 18 - .../mastodon/components/regeneration_indicator.jsx | 18 + .../mastodon/components/relative_timestamp.js | 199 ------ .../mastodon/components/relative_timestamp.jsx | 199 ++++++ .../mastodon/components/scrollable_list.js | 367 ----------- .../mastodon/components/scrollable_list.jsx | 367 +++++++++++ .../mastodon/components/server_banner.js | 93 --- .../mastodon/components/server_banner.jsx | 93 +++ app/javascript/mastodon/components/short_number.js | 117 ---- .../mastodon/components/short_number.jsx | 117 ++++ app/javascript/mastodon/components/skeleton.js | 11 - app/javascript/mastodon/components/skeleton.jsx | 11 + app/javascript/mastodon/components/status.js | 547 ---------------- app/javascript/mastodon/components/status.jsx | 547 ++++++++++++++++ .../mastodon/components/status_action_bar.js | 387 ------------ .../mastodon/components/status_action_bar.jsx | 387 ++++++++++++ .../mastodon/components/status_content.js | 304 --------- .../mastodon/components/status_content.jsx | 304 +++++++++ app/javascript/mastodon/components/status_list.js | 131 ---- app/javascript/mastodon/components/status_list.jsx | 131 ++++ .../mastodon/components/timeline_hint.js | 18 - .../mastodon/components/timeline_hint.jsx | 18 + .../mastodon/containers/account_container.js | 72 --- .../mastodon/containers/account_container.jsx | 72 +++ .../mastodon/containers/admin_component.js | 26 - .../mastodon/containers/admin_component.jsx | 26 + .../mastodon/containers/compose_container.js | 41 -- .../mastodon/containers/compose_container.jsx | 41 ++ .../mastodon/containers/domain_container.js | 32 - .../mastodon/containers/domain_container.jsx | 32 + app/javascript/mastodon/containers/mastodon.js | 98 --- app/javascript/mastodon/containers/mastodon.jsx | 98 +++ .../mastodon/containers/media_container.js | 121 ---- .../mastodon/containers/media_container.jsx | 121 ++++ .../mastodon/containers/status_container.js | 250 -------- .../mastodon/containers/status_container.jsx | 250 ++++++++ app/javascript/mastodon/features/about/index.js | 219 ------- app/javascript/mastodon/features/about/index.jsx | 219 +++++++ .../features/account/components/account_note.js | 170 ----- .../features/account/components/account_note.jsx | 170 +++++ .../features/account/components/featured_tags.js | 52 -- .../features/account/components/featured_tags.jsx | 52 ++ .../account/components/follow_request_note.js | 37 -- .../account/components/follow_request_note.jsx | 37 ++ .../mastodon/features/account/components/header.js | 421 ------------- .../features/account/components/header.jsx | 421 +++++++++++++ .../mastodon/features/account/navigation.js | 52 -- .../mastodon/features/account/navigation.jsx | 52 ++ .../account_gallery/components/media_item.js | 146 ----- .../account_gallery/components/media_item.jsx | 146 +++++ .../mastodon/features/account_gallery/index.js | 228 ------- .../mastodon/features/account_gallery/index.jsx | 228 +++++++ .../features/account_timeline/components/header.js | 153 ----- .../account_timeline/components/header.jsx | 153 +++++ .../components/limited_account_hint.js | 36 -- .../components/limited_account_hint.jsx | 36 ++ .../account_timeline/components/moved_note.js | 37 -- .../account_timeline/components/moved_note.jsx | 37 ++ .../containers/header_container.js | 164 ----- .../containers/header_container.jsx | 164 +++++ .../mastodon/features/account_timeline/index.js | 208 ------- .../mastodon/features/account_timeline/index.jsx | 208 +++++++ app/javascript/mastodon/features/audio/index.js | 569 ----------------- app/javascript/mastodon/features/audio/index.jsx | 569 +++++++++++++++++ app/javascript/mastodon/features/blocks/index.js | 79 --- app/javascript/mastodon/features/blocks/index.jsx | 79 +++ .../mastodon/features/bookmarked_statuses/index.js | 108 ---- .../features/bookmarked_statuses/index.jsx | 108 ++++ .../features/closed_registrations_modal/index.js | 75 --- .../features/closed_registrations_modal/index.jsx | 75 +++ .../components/column_settings.js | 29 - .../components/column_settings.jsx | 29 + .../mastodon/features/community_timeline/index.js | 160 ----- .../mastodon/features/community_timeline/index.jsx | 160 +++++ .../features/compose/components/action_bar.js | 67 -- .../features/compose/components/action_bar.jsx | 67 ++ .../compose/components/autosuggest_account.js | 24 - .../compose/components/autosuggest_account.jsx | 24 + .../compose/components/character_counter.js | 25 - .../compose/components/character_counter.jsx | 25 + .../features/compose/components/compose_form.js | 301 --------- .../features/compose/components/compose_form.jsx | 301 +++++++++ .../compose/components/emoji_picker_dropdown.js | 411 ------------ .../compose/components/emoji_picker_dropdown.jsx | 411 ++++++++++++ .../compose/components/language_dropdown.js | 327 ---------- .../compose/components/language_dropdown.jsx | 327 ++++++++++ .../features/compose/components/navigation_bar.js | 43 -- .../features/compose/components/navigation_bar.jsx | 43 ++ .../features/compose/components/poll_button.js | 55 -- .../features/compose/components/poll_button.jsx | 55 ++ .../features/compose/components/poll_form.js | 182 ------ .../features/compose/components/poll_form.jsx | 182 ++++++ .../compose/components/privacy_dropdown.js | 287 --------- .../compose/components/privacy_dropdown.jsx | 287 +++++++++ .../features/compose/components/reply_indicator.js | 71 --- .../compose/components/reply_indicator.jsx | 71 +++ .../mastodon/features/compose/components/search.js | 147 ----- .../features/compose/components/search.jsx | 147 +++++ .../features/compose/components/search_results.js | 140 ----- .../features/compose/components/search_results.jsx | 140 +++++ .../compose/components/text_icon_button.js | 38 -- .../compose/components/text_icon_button.jsx | 38 ++ .../mastodon/features/compose/components/upload.js | 66 -- .../features/compose/components/upload.jsx | 66 ++ .../features/compose/components/upload_button.js | 83 --- .../features/compose/components/upload_button.jsx | 83 +++ .../features/compose/components/upload_form.js | 32 - .../features/compose/components/upload_form.jsx | 32 + .../features/compose/components/upload_progress.js | 52 -- .../compose/components/upload_progress.jsx | 52 ++ .../features/compose/components/warning.js | 26 - .../features/compose/components/warning.jsx | 26 + .../containers/sensitive_button_container.js | 71 --- .../containers/sensitive_button_container.jsx | 71 +++ .../compose/containers/warning_container.js | 67 -- .../compose/containers/warning_container.jsx | 67 ++ app/javascript/mastodon/features/compose/index.js | 150 ----- app/javascript/mastodon/features/compose/index.jsx | 150 +++++ .../direct_timeline/components/conversation.js | 200 ------ .../direct_timeline/components/conversation.jsx | 200 ++++++ .../components/conversations_list.js | 75 --- .../components/conversations_list.jsx | 75 +++ .../mastodon/features/direct_timeline/index.js | 107 ---- .../mastodon/features/direct_timeline/index.jsx | 107 ++++ .../features/directory/components/account_card.js | 235 ------- .../features/directory/components/account_card.jsx | 235 +++++++ .../mastodon/features/directory/index.js | 178 ------ .../mastodon/features/directory/index.jsx | 178 ++++++ .../mastodon/features/domain_blocks/index.js | 83 --- .../mastodon/features/domain_blocks/index.jsx | 83 +++ .../mastodon/features/explore/components/story.js | 51 -- .../mastodon/features/explore/components/story.jsx | 51 ++ app/javascript/mastodon/features/explore/index.js | 107 ---- app/javascript/mastodon/features/explore/index.jsx | 107 ++++ app/javascript/mastodon/features/explore/links.js | 70 --- app/javascript/mastodon/features/explore/links.jsx | 70 +++ .../mastodon/features/explore/results.js | 126 ---- .../mastodon/features/explore/results.jsx | 126 ++++ .../mastodon/features/explore/statuses.js | 64 -- .../mastodon/features/explore/statuses.jsx | 64 ++ .../mastodon/features/explore/suggestions.js | 51 -- .../mastodon/features/explore/suggestions.jsx | 51 ++ app/javascript/mastodon/features/explore/tags.js | 62 -- app/javascript/mastodon/features/explore/tags.jsx | 62 ++ .../mastodon/features/favourited_statuses/index.js | 108 ---- .../features/favourited_statuses/index.jsx | 108 ++++ .../mastodon/features/favourites/index.js | 92 --- .../mastodon/features/favourites/index.jsx | 92 +++ .../mastodon/features/filters/added_to_filter.js | 102 --- .../mastodon/features/filters/added_to_filter.jsx | 102 +++ .../mastodon/features/filters/select_filter.js | 192 ------ .../mastodon/features/filters/select_filter.jsx | 192 ++++++ .../follow_recommendations/components/account.js | 85 --- .../follow_recommendations/components/account.jsx | 85 +++ .../features/follow_recommendations/index.js | 116 ---- .../features/follow_recommendations/index.jsx | 116 ++++ .../components/account_authorize.js | 49 -- .../components/account_authorize.jsx | 49 ++ .../mastodon/features/follow_requests/index.js | 91 --- .../mastodon/features/follow_requests/index.jsx | 91 +++ .../mastodon/features/followed_tags/index.js | 89 --- .../mastodon/features/followed_tags/index.jsx | 89 +++ .../mastodon/features/followers/index.js | 170 ----- .../mastodon/features/followers/index.jsx | 170 +++++ .../mastodon/features/following/index.js | 170 ----- .../mastodon/features/following/index.jsx | 170 +++++ .../mastodon/features/generic_not_found/index.js | 11 - .../mastodon/features/generic_not_found/index.jsx | 11 + .../getting_started/components/announcements.js | 449 -------------- .../getting_started/components/announcements.jsx | 449 ++++++++++++++ .../features/getting_started/components/trends.js | 51 -- .../features/getting_started/components/trends.jsx | 51 ++ .../mastodon/features/getting_started/index.js | 155 ----- .../mastodon/features/getting_started/index.jsx | 155 +++++ .../hashtag_timeline/components/column_settings.js | 133 ---- .../components/column_settings.jsx | 133 ++++ .../mastodon/features/hashtag_timeline/index.js | 237 ------- .../mastodon/features/hashtag_timeline/index.jsx | 237 +++++++ .../home_timeline/components/column_settings.js | 34 - .../home_timeline/components/column_settings.jsx | 34 + .../mastodon/features/home_timeline/index.js | 176 ------ .../mastodon/features/home_timeline/index.jsx | 176 ++++++ .../mastodon/features/interaction_modal/index.js | 161 ----- .../mastodon/features/interaction_modal/index.jsx | 161 +++++ .../mastodon/features/keyboard_shortcuts/index.js | 176 ------ .../mastodon/features/keyboard_shortcuts/index.jsx | 176 ++++++ .../features/list_adder/components/account.js | 43 -- .../features/list_adder/components/account.jsx | 43 ++ .../features/list_adder/components/list.js | 69 --- .../features/list_adder/components/list.jsx | 69 +++ .../mastodon/features/list_adder/index.js | 73 --- .../mastodon/features/list_adder/index.jsx | 73 +++ .../features/list_editor/components/account.js | 77 --- .../features/list_editor/components/account.jsx | 77 +++ .../list_editor/components/edit_list_form.js | 70 --- .../list_editor/components/edit_list_form.jsx | 70 +++ .../features/list_editor/components/search.js | 76 --- .../features/list_editor/components/search.jsx | 76 +++ .../mastodon/features/list_editor/index.js | 79 --- .../mastodon/features/list_editor/index.jsx | 79 +++ .../mastodon/features/list_timeline/index.js | 221 ------- .../mastodon/features/list_timeline/index.jsx | 221 +++++++ .../features/lists/components/new_list_form.js | 77 --- .../features/lists/components/new_list_form.jsx | 77 +++ app/javascript/mastodon/features/lists/index.js | 89 --- app/javascript/mastodon/features/lists/index.jsx | 89 +++ app/javascript/mastodon/features/mutes/index.js | 84 --- app/javascript/mastodon/features/mutes/index.jsx | 84 +++ .../components/clear_column_button.js | 18 - .../components/clear_column_button.jsx | 18 + .../notifications/components/column_settings.js | 202 ------ .../notifications/components/column_settings.jsx | 202 ++++++ .../notifications/components/filter_bar.js | 110 ---- .../notifications/components/filter_bar.jsx | 110 ++++ .../notifications/components/follow_request.js | 59 -- .../notifications/components/follow_request.jsx | 59 ++ .../components/grant_permission_button.js | 19 - .../components/grant_permission_button.jsx | 19 + .../notifications/components/notification.js | 449 -------------- .../notifications/components/notification.jsx | 449 ++++++++++++++ .../components/notifications_permission_banner.js | 48 -- .../components/notifications_permission_banner.jsx | 48 ++ .../features/notifications/components/report.js | 62 -- .../features/notifications/components/report.jsx | 62 ++ .../notifications/components/setting_toggle.js | 34 - .../notifications/components/setting_toggle.jsx | 34 + .../mastodon/features/notifications/index.js | 290 --------- .../mastodon/features/notifications/index.jsx | 290 +++++++++ .../picture_in_picture/components/footer.js | 192 ------ .../picture_in_picture/components/footer.jsx | 192 ++++++ .../picture_in_picture/components/header.js | 47 -- .../picture_in_picture/components/header.jsx | 47 ++ .../mastodon/features/picture_in_picture/index.js | 85 --- .../mastodon/features/picture_in_picture/index.jsx | 85 +++ .../mastodon/features/pinned_statuses/index.js | 65 -- .../mastodon/features/pinned_statuses/index.jsx | 65 ++ .../mastodon/features/privacy_policy/index.js | 61 -- .../mastodon/features/privacy_policy/index.jsx | 61 ++ .../public_timeline/components/column_settings.js | 30 - .../public_timeline/components/column_settings.jsx | 30 + .../mastodon/features/public_timeline/index.js | 162 ----- .../mastodon/features/public_timeline/index.jsx | 162 +++++ app/javascript/mastodon/features/reblogs/index.js | 92 --- app/javascript/mastodon/features/reblogs/index.jsx | 92 +++ .../mastodon/features/report/category.js | 106 ---- .../mastodon/features/report/category.jsx | 106 ++++ app/javascript/mastodon/features/report/comment.js | 83 --- .../mastodon/features/report/comment.jsx | 83 +++ .../mastodon/features/report/components/option.js | 60 -- .../mastodon/features/report/components/option.jsx | 60 ++ .../features/report/components/status_check_box.js | 82 --- .../report/components/status_check_box.jsx | 82 +++ app/javascript/mastodon/features/report/rules.js | 64 -- app/javascript/mastodon/features/report/rules.jsx | 64 ++ .../mastodon/features/report/statuses.js | 61 -- .../mastodon/features/report/statuses.jsx | 61 ++ app/javascript/mastodon/features/report/thanks.js | 84 --- app/javascript/mastodon/features/report/thanks.jsx | 84 +++ .../mastodon/features/standalone/compose/index.js | 20 - .../mastodon/features/standalone/compose/index.jsx | 20 + .../features/status/components/action_bar.js | 300 --------- .../features/status/components/action_bar.jsx | 300 +++++++++ .../mastodon/features/status/components/card.js | 289 --------- .../mastodon/features/status/components/card.jsx | 289 +++++++++ .../features/status/components/detailed_status.js | 288 --------- .../features/status/components/detailed_status.jsx | 288 +++++++++ app/javascript/mastodon/features/status/index.js | 686 --------------------- app/javascript/mastodon/features/status/index.jsx | 686 +++++++++++++++++++++ .../features/subscribed_languages_modal/index.js | 125 ---- .../features/subscribed_languages_modal/index.jsx | 125 ++++ .../ui/components/__tests__/column-test.js | 24 - .../ui/components/__tests__/column-test.jsx | 24 + .../features/ui/components/actions_modal.js | 46 -- .../features/ui/components/actions_modal.jsx | 46 ++ .../mastodon/features/ui/components/audio_modal.js | 54 -- .../features/ui/components/audio_modal.jsx | 54 ++ .../mastodon/features/ui/components/block_modal.js | 103 ---- .../features/ui/components/block_modal.jsx | 103 ++++ .../mastodon/features/ui/components/boost_modal.js | 142 ----- .../features/ui/components/boost_modal.jsx | 142 +++++ .../mastodon/features/ui/components/bundle.js | 106 ---- .../mastodon/features/ui/components/bundle.jsx | 106 ++++ .../features/ui/components/bundle_column_error.js | 162 ----- .../features/ui/components/bundle_column_error.jsx | 162 +++++ .../features/ui/components/bundle_modal_error.js | 53 -- .../features/ui/components/bundle_modal_error.jsx | 53 ++ .../mastodon/features/ui/components/column.js | 72 --- .../mastodon/features/ui/components/column.jsx | 72 +++ .../features/ui/components/column_header.js | 38 -- .../features/ui/components/column_header.jsx | 38 ++ .../mastodon/features/ui/components/column_link.js | 41 -- .../features/ui/components/column_link.jsx | 41 ++ .../features/ui/components/column_loading.js | 32 - .../features/ui/components/column_loading.jsx | 32 + .../features/ui/components/column_subheading.js | 16 - .../features/ui/components/column_subheading.jsx | 16 + .../features/ui/components/columns_area.js | 181 ------ .../features/ui/components/columns_area.jsx | 181 ++++++ .../ui/components/compare_history_modal.js | 99 --- .../ui/components/compare_history_modal.jsx | 99 +++ .../features/ui/components/compose_panel.js | 68 -- .../features/ui/components/compose_panel.jsx | 68 ++ .../features/ui/components/confirmation_modal.js | 70 --- .../features/ui/components/confirmation_modal.jsx | 70 +++ .../ui/components/disabled_account_banner.js | 92 --- .../ui/components/disabled_account_banner.jsx | 92 +++ .../features/ui/components/drawer_loading.js | 11 - .../features/ui/components/drawer_loading.jsx | 11 + .../mastodon/features/ui/components/embed_modal.js | 97 --- .../features/ui/components/embed_modal.jsx | 97 +++ .../features/ui/components/filter_modal.js | 134 ---- .../features/ui/components/filter_modal.jsx | 134 ++++ .../features/ui/components/focal_point_modal.js | 430 ------------- .../features/ui/components/focal_point_modal.jsx | 430 +++++++++++++ .../ui/components/follow_requests_column_link.js | 51 -- .../ui/components/follow_requests_column_link.jsx | 51 ++ .../mastodon/features/ui/components/header.js | 87 --- .../mastodon/features/ui/components/header.jsx | 87 +++ .../features/ui/components/image_loader.js | 168 ----- .../features/ui/components/image_loader.jsx | 168 +++++ .../mastodon/features/ui/components/image_modal.js | 59 -- .../features/ui/components/image_modal.jsx | 59 ++ .../mastodon/features/ui/components/link_footer.js | 102 --- .../features/ui/components/link_footer.jsx | 102 +++ .../mastodon/features/ui/components/list_panel.js | 55 -- .../mastodon/features/ui/components/list_panel.jsx | 55 ++ .../mastodon/features/ui/components/media_modal.js | 250 -------- .../features/ui/components/media_modal.jsx | 250 ++++++++ .../features/ui/components/modal_loading.js | 20 - .../features/ui/components/modal_loading.jsx | 20 + .../mastodon/features/ui/components/modal_root.js | 133 ---- .../mastodon/features/ui/components/modal_root.jsx | 133 ++++ .../mastodon/features/ui/components/mute_modal.js | 140 ----- .../mastodon/features/ui/components/mute_modal.jsx | 140 +++++ .../features/ui/components/navigation_panel.js | 107 ---- .../features/ui/components/navigation_panel.jsx | 107 ++++ .../features/ui/components/report_modal.js | 219 ------- .../features/ui/components/report_modal.jsx | 219 +++++++ .../features/ui/components/sign_in_banner.js | 40 -- .../features/ui/components/sign_in_banner.jsx | 40 ++ .../mastodon/features/ui/components/upload_area.js | 52 -- .../features/ui/components/upload_area.jsx | 52 ++ .../mastodon/features/ui/components/video_modal.js | 62 -- .../features/ui/components/video_modal.jsx | 62 ++ .../features/ui/components/zoomable_image.js | 450 -------------- .../features/ui/components/zoomable_image.jsx | 450 ++++++++++++++ app/javascript/mastodon/features/ui/index.js | 589 ------------------ app/javascript/mastodon/features/ui/index.jsx | 589 ++++++++++++++++++ .../features/ui/util/react_router_helpers.js | 101 --- .../features/ui/util/react_router_helpers.jsx | 101 +++ .../mastodon/features/ui/util/reduced_motion.js | 44 -- .../mastodon/features/ui/util/reduced_motion.jsx | 44 ++ app/javascript/mastodon/features/video/index.js | 655 -------------------- app/javascript/mastodon/features/video/index.jsx | 655 ++++++++++++++++++++ app/javascript/mastodon/main.js | 46 -- app/javascript/mastodon/main.jsx | 46 ++ app/javascript/mastodon/utils/icons.js | 15 - app/javascript/mastodon/utils/icons.jsx | 15 + app/javascript/packs/admin.js | 245 -------- app/javascript/packs/admin.jsx | 245 ++++++++ app/javascript/packs/public.js | 332 ---------- app/javascript/packs/public.jsx | 332 ++++++++++ app/javascript/packs/share.js | 26 - app/javascript/packs/share.jsx | 26 + config/webpacker.yml | 1 + package.json | 2 +- 491 files changed, 29087 insertions(+), 29079 deletions(-) delete mode 100644 app/javascript/mastodon/components/__tests__/__snapshots__/autosuggest_emoji-test.js.snap create mode 100644 app/javascript/mastodon/components/__tests__/__snapshots__/autosuggest_emoji-test.jsx.snap delete mode 100644 app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.js.snap create mode 100644 app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.jsx.snap delete mode 100644 app/javascript/mastodon/components/__tests__/__snapshots__/avatar_overlay-test.js.snap create mode 100644 app/javascript/mastodon/components/__tests__/__snapshots__/avatar_overlay-test.jsx.snap delete mode 100644 app/javascript/mastodon/components/__tests__/__snapshots__/button-test.js.snap create mode 100644 app/javascript/mastodon/components/__tests__/__snapshots__/button-test.jsx.snap delete mode 100644 app/javascript/mastodon/components/__tests__/__snapshots__/display_name-test.js.snap create mode 100644 app/javascript/mastodon/components/__tests__/__snapshots__/display_name-test.jsx.snap delete mode 100644 app/javascript/mastodon/components/__tests__/autosuggest_emoji-test.js create mode 100644 app/javascript/mastodon/components/__tests__/autosuggest_emoji-test.jsx delete mode 100644 app/javascript/mastodon/components/__tests__/avatar-test.js create mode 100644 app/javascript/mastodon/components/__tests__/avatar-test.jsx delete mode 100644 app/javascript/mastodon/components/__tests__/avatar_overlay-test.js create mode 100644 app/javascript/mastodon/components/__tests__/avatar_overlay-test.jsx delete mode 100644 app/javascript/mastodon/components/__tests__/button-test.js create mode 100644 app/javascript/mastodon/components/__tests__/button-test.jsx delete mode 100644 app/javascript/mastodon/components/__tests__/display_name-test.js create mode 100644 app/javascript/mastodon/components/__tests__/display_name-test.jsx delete mode 100644 app/javascript/mastodon/components/account.js create mode 100644 app/javascript/mastodon/components/account.jsx delete mode 100644 app/javascript/mastodon/components/admin/Counter.js create mode 100644 app/javascript/mastodon/components/admin/Counter.jsx delete mode 100644 app/javascript/mastodon/components/admin/Dimension.js create mode 100644 app/javascript/mastodon/components/admin/Dimension.jsx delete mode 100644 app/javascript/mastodon/components/admin/ReportReasonSelector.js create mode 100644 app/javascript/mastodon/components/admin/ReportReasonSelector.jsx delete mode 100644 app/javascript/mastodon/components/admin/Retention.js create mode 100644 app/javascript/mastodon/components/admin/Retention.jsx delete mode 100644 app/javascript/mastodon/components/admin/Trends.js create mode 100644 app/javascript/mastodon/components/admin/Trends.jsx delete mode 100644 app/javascript/mastodon/components/animated_number.js create mode 100644 app/javascript/mastodon/components/animated_number.jsx delete mode 100644 app/javascript/mastodon/components/attachment_list.js create mode 100644 app/javascript/mastodon/components/attachment_list.jsx delete mode 100644 app/javascript/mastodon/components/autosuggest_emoji.js create mode 100644 app/javascript/mastodon/components/autosuggest_emoji.jsx delete mode 100644 app/javascript/mastodon/components/autosuggest_hashtag.js create mode 100644 app/javascript/mastodon/components/autosuggest_hashtag.jsx delete mode 100644 app/javascript/mastodon/components/autosuggest_input.js create mode 100644 app/javascript/mastodon/components/autosuggest_input.jsx delete mode 100644 app/javascript/mastodon/components/autosuggest_textarea.js create mode 100644 app/javascript/mastodon/components/autosuggest_textarea.jsx delete mode 100644 app/javascript/mastodon/components/avatar.js create mode 100644 app/javascript/mastodon/components/avatar.jsx delete mode 100644 app/javascript/mastodon/components/avatar_composite.js create mode 100644 app/javascript/mastodon/components/avatar_composite.jsx delete mode 100644 app/javascript/mastodon/components/avatar_overlay.js create mode 100644 app/javascript/mastodon/components/avatar_overlay.jsx delete mode 100644 app/javascript/mastodon/components/blurhash.js create mode 100644 app/javascript/mastodon/components/blurhash.jsx delete mode 100644 app/javascript/mastodon/components/button.js create mode 100644 app/javascript/mastodon/components/button.jsx delete mode 100644 app/javascript/mastodon/components/check.js create mode 100644 app/javascript/mastodon/components/check.jsx delete mode 100644 app/javascript/mastodon/components/column.js create mode 100644 app/javascript/mastodon/components/column.jsx delete mode 100644 app/javascript/mastodon/components/column_back_button.js create mode 100644 app/javascript/mastodon/components/column_back_button.jsx delete mode 100644 app/javascript/mastodon/components/column_back_button_slim.js create mode 100644 app/javascript/mastodon/components/column_back_button_slim.jsx delete mode 100644 app/javascript/mastodon/components/column_header.js create mode 100644 app/javascript/mastodon/components/column_header.jsx delete mode 100644 app/javascript/mastodon/components/common_counter.js create mode 100644 app/javascript/mastodon/components/common_counter.jsx delete mode 100644 app/javascript/mastodon/components/dismissable_banner.js create mode 100644 app/javascript/mastodon/components/dismissable_banner.jsx delete mode 100644 app/javascript/mastodon/components/display_name.js create mode 100644 app/javascript/mastodon/components/display_name.jsx delete mode 100644 app/javascript/mastodon/components/domain.js create mode 100644 app/javascript/mastodon/components/domain.jsx delete mode 100644 app/javascript/mastodon/components/dropdown_menu.js create mode 100644 app/javascript/mastodon/components/dropdown_menu.jsx delete mode 100644 app/javascript/mastodon/components/edited_timestamp/index.js create mode 100644 app/javascript/mastodon/components/edited_timestamp/index.jsx delete mode 100644 app/javascript/mastodon/components/error_boundary.js create mode 100644 app/javascript/mastodon/components/error_boundary.jsx delete mode 100644 app/javascript/mastodon/components/gifv.js create mode 100644 app/javascript/mastodon/components/gifv.jsx delete mode 100644 app/javascript/mastodon/components/hashtag.js create mode 100644 app/javascript/mastodon/components/hashtag.jsx delete mode 100644 app/javascript/mastodon/components/icon.js create mode 100644 app/javascript/mastodon/components/icon.jsx delete mode 100644 app/javascript/mastodon/components/icon_button.js create mode 100644 app/javascript/mastodon/components/icon_button.jsx delete mode 100644 app/javascript/mastodon/components/icon_with_badge.js create mode 100644 app/javascript/mastodon/components/icon_with_badge.jsx delete mode 100644 app/javascript/mastodon/components/image.js create mode 100644 app/javascript/mastodon/components/image.jsx delete mode 100644 app/javascript/mastodon/components/inline_account.js create mode 100644 app/javascript/mastodon/components/inline_account.jsx delete mode 100644 app/javascript/mastodon/components/intersection_observer_article.js create mode 100644 app/javascript/mastodon/components/intersection_observer_article.jsx delete mode 100644 app/javascript/mastodon/components/load_gap.js create mode 100644 app/javascript/mastodon/components/load_gap.jsx delete mode 100644 app/javascript/mastodon/components/load_more.js create mode 100644 app/javascript/mastodon/components/load_more.jsx delete mode 100644 app/javascript/mastodon/components/load_pending.js create mode 100644 app/javascript/mastodon/components/load_pending.jsx delete mode 100644 app/javascript/mastodon/components/loading_indicator.js create mode 100644 app/javascript/mastodon/components/loading_indicator.jsx delete mode 100644 app/javascript/mastodon/components/logo.js create mode 100644 app/javascript/mastodon/components/logo.jsx delete mode 100644 app/javascript/mastodon/components/media_attachments.js create mode 100644 app/javascript/mastodon/components/media_attachments.jsx delete mode 100644 app/javascript/mastodon/components/media_gallery.js create mode 100644 app/javascript/mastodon/components/media_gallery.jsx delete mode 100644 app/javascript/mastodon/components/missing_indicator.js create mode 100644 app/javascript/mastodon/components/missing_indicator.jsx delete mode 100644 app/javascript/mastodon/components/modal_root.js create mode 100644 app/javascript/mastodon/components/modal_root.jsx delete mode 100644 app/javascript/mastodon/components/navigation_portal.js create mode 100644 app/javascript/mastodon/components/navigation_portal.jsx delete mode 100644 app/javascript/mastodon/components/not_signed_in_indicator.js create mode 100644 app/javascript/mastodon/components/not_signed_in_indicator.jsx delete mode 100644 app/javascript/mastodon/components/picture_in_picture_placeholder.js create mode 100644 app/javascript/mastodon/components/picture_in_picture_placeholder.jsx delete mode 100644 app/javascript/mastodon/components/poll.js create mode 100644 app/javascript/mastodon/components/poll.jsx delete mode 100644 app/javascript/mastodon/components/radio_button.js create mode 100644 app/javascript/mastodon/components/radio_button.jsx delete mode 100644 app/javascript/mastodon/components/regeneration_indicator.js create mode 100644 app/javascript/mastodon/components/regeneration_indicator.jsx delete mode 100644 app/javascript/mastodon/components/relative_timestamp.js create mode 100644 app/javascript/mastodon/components/relative_timestamp.jsx delete mode 100644 app/javascript/mastodon/components/scrollable_list.js create mode 100644 app/javascript/mastodon/components/scrollable_list.jsx delete mode 100644 app/javascript/mastodon/components/server_banner.js create mode 100644 app/javascript/mastodon/components/server_banner.jsx delete mode 100644 app/javascript/mastodon/components/short_number.js create mode 100644 app/javascript/mastodon/components/short_number.jsx delete mode 100644 app/javascript/mastodon/components/skeleton.js create mode 100644 app/javascript/mastodon/components/skeleton.jsx delete mode 100644 app/javascript/mastodon/components/status.js create mode 100644 app/javascript/mastodon/components/status.jsx delete mode 100644 app/javascript/mastodon/components/status_action_bar.js create mode 100644 app/javascript/mastodon/components/status_action_bar.jsx delete mode 100644 app/javascript/mastodon/components/status_content.js create mode 100644 app/javascript/mastodon/components/status_content.jsx delete mode 100644 app/javascript/mastodon/components/status_list.js create mode 100644 app/javascript/mastodon/components/status_list.jsx delete mode 100644 app/javascript/mastodon/components/timeline_hint.js create mode 100644 app/javascript/mastodon/components/timeline_hint.jsx delete mode 100644 app/javascript/mastodon/containers/account_container.js create mode 100644 app/javascript/mastodon/containers/account_container.jsx delete mode 100644 app/javascript/mastodon/containers/admin_component.js create mode 100644 app/javascript/mastodon/containers/admin_component.jsx delete mode 100644 app/javascript/mastodon/containers/compose_container.js create mode 100644 app/javascript/mastodon/containers/compose_container.jsx delete mode 100644 app/javascript/mastodon/containers/domain_container.js create mode 100644 app/javascript/mastodon/containers/domain_container.jsx delete mode 100644 app/javascript/mastodon/containers/mastodon.js create mode 100644 app/javascript/mastodon/containers/mastodon.jsx delete mode 100644 app/javascript/mastodon/containers/media_container.js create mode 100644 app/javascript/mastodon/containers/media_container.jsx delete mode 100644 app/javascript/mastodon/containers/status_container.js create mode 100644 app/javascript/mastodon/containers/status_container.jsx delete mode 100644 app/javascript/mastodon/features/about/index.js create mode 100644 app/javascript/mastodon/features/about/index.jsx delete mode 100644 app/javascript/mastodon/features/account/components/account_note.js create mode 100644 app/javascript/mastodon/features/account/components/account_note.jsx delete mode 100644 app/javascript/mastodon/features/account/components/featured_tags.js create mode 100644 app/javascript/mastodon/features/account/components/featured_tags.jsx delete mode 100644 app/javascript/mastodon/features/account/components/follow_request_note.js create mode 100644 app/javascript/mastodon/features/account/components/follow_request_note.jsx delete mode 100644 app/javascript/mastodon/features/account/components/header.js create mode 100644 app/javascript/mastodon/features/account/components/header.jsx delete mode 100644 app/javascript/mastodon/features/account/navigation.js create mode 100644 app/javascript/mastodon/features/account/navigation.jsx delete mode 100644 app/javascript/mastodon/features/account_gallery/components/media_item.js create mode 100644 app/javascript/mastodon/features/account_gallery/components/media_item.jsx delete mode 100644 app/javascript/mastodon/features/account_gallery/index.js create mode 100644 app/javascript/mastodon/features/account_gallery/index.jsx delete mode 100644 app/javascript/mastodon/features/account_timeline/components/header.js create mode 100644 app/javascript/mastodon/features/account_timeline/components/header.jsx delete mode 100644 app/javascript/mastodon/features/account_timeline/components/limited_account_hint.js create mode 100644 app/javascript/mastodon/features/account_timeline/components/limited_account_hint.jsx delete mode 100644 app/javascript/mastodon/features/account_timeline/components/moved_note.js create mode 100644 app/javascript/mastodon/features/account_timeline/components/moved_note.jsx delete mode 100644 app/javascript/mastodon/features/account_timeline/containers/header_container.js create mode 100644 app/javascript/mastodon/features/account_timeline/containers/header_container.jsx delete mode 100644 app/javascript/mastodon/features/account_timeline/index.js create mode 100644 app/javascript/mastodon/features/account_timeline/index.jsx delete mode 100644 app/javascript/mastodon/features/audio/index.js create mode 100644 app/javascript/mastodon/features/audio/index.jsx delete mode 100644 app/javascript/mastodon/features/blocks/index.js create mode 100644 app/javascript/mastodon/features/blocks/index.jsx delete mode 100644 app/javascript/mastodon/features/bookmarked_statuses/index.js create mode 100644 app/javascript/mastodon/features/bookmarked_statuses/index.jsx delete mode 100644 app/javascript/mastodon/features/closed_registrations_modal/index.js create mode 100644 app/javascript/mastodon/features/closed_registrations_modal/index.jsx delete mode 100644 app/javascript/mastodon/features/community_timeline/components/column_settings.js create mode 100644 app/javascript/mastodon/features/community_timeline/components/column_settings.jsx delete mode 100644 app/javascript/mastodon/features/community_timeline/index.js create mode 100644 app/javascript/mastodon/features/community_timeline/index.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/action_bar.js create mode 100644 app/javascript/mastodon/features/compose/components/action_bar.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/autosuggest_account.js create mode 100644 app/javascript/mastodon/features/compose/components/autosuggest_account.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/character_counter.js create mode 100644 app/javascript/mastodon/features/compose/components/character_counter.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/compose_form.js create mode 100644 app/javascript/mastodon/features/compose/components/compose_form.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.js create mode 100644 app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/language_dropdown.js create mode 100644 app/javascript/mastodon/features/compose/components/language_dropdown.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/navigation_bar.js create mode 100644 app/javascript/mastodon/features/compose/components/navigation_bar.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/poll_button.js create mode 100644 app/javascript/mastodon/features/compose/components/poll_button.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/poll_form.js create mode 100644 app/javascript/mastodon/features/compose/components/poll_form.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/privacy_dropdown.js create mode 100644 app/javascript/mastodon/features/compose/components/privacy_dropdown.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/reply_indicator.js create mode 100644 app/javascript/mastodon/features/compose/components/reply_indicator.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/search.js create mode 100644 app/javascript/mastodon/features/compose/components/search.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/search_results.js create mode 100644 app/javascript/mastodon/features/compose/components/search_results.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/text_icon_button.js create mode 100644 app/javascript/mastodon/features/compose/components/text_icon_button.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/upload.js create mode 100644 app/javascript/mastodon/features/compose/components/upload.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/upload_button.js create mode 100644 app/javascript/mastodon/features/compose/components/upload_button.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/upload_form.js create mode 100644 app/javascript/mastodon/features/compose/components/upload_form.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/upload_progress.js create mode 100644 app/javascript/mastodon/features/compose/components/upload_progress.jsx delete mode 100644 app/javascript/mastodon/features/compose/components/warning.js create mode 100644 app/javascript/mastodon/features/compose/components/warning.jsx delete mode 100644 app/javascript/mastodon/features/compose/containers/sensitive_button_container.js create mode 100644 app/javascript/mastodon/features/compose/containers/sensitive_button_container.jsx delete mode 100644 app/javascript/mastodon/features/compose/containers/warning_container.js create mode 100644 app/javascript/mastodon/features/compose/containers/warning_container.jsx delete mode 100644 app/javascript/mastodon/features/compose/index.js create mode 100644 app/javascript/mastodon/features/compose/index.jsx delete mode 100644 app/javascript/mastodon/features/direct_timeline/components/conversation.js create mode 100644 app/javascript/mastodon/features/direct_timeline/components/conversation.jsx delete mode 100644 app/javascript/mastodon/features/direct_timeline/components/conversations_list.js create mode 100644 app/javascript/mastodon/features/direct_timeline/components/conversations_list.jsx delete mode 100644 app/javascript/mastodon/features/direct_timeline/index.js create mode 100644 app/javascript/mastodon/features/direct_timeline/index.jsx delete mode 100644 app/javascript/mastodon/features/directory/components/account_card.js create mode 100644 app/javascript/mastodon/features/directory/components/account_card.jsx delete mode 100644 app/javascript/mastodon/features/directory/index.js create mode 100644 app/javascript/mastodon/features/directory/index.jsx delete mode 100644 app/javascript/mastodon/features/domain_blocks/index.js create mode 100644 app/javascript/mastodon/features/domain_blocks/index.jsx delete mode 100644 app/javascript/mastodon/features/explore/components/story.js create mode 100644 app/javascript/mastodon/features/explore/components/story.jsx delete mode 100644 app/javascript/mastodon/features/explore/index.js create mode 100644 app/javascript/mastodon/features/explore/index.jsx delete mode 100644 app/javascript/mastodon/features/explore/links.js create mode 100644 app/javascript/mastodon/features/explore/links.jsx delete mode 100644 app/javascript/mastodon/features/explore/results.js create mode 100644 app/javascript/mastodon/features/explore/results.jsx delete mode 100644 app/javascript/mastodon/features/explore/statuses.js create mode 100644 app/javascript/mastodon/features/explore/statuses.jsx delete mode 100644 app/javascript/mastodon/features/explore/suggestions.js create mode 100644 app/javascript/mastodon/features/explore/suggestions.jsx delete mode 100644 app/javascript/mastodon/features/explore/tags.js create mode 100644 app/javascript/mastodon/features/explore/tags.jsx delete mode 100644 app/javascript/mastodon/features/favourited_statuses/index.js create mode 100644 app/javascript/mastodon/features/favourited_statuses/index.jsx delete mode 100644 app/javascript/mastodon/features/favourites/index.js create mode 100644 app/javascript/mastodon/features/favourites/index.jsx delete mode 100644 app/javascript/mastodon/features/filters/added_to_filter.js create mode 100644 app/javascript/mastodon/features/filters/added_to_filter.jsx delete mode 100644 app/javascript/mastodon/features/filters/select_filter.js create mode 100644 app/javascript/mastodon/features/filters/select_filter.jsx delete mode 100644 app/javascript/mastodon/features/follow_recommendations/components/account.js create mode 100644 app/javascript/mastodon/features/follow_recommendations/components/account.jsx delete mode 100644 app/javascript/mastodon/features/follow_recommendations/index.js create mode 100644 app/javascript/mastodon/features/follow_recommendations/index.jsx delete mode 100644 app/javascript/mastodon/features/follow_requests/components/account_authorize.js create mode 100644 app/javascript/mastodon/features/follow_requests/components/account_authorize.jsx delete mode 100644 app/javascript/mastodon/features/follow_requests/index.js create mode 100644 app/javascript/mastodon/features/follow_requests/index.jsx delete mode 100644 app/javascript/mastodon/features/followed_tags/index.js create mode 100644 app/javascript/mastodon/features/followed_tags/index.jsx delete mode 100644 app/javascript/mastodon/features/followers/index.js create mode 100644 app/javascript/mastodon/features/followers/index.jsx delete mode 100644 app/javascript/mastodon/features/following/index.js create mode 100644 app/javascript/mastodon/features/following/index.jsx delete mode 100644 app/javascript/mastodon/features/generic_not_found/index.js create mode 100644 app/javascript/mastodon/features/generic_not_found/index.jsx delete mode 100644 app/javascript/mastodon/features/getting_started/components/announcements.js create mode 100644 app/javascript/mastodon/features/getting_started/components/announcements.jsx delete mode 100644 app/javascript/mastodon/features/getting_started/components/trends.js create mode 100644 app/javascript/mastodon/features/getting_started/components/trends.jsx delete mode 100644 app/javascript/mastodon/features/getting_started/index.js create mode 100644 app/javascript/mastodon/features/getting_started/index.jsx delete mode 100644 app/javascript/mastodon/features/hashtag_timeline/components/column_settings.js create mode 100644 app/javascript/mastodon/features/hashtag_timeline/components/column_settings.jsx delete mode 100644 app/javascript/mastodon/features/hashtag_timeline/index.js create mode 100644 app/javascript/mastodon/features/hashtag_timeline/index.jsx delete mode 100644 app/javascript/mastodon/features/home_timeline/components/column_settings.js create mode 100644 app/javascript/mastodon/features/home_timeline/components/column_settings.jsx delete mode 100644 app/javascript/mastodon/features/home_timeline/index.js create mode 100644 app/javascript/mastodon/features/home_timeline/index.jsx delete mode 100644 app/javascript/mastodon/features/interaction_modal/index.js create mode 100644 app/javascript/mastodon/features/interaction_modal/index.jsx delete mode 100644 app/javascript/mastodon/features/keyboard_shortcuts/index.js create mode 100644 app/javascript/mastodon/features/keyboard_shortcuts/index.jsx delete mode 100644 app/javascript/mastodon/features/list_adder/components/account.js create mode 100644 app/javascript/mastodon/features/list_adder/components/account.jsx delete mode 100644 app/javascript/mastodon/features/list_adder/components/list.js create mode 100644 app/javascript/mastodon/features/list_adder/components/list.jsx delete mode 100644 app/javascript/mastodon/features/list_adder/index.js create mode 100644 app/javascript/mastodon/features/list_adder/index.jsx delete mode 100644 app/javascript/mastodon/features/list_editor/components/account.js create mode 100644 app/javascript/mastodon/features/list_editor/components/account.jsx delete mode 100644 app/javascript/mastodon/features/list_editor/components/edit_list_form.js create mode 100644 app/javascript/mastodon/features/list_editor/components/edit_list_form.jsx delete mode 100644 app/javascript/mastodon/features/list_editor/components/search.js create mode 100644 app/javascript/mastodon/features/list_editor/components/search.jsx delete mode 100644 app/javascript/mastodon/features/list_editor/index.js create mode 100644 app/javascript/mastodon/features/list_editor/index.jsx delete mode 100644 app/javascript/mastodon/features/list_timeline/index.js create mode 100644 app/javascript/mastodon/features/list_timeline/index.jsx delete mode 100644 app/javascript/mastodon/features/lists/components/new_list_form.js create mode 100644 app/javascript/mastodon/features/lists/components/new_list_form.jsx delete mode 100644 app/javascript/mastodon/features/lists/index.js create mode 100644 app/javascript/mastodon/features/lists/index.jsx delete mode 100644 app/javascript/mastodon/features/mutes/index.js create mode 100644 app/javascript/mastodon/features/mutes/index.jsx delete mode 100644 app/javascript/mastodon/features/notifications/components/clear_column_button.js create mode 100644 app/javascript/mastodon/features/notifications/components/clear_column_button.jsx delete mode 100644 app/javascript/mastodon/features/notifications/components/column_settings.js create mode 100644 app/javascript/mastodon/features/notifications/components/column_settings.jsx delete mode 100644 app/javascript/mastodon/features/notifications/components/filter_bar.js create mode 100644 app/javascript/mastodon/features/notifications/components/filter_bar.jsx delete mode 100644 app/javascript/mastodon/features/notifications/components/follow_request.js create mode 100644 app/javascript/mastodon/features/notifications/components/follow_request.jsx delete mode 100644 app/javascript/mastodon/features/notifications/components/grant_permission_button.js create mode 100644 app/javascript/mastodon/features/notifications/components/grant_permission_button.jsx delete mode 100644 app/javascript/mastodon/features/notifications/components/notification.js create mode 100644 app/javascript/mastodon/features/notifications/components/notification.jsx delete mode 100644 app/javascript/mastodon/features/notifications/components/notifications_permission_banner.js create mode 100644 app/javascript/mastodon/features/notifications/components/notifications_permission_banner.jsx delete mode 100644 app/javascript/mastodon/features/notifications/components/report.js create mode 100644 app/javascript/mastodon/features/notifications/components/report.jsx delete mode 100644 app/javascript/mastodon/features/notifications/components/setting_toggle.js create mode 100644 app/javascript/mastodon/features/notifications/components/setting_toggle.jsx delete mode 100644 app/javascript/mastodon/features/notifications/index.js create mode 100644 app/javascript/mastodon/features/notifications/index.jsx delete mode 100644 app/javascript/mastodon/features/picture_in_picture/components/footer.js create mode 100644 app/javascript/mastodon/features/picture_in_picture/components/footer.jsx delete mode 100644 app/javascript/mastodon/features/picture_in_picture/components/header.js create mode 100644 app/javascript/mastodon/features/picture_in_picture/components/header.jsx delete mode 100644 app/javascript/mastodon/features/picture_in_picture/index.js create mode 100644 app/javascript/mastodon/features/picture_in_picture/index.jsx delete mode 100644 app/javascript/mastodon/features/pinned_statuses/index.js create mode 100644 app/javascript/mastodon/features/pinned_statuses/index.jsx delete mode 100644 app/javascript/mastodon/features/privacy_policy/index.js create mode 100644 app/javascript/mastodon/features/privacy_policy/index.jsx delete mode 100644 app/javascript/mastodon/features/public_timeline/components/column_settings.js create mode 100644 app/javascript/mastodon/features/public_timeline/components/column_settings.jsx delete mode 100644 app/javascript/mastodon/features/public_timeline/index.js create mode 100644 app/javascript/mastodon/features/public_timeline/index.jsx delete mode 100644 app/javascript/mastodon/features/reblogs/index.js create mode 100644 app/javascript/mastodon/features/reblogs/index.jsx delete mode 100644 app/javascript/mastodon/features/report/category.js create mode 100644 app/javascript/mastodon/features/report/category.jsx delete mode 100644 app/javascript/mastodon/features/report/comment.js create mode 100644 app/javascript/mastodon/features/report/comment.jsx delete mode 100644 app/javascript/mastodon/features/report/components/option.js create mode 100644 app/javascript/mastodon/features/report/components/option.jsx delete mode 100644 app/javascript/mastodon/features/report/components/status_check_box.js create mode 100644 app/javascript/mastodon/features/report/components/status_check_box.jsx delete mode 100644 app/javascript/mastodon/features/report/rules.js create mode 100644 app/javascript/mastodon/features/report/rules.jsx delete mode 100644 app/javascript/mastodon/features/report/statuses.js create mode 100644 app/javascript/mastodon/features/report/statuses.jsx delete mode 100644 app/javascript/mastodon/features/report/thanks.js create mode 100644 app/javascript/mastodon/features/report/thanks.jsx delete mode 100644 app/javascript/mastodon/features/standalone/compose/index.js create mode 100644 app/javascript/mastodon/features/standalone/compose/index.jsx delete mode 100644 app/javascript/mastodon/features/status/components/action_bar.js create mode 100644 app/javascript/mastodon/features/status/components/action_bar.jsx delete mode 100644 app/javascript/mastodon/features/status/components/card.js create mode 100644 app/javascript/mastodon/features/status/components/card.jsx delete mode 100644 app/javascript/mastodon/features/status/components/detailed_status.js create mode 100644 app/javascript/mastodon/features/status/components/detailed_status.jsx delete mode 100644 app/javascript/mastodon/features/status/index.js create mode 100644 app/javascript/mastodon/features/status/index.jsx delete mode 100644 app/javascript/mastodon/features/subscribed_languages_modal/index.js create mode 100644 app/javascript/mastodon/features/subscribed_languages_modal/index.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/__tests__/column-test.js create mode 100644 app/javascript/mastodon/features/ui/components/__tests__/column-test.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/actions_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/actions_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/audio_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/audio_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/block_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/block_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/boost_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/boost_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/bundle.js create mode 100644 app/javascript/mastodon/features/ui/components/bundle.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/bundle_column_error.js create mode 100644 app/javascript/mastodon/features/ui/components/bundle_column_error.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/bundle_modal_error.js create mode 100644 app/javascript/mastodon/features/ui/components/bundle_modal_error.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/column.js create mode 100644 app/javascript/mastodon/features/ui/components/column.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/column_header.js create mode 100644 app/javascript/mastodon/features/ui/components/column_header.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/column_link.js create mode 100644 app/javascript/mastodon/features/ui/components/column_link.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/column_loading.js create mode 100644 app/javascript/mastodon/features/ui/components/column_loading.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/column_subheading.js create mode 100644 app/javascript/mastodon/features/ui/components/column_subheading.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/columns_area.js create mode 100644 app/javascript/mastodon/features/ui/components/columns_area.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/compare_history_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/compare_history_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/compose_panel.js create mode 100644 app/javascript/mastodon/features/ui/components/compose_panel.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/confirmation_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/confirmation_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/disabled_account_banner.js create mode 100644 app/javascript/mastodon/features/ui/components/disabled_account_banner.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/drawer_loading.js create mode 100644 app/javascript/mastodon/features/ui/components/drawer_loading.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/embed_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/embed_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/filter_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/filter_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/focal_point_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/focal_point_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/follow_requests_column_link.js create mode 100644 app/javascript/mastodon/features/ui/components/follow_requests_column_link.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/header.js create mode 100644 app/javascript/mastodon/features/ui/components/header.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/image_loader.js create mode 100644 app/javascript/mastodon/features/ui/components/image_loader.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/image_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/image_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/link_footer.js create mode 100644 app/javascript/mastodon/features/ui/components/link_footer.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/list_panel.js create mode 100644 app/javascript/mastodon/features/ui/components/list_panel.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/media_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/media_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/modal_loading.js create mode 100644 app/javascript/mastodon/features/ui/components/modal_loading.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/modal_root.js create mode 100644 app/javascript/mastodon/features/ui/components/modal_root.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/mute_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/mute_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/navigation_panel.js create mode 100644 app/javascript/mastodon/features/ui/components/navigation_panel.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/report_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/report_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/sign_in_banner.js create mode 100644 app/javascript/mastodon/features/ui/components/sign_in_banner.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/upload_area.js create mode 100644 app/javascript/mastodon/features/ui/components/upload_area.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/video_modal.js create mode 100644 app/javascript/mastodon/features/ui/components/video_modal.jsx delete mode 100644 app/javascript/mastodon/features/ui/components/zoomable_image.js create mode 100644 app/javascript/mastodon/features/ui/components/zoomable_image.jsx delete mode 100644 app/javascript/mastodon/features/ui/index.js create mode 100644 app/javascript/mastodon/features/ui/index.jsx delete mode 100644 app/javascript/mastodon/features/ui/util/react_router_helpers.js create mode 100644 app/javascript/mastodon/features/ui/util/react_router_helpers.jsx delete mode 100644 app/javascript/mastodon/features/ui/util/reduced_motion.js create mode 100644 app/javascript/mastodon/features/ui/util/reduced_motion.jsx delete mode 100644 app/javascript/mastodon/features/video/index.js create mode 100644 app/javascript/mastodon/features/video/index.jsx delete mode 100644 app/javascript/mastodon/main.js create mode 100644 app/javascript/mastodon/main.jsx delete mode 100644 app/javascript/mastodon/utils/icons.js create mode 100644 app/javascript/mastodon/utils/icons.jsx delete mode 100644 app/javascript/packs/admin.js create mode 100644 app/javascript/packs/admin.jsx delete mode 100644 app/javascript/packs/public.js create mode 100644 app/javascript/packs/public.jsx delete mode 100644 app/javascript/packs/share.js create mode 100644 app/javascript/packs/share.jsx (limited to '.eslintrc.js') diff --git a/.eslintrc.js b/.eslintrc.js index b5ab511f8..606a87e41 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -43,7 +43,7 @@ module.exports = { version: 'detect', }, 'import/extensions': [ - '.js', + '.js', '.jsx', ], 'import/ignore': [ 'node_modules', @@ -52,6 +52,7 @@ module.exports = { 'import/resolver': { node: { paths: ['app/javascript'], + extensions: ['.js', '.jsx'], }, }, }, @@ -111,6 +112,7 @@ module.exports = { semi: 'error', 'valid-typeof': 'error', + 'react/jsx-filename-extension': ['error', { 'allow': 'as-needed' }], 'react/jsx-boolean-value': 'error', 'react/jsx-closing-bracket-location': ['error', 'line-aligned'], 'react/jsx-curly-spacing': 'error', @@ -185,6 +187,7 @@ module.exports = { 'always', { js: 'never', + jsx: 'never', }, ], 'import/newline-after-import': 'error', diff --git a/.github/workflows/lint-js.yml b/.github/workflows/lint-js.yml index 3e0d9d1a9..44929f63d 100644 --- a/.github/workflows/lint-js.yml +++ b/.github/workflows/lint-js.yml @@ -10,6 +10,7 @@ on: - '.prettier*' - '.eslint*' - '**/*.js' + - '**/*.jsx' - '.github/workflows/lint-js.yml' pull_request: @@ -20,6 +21,7 @@ on: - '.prettier*' - '.eslint*' - '**/*.js' + - '**/*.jsx' - '.github/workflows/lint-js.yml' jobs: diff --git a/.github/workflows/test-js.yml b/.github/workflows/test-js.yml index 60b8e318e..6a1cacb3f 100644 --- a/.github/workflows/test-js.yml +++ b/.github/workflows/test-js.yml @@ -8,6 +8,7 @@ on: - 'yarn.lock' - '.nvmrc' - '**/*.js' + - '**/*.jsx' - '**/*.snap' - '.github/workflows/test-js.yml' @@ -17,6 +18,7 @@ on: - 'yarn.lock' - '.nvmrc' - '**/*.js' + - '**/*.jsx' - '**/*.snap' - '.github/workflows/test-js.yml' diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/autosuggest_emoji-test.js.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/autosuggest_emoji-test.js.snap deleted file mode 100644 index 1c3727848..000000000 --- a/app/javascript/mastodon/components/__tests__/__snapshots__/autosuggest_emoji-test.js.snap +++ /dev/null @@ -1,27 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[` renders emoji with custom url 1`] = ` -
- foobar - :foobar: -
-`; - -exports[` renders native emoji 1`] = ` -
- 💙 - :foobar: -
-`; diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/autosuggest_emoji-test.jsx.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/autosuggest_emoji-test.jsx.snap new file mode 100644 index 000000000..1c3727848 --- /dev/null +++ b/app/javascript/mastodon/components/__tests__/__snapshots__/autosuggest_emoji-test.jsx.snap @@ -0,0 +1,27 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders emoji with custom url 1`] = ` +
+ foobar + :foobar: +
+`; + +exports[` renders native emoji 1`] = ` +
+ 💙 + :foobar: +
+`; diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.js.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.js.snap deleted file mode 100644 index 7fbdedeb2..000000000 --- a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.js.snap +++ /dev/null @@ -1,39 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[` Autoplay renders a animated avatar 1`] = ` -
- alice -
-`; - -exports[` Still renders a still avatar 1`] = ` -
- alice -
-`; diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.jsx.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.jsx.snap new file mode 100644 index 000000000..7fbdedeb2 --- /dev/null +++ b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar-test.jsx.snap @@ -0,0 +1,39 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` Autoplay renders a animated avatar 1`] = ` +
+ alice +
+`; + +exports[` Still renders a still avatar 1`] = ` +
+ alice +
+`; diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar_overlay-test.js.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar_overlay-test.js.snap deleted file mode 100644 index f8385357a..000000000 --- a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar_overlay-test.js.snap +++ /dev/null @@ -1,54 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[` -
-
- alice -
-
-
-
- eve@blackhat.lair -
-
-
-`; diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/avatar_overlay-test.jsx.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar_overlay-test.jsx.snap new file mode 100644 index 000000000..f8385357a --- /dev/null +++ b/app/javascript/mastodon/components/__tests__/__snapshots__/avatar_overlay-test.jsx.snap @@ -0,0 +1,54 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` +
+
+ alice +
+
+
+
+ eve@blackhat.lair +
+
+
+`; diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.js.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.js.snap deleted file mode 100644 index bfc091d45..000000000 --- a/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.js.snap +++ /dev/null @@ -1,66 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[` -`; - -exports[` -`; - -exports[` -`; diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.jsx.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.jsx.snap new file mode 100644 index 000000000..bfc091d45 --- /dev/null +++ b/app/javascript/mastodon/components/__tests__/__snapshots__/button-test.jsx.snap @@ -0,0 +1,66 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` +`; + +exports[` +`; + +exports[` +`; diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/display_name-test.js.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/display_name-test.js.snap deleted file mode 100644 index 9c37580d7..000000000 --- a/app/javascript/mastodon/components/__tests__/__snapshots__/display_name-test.js.snap +++ /dev/null @@ -1,27 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[` renders display name + account name 1`] = ` - - - Foo

", - } - } - /> -
- - - @ - bar@baz - -
-`; diff --git a/app/javascript/mastodon/components/__tests__/__snapshots__/display_name-test.jsx.snap b/app/javascript/mastodon/components/__tests__/__snapshots__/display_name-test.jsx.snap new file mode 100644 index 000000000..9c37580d7 --- /dev/null +++ b/app/javascript/mastodon/components/__tests__/__snapshots__/display_name-test.jsx.snap @@ -0,0 +1,27 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders display name + account name 1`] = ` + + + Foo

", + } + } + /> +
+ + + @ + bar@baz + +
+`; diff --git a/app/javascript/mastodon/components/__tests__/autosuggest_emoji-test.js b/app/javascript/mastodon/components/__tests__/autosuggest_emoji-test.js deleted file mode 100644 index 05616e444..000000000 --- a/app/javascript/mastodon/components/__tests__/autosuggest_emoji-test.js +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import renderer from 'react-test-renderer'; -import AutosuggestEmoji from '../autosuggest_emoji'; - -describe('', () => { - it('renders native emoji', () => { - const emoji = { - native: '💙', - colons: ':foobar:', - }; - const component = renderer.create(); - const tree = component.toJSON(); - - expect(tree).toMatchSnapshot(); - }); - - it('renders emoji with custom url', () => { - const emoji = { - custom: true, - imageUrl: 'http://example.com/emoji.png', - native: 'foobar', - colons: ':foobar:', - }; - const component = renderer.create(); - const tree = component.toJSON(); - - expect(tree).toMatchSnapshot(); - }); -}); diff --git a/app/javascript/mastodon/components/__tests__/autosuggest_emoji-test.jsx b/app/javascript/mastodon/components/__tests__/autosuggest_emoji-test.jsx new file mode 100644 index 000000000..05616e444 --- /dev/null +++ b/app/javascript/mastodon/components/__tests__/autosuggest_emoji-test.jsx @@ -0,0 +1,29 @@ +import React from 'react'; +import renderer from 'react-test-renderer'; +import AutosuggestEmoji from '../autosuggest_emoji'; + +describe('', () => { + it('renders native emoji', () => { + const emoji = { + native: '💙', + colons: ':foobar:', + }; + const component = renderer.create(); + const tree = component.toJSON(); + + expect(tree).toMatchSnapshot(); + }); + + it('renders emoji with custom url', () => { + const emoji = { + custom: true, + imageUrl: 'http://example.com/emoji.png', + native: 'foobar', + colons: ':foobar:', + }; + const component = renderer.create(); + const tree = component.toJSON(); + + expect(tree).toMatchSnapshot(); + }); +}); diff --git a/app/javascript/mastodon/components/__tests__/avatar-test.js b/app/javascript/mastodon/components/__tests__/avatar-test.js deleted file mode 100644 index dd3f7b7d2..000000000 --- a/app/javascript/mastodon/components/__tests__/avatar-test.js +++ /dev/null @@ -1,36 +0,0 @@ -import React from 'react'; -import renderer from 'react-test-renderer'; -import { fromJS } from 'immutable'; -import Avatar from '../avatar'; - -describe('', () => { - const account = fromJS({ - username: 'alice', - acct: 'alice', - display_name: 'Alice', - avatar: '/animated/alice.gif', - avatar_static: '/static/alice.jpg', - }); - - const size = 100; - - describe('Autoplay', () => { - it('renders a animated avatar', () => { - const component = renderer.create(); - const tree = component.toJSON(); - - expect(tree).toMatchSnapshot(); - }); - }); - - describe('Still', () => { - it('renders a still avatar', () => { - const component = renderer.create(); - const tree = component.toJSON(); - - expect(tree).toMatchSnapshot(); - }); - }); - - // TODO add autoplay test if possible -}); diff --git a/app/javascript/mastodon/components/__tests__/avatar-test.jsx b/app/javascript/mastodon/components/__tests__/avatar-test.jsx new file mode 100644 index 000000000..dd3f7b7d2 --- /dev/null +++ b/app/javascript/mastodon/components/__tests__/avatar-test.jsx @@ -0,0 +1,36 @@ +import React from 'react'; +import renderer from 'react-test-renderer'; +import { fromJS } from 'immutable'; +import Avatar from '../avatar'; + +describe('', () => { + const account = fromJS({ + username: 'alice', + acct: 'alice', + display_name: 'Alice', + avatar: '/animated/alice.gif', + avatar_static: '/static/alice.jpg', + }); + + const size = 100; + + describe('Autoplay', () => { + it('renders a animated avatar', () => { + const component = renderer.create(); + const tree = component.toJSON(); + + expect(tree).toMatchSnapshot(); + }); + }); + + describe('Still', () => { + it('renders a still avatar', () => { + const component = renderer.create(); + const tree = component.toJSON(); + + expect(tree).toMatchSnapshot(); + }); + }); + + // TODO add autoplay test if possible +}); diff --git a/app/javascript/mastodon/components/__tests__/avatar_overlay-test.js b/app/javascript/mastodon/components/__tests__/avatar_overlay-test.js deleted file mode 100644 index 44addea83..000000000 --- a/app/javascript/mastodon/components/__tests__/avatar_overlay-test.js +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; -import renderer from 'react-test-renderer'; -import { fromJS } from 'immutable'; -import AvatarOverlay from '../avatar_overlay'; - -describe(' { - const account = fromJS({ - username: 'alice', - acct: 'alice', - display_name: 'Alice', - avatar: '/animated/alice.gif', - avatar_static: '/static/alice.jpg', - }); - - const friend = fromJS({ - username: 'eve', - acct: 'eve@blackhat.lair', - display_name: 'Evelyn', - avatar: '/animated/eve.gif', - avatar_static: '/static/eve.jpg', - }); - - it('renders a overlay avatar', () => { - const component = renderer.create(); - const tree = component.toJSON(); - - expect(tree).toMatchSnapshot(); - }); -}); diff --git a/app/javascript/mastodon/components/__tests__/avatar_overlay-test.jsx b/app/javascript/mastodon/components/__tests__/avatar_overlay-test.jsx new file mode 100644 index 000000000..44addea83 --- /dev/null +++ b/app/javascript/mastodon/components/__tests__/avatar_overlay-test.jsx @@ -0,0 +1,29 @@ +import React from 'react'; +import renderer from 'react-test-renderer'; +import { fromJS } from 'immutable'; +import AvatarOverlay from '../avatar_overlay'; + +describe(' { + const account = fromJS({ + username: 'alice', + acct: 'alice', + display_name: 'Alice', + avatar: '/animated/alice.gif', + avatar_static: '/static/alice.jpg', + }); + + const friend = fromJS({ + username: 'eve', + acct: 'eve@blackhat.lair', + display_name: 'Evelyn', + avatar: '/animated/eve.gif', + avatar_static: '/static/eve.jpg', + }); + + it('renders a overlay avatar', () => { + const component = renderer.create(); + const tree = component.toJSON(); + + expect(tree).toMatchSnapshot(); + }); +}); diff --git a/app/javascript/mastodon/components/__tests__/button-test.js b/app/javascript/mastodon/components/__tests__/button-test.js deleted file mode 100644 index f5a649f70..000000000 --- a/app/javascript/mastodon/components/__tests__/button-test.js +++ /dev/null @@ -1,75 +0,0 @@ -import { render, fireEvent, screen } from '@testing-library/react'; -import React from 'react'; -import renderer from 'react-test-renderer'; -import Button from '../button'; - -describe('); - fireEvent.click(screen.getByText('button')); - - expect(handler.mock.calls.length).toEqual(1); - }); - - it('does not handle click events if props.disabled given', () => { - const handler = jest.fn(); - render(); - fireEvent.click(screen.getByText('button')); - - expect(handler.mock.calls.length).toEqual(0); - }); - - it('renders a disabled attribute if props.disabled given', () => { - const component = renderer.create(); - const tree = component.toJSON(); - - expect(tree).toMatchSnapshot(); - }); - - it('renders the props.text instead of children', () => { - const text = 'foo'; - const children =

children

; - const component = renderer.create(); - const tree = component.toJSON(); - - expect(tree).toMatchSnapshot(); - }); - - it('renders class="button--block" if props.block given', () => { - const component = renderer.create(); + fireEvent.click(screen.getByText('button')); + + expect(handler.mock.calls.length).toEqual(1); + }); + + it('does not handle click events if props.disabled given', () => { + const handler = jest.fn(); + render(); + fireEvent.click(screen.getByText('button')); + + expect(handler.mock.calls.length).toEqual(0); + }); + + it('renders a disabled attribute if props.disabled given', () => { + const component = renderer.create(); + const tree = component.toJSON(); + + expect(tree).toMatchSnapshot(); + }); + + it('renders the props.text instead of children', () => { + const text = 'foo'; + const children =

children

; + const component = renderer.create(); + const tree = component.toJSON(); + + expect(tree).toMatchSnapshot(); + }); + + it('renders class="button--block" if props.block given', () => { + const component = renderer.create(