Browse Source

Move some modules from flavours/glitch/utils/ back to flavours/glitch/features/ui/util/

closed-social-glitch-2
Claire 2 years ago
parent
commit
015e798394
27 changed files with 22 additions and 22 deletions
  1. +1
    -1
      app/javascript/flavours/glitch/components/dropdown_menu.js
  2. +1
    -1
      app/javascript/flavours/glitch/components/icon_button.js
  3. +2
    -2
      app/javascript/flavours/glitch/components/intersection_observer_article.js
  4. +1
    -1
      app/javascript/flavours/glitch/components/poll.js
  5. +2
    -2
      app/javascript/flavours/glitch/components/scrollable_list.js
  6. +1
    -1
      app/javascript/flavours/glitch/features/compose/components/dropdown_menu.js
  7. +1
    -1
      app/javascript/flavours/glitch/features/compose/components/language_dropdown.js
  8. +1
    -1
      app/javascript/flavours/glitch/features/compose/components/options.js
  9. +1
    -1
      app/javascript/flavours/glitch/features/compose/components/search.js
  10. +1
    -1
      app/javascript/flavours/glitch/features/compose/components/upload.js
  11. +1
    -1
      app/javascript/flavours/glitch/features/compose/components/upload_progress.js
  12. +1
    -1
      app/javascript/flavours/glitch/features/compose/components/warning.js
  13. +1
    -1
      app/javascript/flavours/glitch/features/compose/index.js
  14. +1
    -1
      app/javascript/flavours/glitch/features/list_editor/index.js
  15. +1
    -1
      app/javascript/flavours/glitch/features/pinned_accounts_editor/index.js
  16. +1
    -1
      app/javascript/flavours/glitch/features/status/components/detailed_status.js
  17. +1
    -1
      app/javascript/flavours/glitch/features/status/index.js
  18. +1
    -1
      app/javascript/flavours/glitch/features/ui/components/upload_area.js
  19. +1
    -1
      app/javascript/flavours/glitch/features/ui/index.js
  20. +0
    -0
      app/javascript/flavours/glitch/features/ui/util/fullscreen.js
  21. +0
    -0
      app/javascript/flavours/glitch/features/ui/util/get_rect_from_entry.js
  22. +0
    -0
      app/javascript/flavours/glitch/features/ui/util/intersection_observer_wrapper.js
  23. +0
    -0
      app/javascript/flavours/glitch/features/ui/util/optional_motion.js
  24. +0
    -0
      app/javascript/flavours/glitch/features/ui/util/react_router_helpers.js
  25. +0
    -0
      app/javascript/flavours/glitch/features/ui/util/reduced_motion.js
  26. +0
    -0
      app/javascript/flavours/glitch/features/ui/util/schedule_idle_task.js
  27. +1
    -1
      app/javascript/flavours/glitch/features/video/index.js

+ 1
- 1
app/javascript/flavours/glitch/components/dropdown_menu.js View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import IconButton from './icon_button';
import Overlay from 'react-overlays/lib/Overlay';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from '../features/ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import { supportsPassiveEvents } from 'detect-passive-events';
import classNames from 'classnames';

+ 1
- 1
app/javascript/flavours/glitch/components/icon_button.js View File

@ -1,5 +1,5 @@
import React from 'react';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from '../features/ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import PropTypes from 'prop-types';
import classNames from 'classnames';

+ 2
- 2
app/javascript/flavours/glitch/components/intersection_observer_article.js View File

@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import scheduleIdleTask from 'flavours/glitch/utils/schedule_idle_task';
import getRectFromEntry from 'flavours/glitch/utils/get_rect_from_entry';
import scheduleIdleTask from '../features/ui/util/schedule_idle_task';
import getRectFromEntry from '../features/ui/util/get_rect_from_entry';
// Diff these props in the "unrendered" state
const updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'cachedHeight'];

+ 1
- 1
app/javascript/flavours/glitch/components/poll.js View File

@ -4,7 +4,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import classNames from 'classnames';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from 'flavours/glitch/features/ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import escapeTextContentForBrowser from 'escape-html';
import emojify from 'flavours/glitch/utils/emoji';

+ 2
- 2
app/javascript/flavours/glitch/components/scrollable_list.js View File

@ -4,11 +4,11 @@ import PropTypes from 'prop-types';
import IntersectionObserverArticleContainer from 'flavours/glitch/containers/intersection_observer_article_container';
import LoadMore from './load_more';
import LoadPending from './load_pending';
import IntersectionObserverWrapper from 'flavours/glitch/utils/intersection_observer_wrapper';
import IntersectionObserverWrapper from 'flavours/glitch/features/ui/util/intersection_observer_wrapper';
import { throttle } from 'lodash';
import { List as ImmutableList } from 'immutable';
import classNames from 'classnames';
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from 'flavours/glitch/utils/fullscreen';
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../features/ui/util/fullscreen';
import LoadingIndicator from './loading_indicator';
import { connect } from 'react-redux';

+ 1
- 1
app/javascript/flavours/glitch/features/compose/components/dropdown_menu.js View File

@ -10,7 +10,7 @@ import Icon from 'flavours/glitch/components/icon';
// Utils.
import { withPassive } from 'flavours/glitch/utils/dom_helpers';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from '../../ui/util/optional_motion';
import { assignHandlers } from 'flavours/glitch/utils/react_helpers';
// The spring to use with our motion.

+ 1
- 1
app/javascript/flavours/glitch/features/compose/components/language_dropdown.js View File

@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { injectIntl, defineMessages } from 'react-intl';
import TextIconButton from './text_icon_button';
import Overlay from 'react-overlays/lib/Overlay';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from 'flavours/glitch/features/ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import { supportsPassiveEvents } from 'detect-passive-events';
import classNames from 'classnames';

+ 1
- 1
app/javascript/flavours/glitch/features/compose/components/options.js View File

@ -16,7 +16,7 @@ import LanguageDropdown from '../containers/language_dropdown_container';
import ImmutablePureComponent from 'react-immutable-pure-component';
// Utils.
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from '../../ui/util/optional_motion';
import { pollLimits } from 'flavours/glitch/initial_state';
// Messages.

+ 1
- 1
app/javascript/flavours/glitch/features/compose/components/search.js View File

@ -17,7 +17,7 @@ import Icon from 'flavours/glitch/components/icon';
// Utils.
import { focusRoot } from 'flavours/glitch/utils/dom_helpers';
import { searchEnabled } from 'flavours/glitch/initial_state';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from '../../ui/util/optional_motion';
const messages = defineMessages({
placeholder: { id: 'search.placeholder', defaultMessage: 'Search' },

+ 1
- 1
app/javascript/flavours/glitch/features/compose/components/upload.js View File

@ -1,7 +1,7 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { FormattedMessage } from 'react-intl';

+ 1
- 1
app/javascript/flavours/glitch/features/compose/components/upload_progress.js View File

@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import Icon from 'flavours/glitch/components/icon';

+ 1
- 1
app/javascript/flavours/glitch/features/compose/components/warning.js View File

@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
export default class Warning extends React.PureComponent {

+ 1
- 1
app/javascript/flavours/glitch/features/compose/index.js View File

@ -8,7 +8,7 @@ import { mountCompose, unmountCompose } from 'flavours/glitch/actions/compose';
import { injectIntl, defineMessages } from 'react-intl';
import classNames from 'classnames';
import SearchContainer from './containers/search_container';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from '../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import SearchResultsContainer from './containers/search_results_container';
import { me, mascot } from 'flavours/glitch/initial_state';

+ 1
- 1
app/javascript/flavours/glitch/features/list_editor/index.js View File

@ -8,7 +8,7 @@ import { setupListEditor, clearListSuggestions, resetListEditor } from 'flavours
import AccountContainer from './containers/account_container';
import SearchContainer from './containers/search_container';
import EditListForm from './components/edit_list_form';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from '../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
const mapStateToProps = state => ({

+ 1
- 1
app/javascript/flavours/glitch/features/pinned_accounts_editor/index.js View File

@ -7,7 +7,7 @@ import { injectIntl, FormattedMessage } from 'react-intl';
import { fetchPinnedAccounts, clearPinnedAccountsSuggestions, resetPinnedAccountsEditor } from 'flavours/glitch/actions/accounts';
import AccountContainer from './containers/account_container';
import SearchContainer from './containers/search_container';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from 'flavours/glitch/features/ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
const mapStateToProps = state => ({

+ 1
- 1
app/javascript/flavours/glitch/features/status/components/detailed_status.js View File

@ -13,7 +13,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
import Video from 'flavours/glitch/features/video';
import Audio from 'flavours/glitch/features/audio';
import VisibilityIcon from 'flavours/glitch/components/status_visibility_icon';
import scheduleIdleTask from 'flavours/glitch/utils/schedule_idle_task';
import scheduleIdleTask from '../../ui/util/schedule_idle_task';
import classNames from 'classnames';
import PollContainer from 'flavours/glitch/containers/poll_container';
import Icon from 'flavours/glitch/components/icon';

+ 1
- 1
app/javascript/flavours/glitch/features/status/index.js View File

@ -48,7 +48,7 @@ import { defineMessages, injectIntl } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
import { HotKeys } from 'react-hotkeys';
import { boostModal, favouriteModal, deleteModal, title } from 'flavours/glitch/initial_state';
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from 'flavours/glitch/utils/fullscreen';
import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';
import { autoUnfoldCW } from 'flavours/glitch/utils/content_warning';
import { textForScreenReader, defaultMediaVisibility } from 'flavours/glitch/components/status';
import Icon from 'flavours/glitch/components/icon';

+ 1
- 1
app/javascript/flavours/glitch/features/ui/components/upload_area.js View File

@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import Motion from 'flavours/glitch/utils/optional_motion';
import Motion from '../../ui/util/optional_motion';
import spring from 'react-motion/lib/spring';
import { FormattedMessage } from 'react-intl';

+ 1
- 1
app/javascript/flavours/glitch/features/ui/index.js View File

@ -14,7 +14,7 @@ import { fetchServer } from 'flavours/glitch/actions/server';
import { clearHeight } from 'flavours/glitch/actions/height_cache';
import { changeLayout } from 'flavours/glitch/actions/app';
import { synchronouslySubmitMarkers, submitMarkers, fetchMarkers } from 'flavours/glitch/actions/markers';
import { WrappedSwitch, WrappedRoute } from 'flavours/glitch/utils/react_router_helpers';
import { WrappedSwitch, WrappedRoute } from './util/react_router_helpers';
import UploadArea from './components/upload_area';
import PermaLink from 'flavours/glitch/components/permalink';
import ColumnsAreaContainer from './containers/columns_area_container';

app/javascript/flavours/glitch/utils/fullscreen.js → app/javascript/flavours/glitch/features/ui/util/fullscreen.js View File


app/javascript/flavours/glitch/utils/get_rect_from_entry.js → app/javascript/flavours/glitch/features/ui/util/get_rect_from_entry.js View File


app/javascript/flavours/glitch/utils/intersection_observer_wrapper.js → app/javascript/flavours/glitch/features/ui/util/intersection_observer_wrapper.js View File


app/javascript/flavours/glitch/utils/optional_motion.js → app/javascript/flavours/glitch/features/ui/util/optional_motion.js View File


app/javascript/flavours/glitch/utils/react_router_helpers.js → app/javascript/flavours/glitch/features/ui/util/react_router_helpers.js View File


app/javascript/flavours/glitch/utils/reduced_motion.js → app/javascript/flavours/glitch/features/ui/util/reduced_motion.js View File


app/javascript/flavours/glitch/utils/schedule_idle_task.js → app/javascript/flavours/glitch/features/ui/util/schedule_idle_task.js View File


+ 1
- 1
app/javascript/flavours/glitch/features/video/index.js View File

@ -4,7 +4,7 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
import { is } from 'immutable';
import { throttle, debounce } from 'lodash';
import classNames from 'classnames';
import { isFullscreen, requestFullscreen, exitFullscreen } from 'flavours/glitch/utils/fullscreen';
import { isFullscreen, requestFullscreen, exitFullscreen } from '../ui/util/fullscreen';
import { displayMedia, useBlurhash } from 'flavours/glitch/initial_state';
import Icon from 'flavours/glitch/components/icon';
import Blurhash from 'flavours/glitch/components/blurhash';

Loading…
Cancel
Save