From 280dc51d8513816de7a9ca8413f2db4306b092a0 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Wed, 7 Aug 2019 01:02:36 -0400 Subject: [PATCH] Large update for all components reorganization, linting, updating file imports, consolidation warning: there will be errors in this commit todo: update webpack, add missing styles, scss files, consolidate the rest of components within features/* --- app/javascript/gabsocial/actions/accounts.js | 2 +- app/javascript/gabsocial/actions/compose.js | 2 +- .../gabsocial/actions/importer/normalizer.js | 2 +- .../gabsocial/actions/interactions.js | 41 -- app/javascript/gabsocial/actions/mutes.js | 2 +- .../gabsocial/actions/suggestions.js | 2 +- .../__snapshots__/button-test.js.snap | 4 +- .../components/__tests__/button-test.js | 2 +- .../gabsocial/components/account/account.js | 128 +++++ .../account/{index.scss => account.scss} | 0 .../gabsocial/components/account/index.js | 129 +---- .../autosuggest_emoji/autosuggest_emoji.js | 35 ++ .../{index.scss => autosuggest_emoji.scss} | 0 .../components/autosuggest_emoji/index.js | 36 +- .../autosuggest_textbox.js | 267 ++++++++++ .../{index.scss => autosuggest_textbox.scss} | 0 .../components/autosuggest_textbox/index.js | 268 +--------- .../gabsocial/components/avatar/avatar.js | 69 +++ .../avatar/{index.scss => avatar.scss} | 0 .../gabsocial/components/avatar/index.js | 70 +-- .../avatar_overlay/avatar_overlay.js | 33 ++ .../{index.scss => avatar_overlay.scss} | 0 .../components/avatar_overlay/index.js | 34 +- .../gabsocial/components/badge/badge.js | 25 + .../badge/{index.scss => badge.scss} | 0 .../gabsocial/components/badge/index.js | 26 +- .../bundle_column_error.js | 10 +- .../bundle_column_error.scss | 29 + .../components/bundle_column_error/index.js | 1 + .../bundle_modal_error}/bundle_modal_error.js | 5 +- .../bundle_modal_error.scss | 0 .../components/bundle_modal_error/index.js | 1 + .../gabsocial/components/button/button.js | 49 ++ .../button/{index.scss => button.scss} | 0 .../gabsocial/components/button/index.js | 48 +- .../column}/column.js | 28 +- .../column/{index.scss => column.scss} | 0 .../gabsocial/components/column/index.js | 21 +- .../column_back_button/column_back_button.js | 40 ++ .../{index.scss => column_back_button.scss} | 0 .../components/column_back_button/index.js | 41 +- .../components/column_header/column_header.js | 125 +++++ .../{index.scss => column_header.scss} | 2 +- .../{home.js => home_column_header.js} | 10 +- .../components/column_header/index.js | 130 +---- .../column_indicator/column_indicator.js | 42 ++ .../{index.scss => column_indicator.scss} | 0 .../components/column_indicator/index.js | 42 +- .../components/column_link/column_link.js | 22 + .../components/column_link/column_link.scss | 39 ++ .../gabsocial/components/column_link/index.js | 1 + .../column_subheading/column_subheading.js | 17 + .../column_subheading/column_subheading.scss | 9 + .../components/column_subheading/index.js | 1 + .../components/columns_area/columns_area.js | 42 ++ .../components/columns_area/columns_area.scss | 187 +++++++ .../components/columns_area/index.js | 1 + .../components/display_name/display_name.js | 27 + .../{index.scss => display_name.scss} | 0 .../components/display_name/index.js | 28 +- .../gabsocial/components/domain/domain.js | 48 ++ .../domain/{index.scss => domain.scss} | 0 .../gabsocial/components/domain/index.js | 49 +- .../components/dropdown_menu/dropdown_menu.js | 272 ++++++++++ .../{index.scss => dropdown_menu.scss} | 0 .../components/dropdown_menu/index.js | 273 +--------- .../emoji/__tests__/emoji-test.js | 0 .../emoji/__tests__/emoji_index-test.js | 0 .../{features => components}/emoji/emoji.js | 0 .../emoji/emoji_compressed.js | 0 .../emoji/emoji_map.json | 0 .../emoji/emoji_mart_data_light.js | 0 .../emoji/emoji_mart_search_light.js | 0 .../emoji/emoji_picker.js | 0 .../emoji/emoji_unicode_mapping_light.js | 0 .../emoji/emoji_utils.js | 0 .../emoji/unicode_to_filename.js | 0 .../emoji/unicode_to_unified_name.js | 0 .../error_boundary/error_boundary.js | 40 ++ .../{index.scss => error_boundary.scss} | 5 +- .../components/error_boundary/index.js | 41 +- .../extended_video_player.js | 62 +++ ...{index.scss => extended_video_player.scss} | 0 .../components/extended_video_player/index.js | 63 +-- .../floating_action_button.js | 24 + .../floating_action_button.scss | 21 + .../floating_action_button/index.js | 1 + .../gabsocial/components/icon/icon.js | 23 + .../gabsocial/components/icon/index.js | 24 +- .../components/icon_button/icon_button.js | 114 ++++ .../{index.scss => icon_button.scss} | 0 .../gabsocial/components/icon_button/index.js | 115 +--- .../image_loader}/image_loader.js | 5 +- .../components/image_loader/image_loader.scss | 23 + .../components/image_loader/index.js | 1 + .../intersection_observer_article/index.js | 137 +---- .../intersection_observer_article.js | 136 +++++ ...css => intersection_observer_article.scss} | 0 .../gabsocial/components/link_footer/index.js | 1 + .../components/link_footer/link_footer.js | 64 +++ .../components/link_footer/link_footer.scss | 34 ++ .../gabsocial/components/load_more/index.js | 54 +- .../components/load_more/load_more.js | 53 ++ .../load_more/{index.scss => load_more.scss} | 0 .../components/media_gallery/index.js | 333 +----------- .../components/media_gallery/media_gallery.js | 332 ++++++++++++ .../{index.scss => media_gallery.scss} | 0 .../modal/actions_modal}/actions_modal.js | 10 +- .../modal/actions_modal/actions_modal.scss | 0 .../modal/boost_modal}/boost_modal.js | 23 +- .../modal/boost_modal/boost_modal.scss | 0 .../modal/compose_modal}/compose_modal.js | 34 +- .../modal/compose_modal/compose_modal.scss | 18 + .../confirmation_modal}/confirmation_modal.js | 2 +- .../confirmation_modal.scss | 0 .../modal/embed_modal}/embed_modal.js | 2 +- .../modal/embed_modal/embed_modal.scss | 0 .../focal_point_modal}/focal_point_modal.js | 4 +- .../focal_point_modal/focal_point_modal.scss | 0 .../modal/hotkeys_modal/hotkeys_modal.js | 208 ++++++++ .../modal/hotkeys_modal/hotkeys_modal.scss | 73 +++ .../gabsocial/components/modal/index.js | 27 + .../modal/media_modal}/media_modal.js | 14 +- .../modal/media_modal/media_modal.scss | 0 .../gabsocial/components/modal/modal.scss | 44 ++ .../components/modal/modal_layout.js | 40 ++ .../modal/mute_modal}/mute_modal.js | 2 +- .../modal/mute_modal/mute_modal.scss | 0 .../modal/report_modal}/report_modal.js | 12 +- .../modal/report_modal/report_modal.scss | 0 .../unauthorized_modal/unauthorized_modal.js | 51 ++ .../unauthorized_modal.scss | 41 ++ .../modal/video_modal}/video_modal.js | 4 +- .../modal/video_modal/video_modal.scss | 5 + .../gabsocial/components/modal_base/index.js | 1 + .../components/modal_base/modal_base.js | 137 +++++ .../index.scss => modal_base/modal_base.scss} | 4 +- .../components/modal_loading/index.js | 1 + .../components/modal_loading/modal_loading.js | 23 + .../modal_loading/modal_loading.scss | 0 .../gabsocial/components/modal_root/index.js | 138 +---- .../modal_root}/modal_root.js | 34 +- .../components/notification_counter/index.js | 28 +- .../notification_counter.js | 26 + .../{index.scss => notification_counter.scss} | 0 .../gabsocial/components/panel/index.js | 9 + .../gabsocial/components/panel/panel.scss | 132 +++++ .../components/panel/panel_layout.js | 26 + .../components/panel/sign_up_panel.js | 31 ++ .../components/panel/trends_panel.js | 53 ++ .../components/panel/who_to_follow_panel.js | 62 +++ .../gabsocial/components/permalink/index.js | 42 +- .../components/permalink/permalink.js | 41 ++ .../gabsocial/components/poll/index.js | 176 +----- .../gabsocial/components/poll/poll.js | 180 +++++++ .../components/poll/{index.scss => poll.scss} | 3 +- .../gabsocial/components/promo_panel/index.js | 1 + .../components/promo_panel/promo_panel.js | 43 ++ .../components/promo_panel/promo_panel.scss | 29 + .../components/relative_timestamp/index.js | 185 +------ .../relative_timestamp/relative_timestamp.js | 184 +++++++ .../components/scrollable_list/index.js | 246 +-------- .../scrollable_list/scrollable_list.js | 244 +++++++++ .../{index.scss => scrollable_list.scss} | 0 .../components/setting_toggle/index.js | 1 + .../setting_toggle}/setting_toggle.js | 2 + .../setting_toggle/setting_toggle.scss | 12 + .../gabsocial/components/status/index.js | 484 +---------------- .../gabsocial/components/status/status.js | 482 +++++++++++++++++ .../status/{index.scss => status.scss} | 0 .../components/status_action_bar/index.js | 324 +----------- .../status_action_bar/status_action_bar.js | 321 +++++++++++ .../{index.scss => status_action_bar.scss} | 0 .../components/status_check_box/index.js | 1 + .../status_check_box}/status_check_box.js | 24 +- .../status_check_box/status_check_box.scss | 34 ++ .../components/status_content/index.js | 236 +-------- .../status_content/status_content.js | 235 ++++++++ .../{index.scss => status_content.scss} | 0 .../gabsocial/components/status_list/index.js | 158 +----- .../components/status_list/status_list.js | 157 ++++++ .../gabsocial/components/tabs_bar/index.js | 1 + .../gabsocial/components/tabs_bar/tabs_bar.js | 109 ++++ .../components/tabs_bar/tabs_bar.scss | 249 +++++++++ .../timeline_queue_button_header/index.js | 49 +- .../timeline_queue_button_header.js | 48 ++ ...scss => timeline_queue_button_header.scss} | 0 .../components/trending_item/index.js | 48 +- .../components/trending_item/trending_item.js | 47 ++ .../{index.scss => trending_item.scss} | 0 .../gabsocial/components/upload_area/index.js | 1 + .../upload_area}/upload_area.js | 22 +- .../components/upload_area/upload_area.scss | 42 ++ .../gabsocial/components/user_panel/index.js | 1 + .../user_panel}/user_panel.js | 58 +- .../components/user_panel/user_panel.scss | 125 +++++ .../components/verified_icon/index.js | 14 +- .../components/verified_icon/verified_icon.js | 13 + .../{index.scss => verified_icon.scss} | 0 .../components/zoomable_image/index.js | 1 + .../zoomable_image}/zoomable_image.js | 7 +- .../zoomable_image/zoomable_image.scss | 13 + .../gabsocial/containers/compose_container.js | 2 +- .../gabsocial/containers/domain_container.js | 10 +- .../gabsocial/containers/gabsocial.js | 11 +- .../containers/loading_bar_container.js | 1 - .../gabsocial/containers/media_container.js | 2 +- .../ui => }/containers/modal_container.js | 4 +- .../containers/notifications_container.js | 4 +- .../gabsocial/containers/poll_container.js | 7 - .../containers/status_list_container.js | 6 +- .../containers/timeline_container.js | 14 +- .../account_gallery/components/media_item.js | 2 +- .../features/account_gallery/index.js | 48 +- .../account_timeline/components/header.js | 4 +- .../components/inner_header.js} | 20 +- .../components/profile_info_panel.js | 41 +- .../containers/header_container.js | 8 +- .../features/account_timeline/index.js | 31 +- .../gabsocial/features/blocks/blocks.js | 65 +++ .../gabsocial/features/blocks/index.js | 70 +-- .../components/column_settings.js | 32 +- .../containers/column_settings_container.js | 16 - .../features/community_timeline/index.js | 10 +- .../features/compose/components/action_bar.js | 1 - .../compose/components/autosuggest_account.js | 22 +- .../compose/components/compose_form.js | 42 +- .../components/emoji_picker_dropdown.js | 2 +- .../compose/components/navigation_bar.js | 14 +- .../features/compose/components/poll_form.js | 14 +- .../compose/components/privacy_dropdown.js | 8 +- .../features/compose/components/search.js | 4 +- .../compose/components/search_results.js | 9 +- .../features/compose/components/upload.js | 6 +- .../compose/components/upload_form.js | 11 +- .../compose/components/upload_progress.js | 14 +- .../autosuggest_account_container.js | 14 - .../containers/navigation_container.js | 11 - .../containers/upload_form_container.js | 7 - .../containers/upload_progress_container.js | 8 - .../gabsocial/features/compose/index.js | 14 +- .../components/conversation.js | 63 --- .../components/conversations_list.js | 71 --- .../containers/conversation_container.js | 18 - .../conversations_list_container.js | 14 - .../features/direct_timeline/index.js | 60 --- .../features/domain_blocks/domain_blocks.js | 66 +++ .../gabsocial/features/domain_blocks/index.js | 71 +-- .../gabsocial/features/explore/index.js | 8 - .../favourited_statuses.js | 62 +++ .../features/favourited_statuses/index.js | 70 +-- .../gabsocial/features/favourites/index.js | 60 --- .../components/account_authorize.js | 47 -- .../account_authorize/account_authorize.js | 78 +++ .../account_authorize/account_authorize.scss | 14 + .../components/account_authorize/index.js | 1 + .../containers/account_authorize_container.js | 25 - .../features/follow_requests/index.js | 16 +- .../gabsocial/features/followers/followers.js | 106 ++++ .../gabsocial/features/followers/index.js | 129 +---- .../gabsocial/features/following/following.js | 109 ++++ .../gabsocial/features/following/index.js | 129 +---- .../features/generic_not_found/index.js | 7 +- .../features/getting_started/index.js | 168 ------ .../gabsocial/features/groups/edit/index.js | 178 +++---- .../features/groups/members/index.js | 71 ++- .../features/groups/removed_accounts/index.js | 87 ++- .../features/groups/timeline/index.js | 120 ++--- .../hashtag_timeline/hashtag_timeline.js | 119 +++++ .../features/hashtag_timeline/index.js | 121 +---- .../components/column_settings.js | 38 +- .../containers/column_settings_container.js | 20 - .../gabsocial/features/home_timeline/index.js | 18 +- .../gabsocial/features/introduction/index.js | 168 +----- .../features/introduction/introduction.js | 237 +++++++++ .../features/introduction/introduction.scss | 143 +++++ .../features/list_adder/components/list.js | 4 +- .../gabsocial/features/list_adder/index.js | 6 +- .../features/list_editor/components/search.js | 6 +- .../gabsocial/features/list_editor/index.js | 4 +- .../gabsocial/features/list_timeline/index.js | 157 +----- .../features/list_timeline/list_timeline.js | 146 +++++ .../gabsocial/features/lists/index.js | 20 +- .../gabsocial/features/mutes/index.js | 70 +-- .../gabsocial/features/mutes/mutes.js | 65 +++ .../components/clear_column_button.js | 2 +- .../components/column_settings.js | 2 +- .../notifications/components/filter_bar.js | 2 +- .../notifications/components/notification.js | 8 +- .../gabsocial/features/notifications/index.js | 7 +- .../features/pinned_statuses/index.js | 58 +- .../pinned_statuses/pinned_statuses.js | 51 ++ .../gabsocial/features/reblogs/index.js | 84 +-- .../gabsocial/features/reblogs/reblogs.js | 72 +++ .../containers/status_check_box_container.js | 18 - .../search/components/{ => header}/header.js | 17 +- .../search/components/header/header.scss | 46 ++ .../search/components/header/index.js | 1 + .../features/standalone/compose/index.js | 6 +- .../standalone/hashtag_timeline/index.js | 4 +- .../standalone/public_timeline/index.js | 4 +- .../features/status/components/action_bar.js | 8 +- .../features/status/components/card.js | 2 +- .../status/components/detailed_status.js | 14 +- .../gabsocial/features/status/index.js | 29 +- .../ui/components/__tests__/column-test.js | 33 -- .../features/ui/components/column_header.js | 36 -- .../features/ui/components/column_link.js | 35 -- .../features/ui/components/column_loading.js | 28 - .../ui/components/column_subheading.js | 14 - .../features/ui/components/columns_area.js | 58 -- .../features/ui/components/drawer_loading.js | 10 - .../ui/components/follow_requests_nav_link.js | 44 -- .../features/ui/components/hotkeys_modal.js | 169 ------ .../features/ui/components/link_footer.js | 46 -- .../features/ui/components/list_panel.js | 52 -- .../features/ui/components/modal_loading.js | 18 - .../components/notifications_counter_icon.js | 8 - .../features/ui/components/promo_panel.js | 42 -- .../features/ui/components/sign_up_panel.js | 29 - .../features/ui/components/tabs_bar.js | 127 ----- .../features/ui/components/trends_panel.js | 63 --- .../ui/components/unauthorized_modal.js | 58 -- .../ui/components/who_to_follow_panel.js | 74 --- .../ui/containers/bundle_container.js | 18 - .../ui/containers/columns_area_container.js | 7 - app/javascript/gabsocial/features/ui/index.js | 89 ++-- .../features/ui/util/async-components.js | 24 +- .../ui/{components => util}/bundle.js | 20 +- .../ui/util/intersection_observer_wrapper.js | 7 +- ...act_router_helpers.js => wrapped_route.js} | 28 +- .../gabsocial/features/video/index.js | 500 +----------------- .../gabsocial/features/video/video.js | 450 ++++++++++++++++ app/javascript/gabsocial/pages/group_page.js | 74 ++- app/javascript/gabsocial/pages/groups_page.js | 53 -- app/javascript/gabsocial/pages/home_page.js | 71 ++- .../gabsocial/pages/profile_page.js | 69 +-- app/javascript/gabsocial/pages/search_page.js | 65 +-- .../gabsocial/reducers/custom_emojis.js | 4 +- .../gabsocial/reducers/user_lists.js | 3 - app/javascript/packs/public.js | 2 +- 341 files changed, 8876 insertions(+), 8321 deletions(-) create mode 100644 app/javascript/gabsocial/components/account/account.js rename app/javascript/gabsocial/components/account/{index.scss => account.scss} (100%) create mode 100644 app/javascript/gabsocial/components/autosuggest_emoji/autosuggest_emoji.js rename app/javascript/gabsocial/components/autosuggest_emoji/{index.scss => autosuggest_emoji.scss} (100%) create mode 100644 app/javascript/gabsocial/components/autosuggest_textbox/autosuggest_textbox.js rename app/javascript/gabsocial/components/autosuggest_textbox/{index.scss => autosuggest_textbox.scss} (100%) create mode 100644 app/javascript/gabsocial/components/avatar/avatar.js rename app/javascript/gabsocial/components/avatar/{index.scss => avatar.scss} (100%) create mode 100644 app/javascript/gabsocial/components/avatar_overlay/avatar_overlay.js rename app/javascript/gabsocial/components/avatar_overlay/{index.scss => avatar_overlay.scss} (100%) create mode 100644 app/javascript/gabsocial/components/badge/badge.js rename app/javascript/gabsocial/components/badge/{index.scss => badge.scss} (100%) rename app/javascript/gabsocial/{features/ui/components => components/bundle_column_error}/bundle_column_error.js (84%) create mode 100644 app/javascript/gabsocial/components/bundle_column_error/bundle_column_error.scss create mode 100644 app/javascript/gabsocial/components/bundle_column_error/index.js rename app/javascript/gabsocial/{features/ui/components => components/bundle_modal_error}/bundle_modal_error.js (93%) create mode 100644 app/javascript/gabsocial/components/bundle_modal_error/bundle_modal_error.scss create mode 100644 app/javascript/gabsocial/components/bundle_modal_error/index.js create mode 100644 app/javascript/gabsocial/components/button/button.js rename app/javascript/gabsocial/components/button/{index.scss => button.scss} (100%) rename app/javascript/gabsocial/{features/ui/components => components/column}/column.js (52%) rename app/javascript/gabsocial/components/column/{index.scss => column.scss} (100%) create mode 100644 app/javascript/gabsocial/components/column_back_button/column_back_button.js rename app/javascript/gabsocial/components/column_back_button/{index.scss => column_back_button.scss} (100%) create mode 100644 app/javascript/gabsocial/components/column_header/column_header.js rename app/javascript/gabsocial/components/column_header/{index.scss => column_header.scss} (98%) rename app/javascript/gabsocial/components/column_header/{home.js => home_column_header.js} (97%) create mode 100644 app/javascript/gabsocial/components/column_indicator/column_indicator.js rename app/javascript/gabsocial/components/column_indicator/{index.scss => column_indicator.scss} (100%) create mode 100644 app/javascript/gabsocial/components/column_link/column_link.js create mode 100644 app/javascript/gabsocial/components/column_link/column_link.scss create mode 100644 app/javascript/gabsocial/components/column_link/index.js create mode 100644 app/javascript/gabsocial/components/column_subheading/column_subheading.js create mode 100644 app/javascript/gabsocial/components/column_subheading/column_subheading.scss create mode 100644 app/javascript/gabsocial/components/column_subheading/index.js create mode 100644 app/javascript/gabsocial/components/columns_area/columns_area.js create mode 100644 app/javascript/gabsocial/components/columns_area/columns_area.scss create mode 100644 app/javascript/gabsocial/components/columns_area/index.js create mode 100644 app/javascript/gabsocial/components/display_name/display_name.js rename app/javascript/gabsocial/components/display_name/{index.scss => display_name.scss} (100%) create mode 100644 app/javascript/gabsocial/components/domain/domain.js rename app/javascript/gabsocial/components/domain/{index.scss => domain.scss} (100%) create mode 100644 app/javascript/gabsocial/components/dropdown_menu/dropdown_menu.js rename app/javascript/gabsocial/components/dropdown_menu/{index.scss => dropdown_menu.scss} (100%) rename app/javascript/gabsocial/{features => components}/emoji/__tests__/emoji-test.js (100%) rename app/javascript/gabsocial/{features => components}/emoji/__tests__/emoji_index-test.js (100%) rename app/javascript/gabsocial/{features => components}/emoji/emoji.js (100%) rename app/javascript/gabsocial/{features => components}/emoji/emoji_compressed.js (100%) rename app/javascript/gabsocial/{features => components}/emoji/emoji_map.json (100%) rename app/javascript/gabsocial/{features => components}/emoji/emoji_mart_data_light.js (100%) rename app/javascript/gabsocial/{features => components}/emoji/emoji_mart_search_light.js (100%) rename app/javascript/gabsocial/{features => components}/emoji/emoji_picker.js (100%) rename app/javascript/gabsocial/{features => components}/emoji/emoji_unicode_mapping_light.js (100%) rename app/javascript/gabsocial/{features => components}/emoji/emoji_utils.js (100%) rename app/javascript/gabsocial/{features => components}/emoji/unicode_to_filename.js (100%) rename app/javascript/gabsocial/{features => components}/emoji/unicode_to_unified_name.js (100%) create mode 100644 app/javascript/gabsocial/components/error_boundary/error_boundary.js rename app/javascript/gabsocial/components/error_boundary/{index.scss => error_boundary.scss} (76%) create mode 100644 app/javascript/gabsocial/components/extended_video_player/extended_video_player.js rename app/javascript/gabsocial/components/extended_video_player/{index.scss => extended_video_player.scss} (100%) create mode 100644 app/javascript/gabsocial/components/floating_action_button/floating_action_button.js create mode 100644 app/javascript/gabsocial/components/floating_action_button/floating_action_button.scss create mode 100644 app/javascript/gabsocial/components/floating_action_button/index.js create mode 100644 app/javascript/gabsocial/components/icon/icon.js create mode 100644 app/javascript/gabsocial/components/icon_button/icon_button.js rename app/javascript/gabsocial/components/icon_button/{index.scss => icon_button.scss} (100%) rename app/javascript/gabsocial/{features/ui/components => components/image_loader}/image_loader.js (98%) create mode 100644 app/javascript/gabsocial/components/image_loader/image_loader.scss create mode 100644 app/javascript/gabsocial/components/image_loader/index.js create mode 100644 app/javascript/gabsocial/components/intersection_observer_article/intersection_observer_article.js rename app/javascript/gabsocial/components/intersection_observer_article/{index.scss => intersection_observer_article.scss} (100%) create mode 100644 app/javascript/gabsocial/components/link_footer/index.js create mode 100644 app/javascript/gabsocial/components/link_footer/link_footer.js create mode 100644 app/javascript/gabsocial/components/link_footer/link_footer.scss create mode 100644 app/javascript/gabsocial/components/load_more/load_more.js rename app/javascript/gabsocial/components/load_more/{index.scss => load_more.scss} (100%) create mode 100644 app/javascript/gabsocial/components/media_gallery/media_gallery.js rename app/javascript/gabsocial/components/media_gallery/{index.scss => media_gallery.scss} (100%) rename app/javascript/gabsocial/{features/ui/components => components/modal/actions_modal}/actions_modal.js (87%) create mode 100644 app/javascript/gabsocial/components/modal/actions_modal/actions_modal.scss rename app/javascript/gabsocial/{features/ui/components => components/modal/boost_modal}/boost_modal.js (81%) create mode 100644 app/javascript/gabsocial/components/modal/boost_modal/boost_modal.scss rename app/javascript/gabsocial/{features/ui/components => components/modal/compose_modal}/compose_modal.js (60%) create mode 100644 app/javascript/gabsocial/components/modal/compose_modal/compose_modal.scss rename app/javascript/gabsocial/{features/ui/components => components/modal/confirmation_modal}/confirmation_modal.js (97%) create mode 100644 app/javascript/gabsocial/components/modal/confirmation_modal/confirmation_modal.scss rename app/javascript/gabsocial/{features/ui/components => components/modal/embed_modal}/embed_modal.js (98%) create mode 100644 app/javascript/gabsocial/components/modal/embed_modal/embed_modal.scss rename app/javascript/gabsocial/{features/ui/components => components/modal/focal_point_modal}/focal_point_modal.js (96%) create mode 100644 app/javascript/gabsocial/components/modal/focal_point_modal/focal_point_modal.scss create mode 100644 app/javascript/gabsocial/components/modal/hotkeys_modal/hotkeys_modal.js create mode 100644 app/javascript/gabsocial/components/modal/hotkeys_modal/hotkeys_modal.scss create mode 100644 app/javascript/gabsocial/components/modal/index.js rename app/javascript/gabsocial/{features/ui/components => components/modal/media_modal}/media_modal.js (96%) create mode 100644 app/javascript/gabsocial/components/modal/media_modal/media_modal.scss create mode 100644 app/javascript/gabsocial/components/modal/modal.scss create mode 100644 app/javascript/gabsocial/components/modal/modal_layout.js rename app/javascript/gabsocial/{features/ui/components => components/modal/mute_modal}/mute_modal.js (98%) create mode 100644 app/javascript/gabsocial/components/modal/mute_modal/mute_modal.scss rename app/javascript/gabsocial/{features/ui/components => components/modal/report_modal}/report_modal.js (96%) create mode 100644 app/javascript/gabsocial/components/modal/report_modal/report_modal.scss create mode 100644 app/javascript/gabsocial/components/modal/unauthorized_modal/unauthorized_modal.js create mode 100644 app/javascript/gabsocial/components/modal/unauthorized_modal/unauthorized_modal.scss rename app/javascript/gabsocial/{features/ui/components => components/modal/video_modal}/video_modal.js (96%) create mode 100644 app/javascript/gabsocial/components/modal/video_modal/video_modal.scss create mode 100644 app/javascript/gabsocial/components/modal_base/index.js create mode 100644 app/javascript/gabsocial/components/modal_base/modal_base.js rename app/javascript/gabsocial/components/{modal_root/index.scss => modal_base/modal_base.scss} (93%) create mode 100644 app/javascript/gabsocial/components/modal_loading/index.js create mode 100644 app/javascript/gabsocial/components/modal_loading/modal_loading.js create mode 100644 app/javascript/gabsocial/components/modal_loading/modal_loading.scss rename app/javascript/gabsocial/{features/ui/components => components/modal_root}/modal_root.js (69%) create mode 100644 app/javascript/gabsocial/components/notification_counter/notification_counter.js rename app/javascript/gabsocial/components/notification_counter/{index.scss => notification_counter.scss} (100%) create mode 100644 app/javascript/gabsocial/components/panel/index.js create mode 100644 app/javascript/gabsocial/components/panel/panel.scss create mode 100644 app/javascript/gabsocial/components/panel/panel_layout.js create mode 100644 app/javascript/gabsocial/components/panel/sign_up_panel.js create mode 100644 app/javascript/gabsocial/components/panel/trends_panel.js create mode 100644 app/javascript/gabsocial/components/panel/who_to_follow_panel.js create mode 100644 app/javascript/gabsocial/components/permalink/permalink.js create mode 100644 app/javascript/gabsocial/components/poll/poll.js rename app/javascript/gabsocial/components/poll/{index.scss => poll.scss} (98%) create mode 100644 app/javascript/gabsocial/components/promo_panel/index.js create mode 100644 app/javascript/gabsocial/components/promo_panel/promo_panel.js create mode 100644 app/javascript/gabsocial/components/promo_panel/promo_panel.scss create mode 100644 app/javascript/gabsocial/components/relative_timestamp/relative_timestamp.js create mode 100644 app/javascript/gabsocial/components/scrollable_list/scrollable_list.js rename app/javascript/gabsocial/components/scrollable_list/{index.scss => scrollable_list.scss} (100%) create mode 100644 app/javascript/gabsocial/components/setting_toggle/index.js rename app/javascript/gabsocial/{features/notifications/components => components/setting_toggle}/setting_toggle.js (96%) create mode 100644 app/javascript/gabsocial/components/setting_toggle/setting_toggle.scss create mode 100644 app/javascript/gabsocial/components/status/status.js rename app/javascript/gabsocial/components/status/{index.scss => status.scss} (100%) create mode 100644 app/javascript/gabsocial/components/status_action_bar/status_action_bar.js rename app/javascript/gabsocial/components/status_action_bar/{index.scss => status_action_bar.scss} (100%) create mode 100644 app/javascript/gabsocial/components/status_check_box/index.js rename app/javascript/gabsocial/{features/report/components => components/status_check_box}/status_check_box.js (72%) create mode 100644 app/javascript/gabsocial/components/status_check_box/status_check_box.scss create mode 100644 app/javascript/gabsocial/components/status_content/status_content.js rename app/javascript/gabsocial/components/status_content/{index.scss => status_content.scss} (100%) create mode 100644 app/javascript/gabsocial/components/status_list/status_list.js create mode 100644 app/javascript/gabsocial/components/tabs_bar/index.js create mode 100644 app/javascript/gabsocial/components/tabs_bar/tabs_bar.js create mode 100644 app/javascript/gabsocial/components/tabs_bar/tabs_bar.scss create mode 100644 app/javascript/gabsocial/components/timeline_queue_button_header/timeline_queue_button_header.js rename app/javascript/gabsocial/components/timeline_queue_button_header/{index.scss => timeline_queue_button_header.scss} (100%) create mode 100644 app/javascript/gabsocial/components/trending_item/trending_item.js rename app/javascript/gabsocial/components/trending_item/{index.scss => trending_item.scss} (100%) create mode 100644 app/javascript/gabsocial/components/upload_area/index.js rename app/javascript/gabsocial/{features/ui/components => components/upload_area}/upload_area.js (83%) create mode 100644 app/javascript/gabsocial/components/upload_area/upload_area.scss create mode 100644 app/javascript/gabsocial/components/user_panel/index.js rename app/javascript/gabsocial/{features/ui/components => components/user_panel}/user_panel.js (73%) create mode 100644 app/javascript/gabsocial/components/user_panel/user_panel.scss create mode 100644 app/javascript/gabsocial/components/verified_icon/verified_icon.js rename app/javascript/gabsocial/components/verified_icon/{index.scss => verified_icon.scss} (100%) create mode 100644 app/javascript/gabsocial/components/zoomable_image/index.js rename app/javascript/gabsocial/{features/ui/components => components/zoomable_image}/zoomable_image.js (96%) create mode 100644 app/javascript/gabsocial/components/zoomable_image/zoomable_image.scss rename app/javascript/gabsocial/{features/ui => }/containers/loading_bar_container.js (85%) rename app/javascript/gabsocial/{features/ui => }/containers/modal_container.js (78%) rename app/javascript/gabsocial/{features/ui => }/containers/notifications_container.js (86%) delete mode 100644 app/javascript/gabsocial/containers/poll_container.js rename app/javascript/gabsocial/{features/ui => }/containers/status_list_container.js (92%) rename app/javascript/gabsocial/features/{account/components/header.js => account_timeline/components/inner_header.js} (96%) rename app/javascript/gabsocial/features/{ui => account_timeline}/components/profile_info_panel.js (88%) create mode 100644 app/javascript/gabsocial/features/blocks/blocks.js delete mode 100644 app/javascript/gabsocial/features/community_timeline/containers/column_settings_container.js delete mode 100644 app/javascript/gabsocial/features/compose/containers/autosuggest_account_container.js delete mode 100644 app/javascript/gabsocial/features/compose/containers/navigation_container.js delete mode 100644 app/javascript/gabsocial/features/compose/containers/upload_form_container.js delete mode 100644 app/javascript/gabsocial/features/compose/containers/upload_progress_container.js delete mode 100644 app/javascript/gabsocial/features/direct_timeline/components/conversation.js delete mode 100644 app/javascript/gabsocial/features/direct_timeline/components/conversations_list.js delete mode 100644 app/javascript/gabsocial/features/direct_timeline/containers/conversation_container.js delete mode 100644 app/javascript/gabsocial/features/direct_timeline/containers/conversations_list_container.js delete mode 100644 app/javascript/gabsocial/features/direct_timeline/index.js create mode 100644 app/javascript/gabsocial/features/domain_blocks/domain_blocks.js delete mode 100644 app/javascript/gabsocial/features/explore/index.js create mode 100644 app/javascript/gabsocial/features/favourited_statuses/favourited_statuses.js delete mode 100644 app/javascript/gabsocial/features/favourites/index.js delete mode 100644 app/javascript/gabsocial/features/follow_requests/components/account_authorize.js create mode 100644 app/javascript/gabsocial/features/follow_requests/components/account_authorize/account_authorize.js create mode 100644 app/javascript/gabsocial/features/follow_requests/components/account_authorize/account_authorize.scss create mode 100644 app/javascript/gabsocial/features/follow_requests/components/account_authorize/index.js delete mode 100644 app/javascript/gabsocial/features/follow_requests/containers/account_authorize_container.js create mode 100644 app/javascript/gabsocial/features/followers/followers.js create mode 100644 app/javascript/gabsocial/features/following/following.js delete mode 100644 app/javascript/gabsocial/features/getting_started/index.js create mode 100644 app/javascript/gabsocial/features/hashtag_timeline/hashtag_timeline.js delete mode 100644 app/javascript/gabsocial/features/home_timeline/containers/column_settings_container.js create mode 100644 app/javascript/gabsocial/features/introduction/introduction.js create mode 100644 app/javascript/gabsocial/features/introduction/introduction.scss create mode 100644 app/javascript/gabsocial/features/list_timeline/list_timeline.js create mode 100644 app/javascript/gabsocial/features/mutes/mutes.js create mode 100644 app/javascript/gabsocial/features/pinned_statuses/pinned_statuses.js create mode 100644 app/javascript/gabsocial/features/reblogs/reblogs.js delete mode 100644 app/javascript/gabsocial/features/report/containers/status_check_box_container.js rename app/javascript/gabsocial/features/search/components/{ => header}/header.js (64%) create mode 100644 app/javascript/gabsocial/features/search/components/header/header.scss create mode 100644 app/javascript/gabsocial/features/search/components/header/index.js delete mode 100644 app/javascript/gabsocial/features/ui/components/__tests__/column-test.js delete mode 100644 app/javascript/gabsocial/features/ui/components/column_header.js delete mode 100644 app/javascript/gabsocial/features/ui/components/column_link.js delete mode 100644 app/javascript/gabsocial/features/ui/components/column_loading.js delete mode 100644 app/javascript/gabsocial/features/ui/components/column_subheading.js delete mode 100644 app/javascript/gabsocial/features/ui/components/columns_area.js delete mode 100644 app/javascript/gabsocial/features/ui/components/drawer_loading.js delete mode 100644 app/javascript/gabsocial/features/ui/components/follow_requests_nav_link.js delete mode 100644 app/javascript/gabsocial/features/ui/components/hotkeys_modal.js delete mode 100644 app/javascript/gabsocial/features/ui/components/link_footer.js delete mode 100644 app/javascript/gabsocial/features/ui/components/list_panel.js delete mode 100644 app/javascript/gabsocial/features/ui/components/modal_loading.js delete mode 100644 app/javascript/gabsocial/features/ui/components/notifications_counter_icon.js delete mode 100644 app/javascript/gabsocial/features/ui/components/promo_panel.js delete mode 100644 app/javascript/gabsocial/features/ui/components/sign_up_panel.js delete mode 100644 app/javascript/gabsocial/features/ui/components/tabs_bar.js delete mode 100644 app/javascript/gabsocial/features/ui/components/trends_panel.js delete mode 100644 app/javascript/gabsocial/features/ui/components/unauthorized_modal.js delete mode 100644 app/javascript/gabsocial/features/ui/components/who_to_follow_panel.js delete mode 100644 app/javascript/gabsocial/features/ui/containers/bundle_container.js delete mode 100644 app/javascript/gabsocial/features/ui/containers/columns_area_container.js rename app/javascript/gabsocial/features/ui/{components => util}/bundle.js (84%) rename app/javascript/gabsocial/features/ui/util/{react_router_helpers.js => wrapped_route.js} (65%) create mode 100644 app/javascript/gabsocial/features/video/video.js delete mode 100644 app/javascript/gabsocial/pages/groups_page.js diff --git a/app/javascript/gabsocial/actions/accounts.js b/app/javascript/gabsocial/actions/accounts.js index 8dcd8e05..a3c9b711 100644 --- a/app/javascript/gabsocial/actions/accounts.js +++ b/app/javascript/gabsocial/actions/accounts.js @@ -6,7 +6,7 @@ import { importFetchedAccounts, importErrorWhileFetchingAccountByUsername, } from './importer'; -import { me } from 'gabsocial/initial_state'; +import { me } from '../initial_state'; export const ACCOUNT_FETCH_REQUEST = 'ACCOUNT_FETCH_REQUEST'; export const ACCOUNT_FETCH_SUCCESS = 'ACCOUNT_FETCH_SUCCESS'; diff --git a/app/javascript/gabsocial/actions/compose.js b/app/javascript/gabsocial/actions/compose.js index e377ece9..ba6333e9 100644 --- a/app/javascript/gabsocial/actions/compose.js +++ b/app/javascript/gabsocial/actions/compose.js @@ -1,7 +1,7 @@ import api from '../api'; import { CancelToken, isCancel } from 'axios'; import { throttle } from 'lodash'; -import { search as emojiSearch } from '../features/emoji/emoji_mart_search_light'; +import { search as emojiSearch } from '../components/emoji/emoji_mart_search_light'; import { tagHistory } from '../settings'; import { useEmoji } from './emojis'; import resizeImage from '../utils/resize_image'; diff --git a/app/javascript/gabsocial/actions/importer/normalizer.js b/app/javascript/gabsocial/actions/importer/normalizer.js index 5badb0c4..f4b7d26c 100644 --- a/app/javascript/gabsocial/actions/importer/normalizer.js +++ b/app/javascript/gabsocial/actions/importer/normalizer.js @@ -1,5 +1,5 @@ import escapeTextContentForBrowser from 'escape-html'; -import emojify from '../../features/emoji/emoji'; +import emojify from '../../components/emoji/emoji'; import { unescapeHTML } from '../../utils/html'; import { expandSpoilers } from '../../initial_state'; diff --git a/app/javascript/gabsocial/actions/interactions.js b/app/javascript/gabsocial/actions/interactions.js index 542b96b5..eeb9cfaa 100644 --- a/app/javascript/gabsocial/actions/interactions.js +++ b/app/javascript/gabsocial/actions/interactions.js @@ -22,10 +22,6 @@ export const REBLOGS_FETCH_REQUEST = 'REBLOGS_FETCH_REQUEST'; export const REBLOGS_FETCH_SUCCESS = 'REBLOGS_FETCH_SUCCESS'; export const REBLOGS_FETCH_FAIL = 'REBLOGS_FETCH_FAIL'; -export const FAVOURITES_FETCH_REQUEST = 'FAVOURITES_FETCH_REQUEST'; -export const FAVOURITES_FETCH_SUCCESS = 'FAVOURITES_FETCH_SUCCESS'; -export const FAVOURITES_FETCH_FAIL = 'FAVOURITES_FETCH_FAIL'; - export const PIN_REQUEST = 'PIN_REQUEST'; export const PIN_SUCCESS = 'PIN_SUCCESS'; export const PIN_FAIL = 'PIN_FAIL'; @@ -233,43 +229,6 @@ export function fetchReblogsFail(id, error) { }; }; -export function fetchFavourites(id) { - return (dispatch, getState) => { - if (!me) return; - - dispatch(fetchFavouritesRequest(id)); - - api(getState).get(`/api/v1/statuses/${id}/favourited_by`).then(response => { - dispatch(importFetchedAccounts(response.data)); - dispatch(fetchFavouritesSuccess(id, response.data)); - }).catch(error => { - dispatch(fetchFavouritesFail(id, error)); - }); - }; -}; - -export function fetchFavouritesRequest(id) { - return { - type: FAVOURITES_FETCH_REQUEST, - id, - }; -}; - -export function fetchFavouritesSuccess(id, accounts) { - return { - type: FAVOURITES_FETCH_SUCCESS, - id, - accounts, - }; -}; - -export function fetchFavouritesFail(id, error) { - return { - type: FAVOURITES_FETCH_FAIL, - error, - }; -}; - export function pin(status) { return (dispatch, getState) => { if (!me) return; diff --git a/app/javascript/gabsocial/actions/mutes.js b/app/javascript/gabsocial/actions/mutes.js index 4e2ae15d..33cc5d7e 100644 --- a/app/javascript/gabsocial/actions/mutes.js +++ b/app/javascript/gabsocial/actions/mutes.js @@ -2,7 +2,7 @@ import api, { getLinks } from '../api'; import { fetchRelationships } from './accounts'; import { importFetchedAccounts } from './importer'; import { openModal } from './modal'; -import { me } from 'gabsocial/initial_state'; +import { me } from '../initial_state'; export const MUTES_FETCH_REQUEST = 'MUTES_FETCH_REQUEST'; export const MUTES_FETCH_SUCCESS = 'MUTES_FETCH_SUCCESS'; diff --git a/app/javascript/gabsocial/actions/suggestions.js b/app/javascript/gabsocial/actions/suggestions.js index 5394fd81..022cc297 100644 --- a/app/javascript/gabsocial/actions/suggestions.js +++ b/app/javascript/gabsocial/actions/suggestions.js @@ -1,6 +1,6 @@ import api from '../api'; import { importFetchedAccounts } from './importer'; -import { me } from 'gabsocial/initial_state'; +import { me } from '../initial_state'; export const SUGGESTIONS_FETCH_REQUEST = 'SUGGESTIONS_FETCH_REQUEST'; export const SUGGESTIONS_FETCH_SUCCESS = 'SUGGESTIONS_FETCH_SUCCESS'; diff --git a/app/javascript/gabsocial/components/__tests__/__snapshots__/button-test.js.snap b/app/javascript/gabsocial/components/__tests__/__snapshots__/button-test.js.snap index 5c04e097..47b1d5e9 100644 --- a/app/javascript/gabsocial/components/__tests__/__snapshots__/button-test.js.snap +++ b/app/javascript/gabsocial/components/__tests__/__snapshots__/button-test.js.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`