diff --git a/app/javascript/gabsocial/components/autosuggest_account/autosuggest_account.scss b/app/javascript/gabsocial/components/autosuggest_account/autosuggest_account.scss deleted file mode 100644 index a0a20013..00000000 --- a/app/javascript/gabsocial/components/autosuggest_account/autosuggest_account.scss +++ /dev/null @@ -1,15 +0,0 @@ -.autosuggest-account { - @include flex(flex-start, center, row); - @include text-sizing(14px, 400, 18px); - - &__icon { - display: block; - margin-right: 8px; - - @include size(16px); - } - - .display-name__account { - color: $lighter-text-color; - } -} \ No newline at end of file diff --git a/app/javascript/gabsocial/components/domain/domain.scss b/app/javascript/gabsocial/components/domain/domain.scss deleted file mode 100644 index f6507f2b..00000000 --- a/app/javascript/gabsocial/components/domain/domain.scss +++ /dev/null @@ -1,23 +0,0 @@ -.domain { - padding: 10px; - border-bottom: 1px solid lighten($ui-base-color, 8%); - - &__wrapper { - display: flex; - } - - .domain__domain-name { - flex: 1 1 auto; - display: block; - color: $primary-text-color; - text-decoration: none; - - @include text-sizing(14px, 400); - } - - .domain_buttons { - height: 18px; - padding: 10px; - white-space: nowrap; - } -} \ No newline at end of file diff --git a/app/javascript/gabsocial/components/icon_button/icon_button.scss b/app/javascript/gabsocial/components/icon_button/icon_button.scss deleted file mode 100644 index b5385779..00000000 --- a/app/javascript/gabsocial/components/icon_button/icon_button.scss +++ /dev/null @@ -1,69 +0,0 @@ -.icon-button { - display: inline-block; - padding: 0; - color: $gab-secondary-text; - border: none; - background: transparent; - cursor: pointer; - transition: color 100ms ease-in; - - &:hover, - &:active, - &:focus { - color: lighten($action-button-color, 7%); - transition: color 200ms ease-out; - } - - &.disabled { - color: darken($action-button-color, 13%); - cursor: default; - } - - &.active { - color: $highlight-text-color; - } - - &::-moz-focus-inner { - border: 0; - } - - &::-moz-focus-inner, - &:focus, - &:active { - outline: 0 !important; - } - - &.inverted { - color: $gab-secondary-text; - - &:hover, - &:active, - &:focus { - color: darken($lighter-text-color, 7%); - } - - &.disabled { - color: lighten($lighter-text-color, 7%); - } - - &.active { - color: $highlight-text-color; - - &.disabled { - color: lighten($highlight-text-color, 13%); - } - } - } - - &.overlayed { - box-sizing: content-box; - background: rgba($base-overlay-background, 0.6); - color: rgba($primary-text-color, 0.7); - border-radius: 4px; - padding: 2px; - - &:hover { - background: rgba($base-overlay-background, 0.9); - } - } -} \ No newline at end of file diff --git a/app/javascript/gabsocial/components/intersection_observer_article.js b/app/javascript/gabsocial/components/intersection_observer_article.js index 75a6f49e..a3baada0 100644 --- a/app/javascript/gabsocial/components/intersection_observer_article.js +++ b/app/javascript/gabsocial/components/intersection_observer_article.js @@ -1,4 +1,5 @@ import { is } from 'immutable'; +import { setHeight } from '../actions/height_cache'; import scheduleIdleTask from '../utils/schedule_idle_task'; import getRectFromEntry from '../utils/get_rect_from_entry'; @@ -7,7 +8,21 @@ const updateOnPropsForRendered = ['id', 'index', 'listLength']; // Diff these props in the "unrendered" state const updateOnPropsForUnrendered = ['id', 'index', 'listLength', 'cachedHeight']; -export default class IntersectionObserverArticle extends Component { +const makeMapStateToProps = (state, props) => ({ + cachedHeight: state.getIn(['height_cache', props.saveHeightKey, props.id]), +}); + +const mapDispatchToProps = (dispatch) => ({ + + onHeightChange (key, id, height) { + dispatch(setHeight(key, id, height)); + }, + +}); + +export default +@connect(makeMapStateToProps, mapDispatchToProps) +class IntersectionObserverArticle extends Component { static propTypes = { intersectionObserverWrapper: PropTypes.object.isRequired, diff --git a/app/javascript/gabsocial/features/status/status.js b/app/javascript/gabsocial/features/status/status.js index 73e80240..1658e48c 100644 --- a/app/javascript/gabsocial/features/status/status.js +++ b/app/javascript/gabsocial/features/status/status.js @@ -37,8 +37,6 @@ import { ColumnHeader } from '../../components/column_header'; import { textForScreenReader, defaultMediaVisibility } from '../../components/status/status'; import Icon from '../../components/icon'; import ColumnIndicator from '../../components/column_indicator'; -import DetailedStatus from './components/detailed_status'; -import ActionBar from './components/detailed_status_action_bar'; const messages = defineMessages({ deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' }, diff --git a/app/javascript/gabsocial/service_worker/web_push_locales.js b/app/javascript/gabsocial/service_worker/web_push_locales.js index 7eb24035..023cd2c3 100644 --- a/app/javascript/gabsocial/service_worker/web_push_locales.js +++ b/app/javascript/gabsocial/service_worker/web_push_locales.js @@ -16,6 +16,7 @@ filenames.forEach(filename => { filtered[locale] = { 'notification.favourite': full['notification.favourite'] || '', 'notification.follow': full['notification.follow'] || '', + 'notification.follow_request': full['notification.follow_request'] || '', 'notification.mention': full['notification.mention'] || '', 'notification.reblog': full['notification.reblog'] || '', 'notification.poll': full['notification.poll'] || '', @@ -28,4 +29,4 @@ filenames.forEach(filename => { }; }); -module.exports = JSON.parse(JSON.stringify(filtered)); +module.exports = JSON.parse(JSON.stringify(filtered)); \ No newline at end of file diff --git a/app/javascript/packs/mailer.js b/app/javascript/packs/mailer.js index 732fc169..075ee97d 100644 --- a/app/javascript/packs/mailer.js +++ b/app/javascript/packs/mailer.js @@ -1 +1,2 @@ -require('../styles/mailer.scss'); +// : todo : +// require('../styles/mailer.scss'); diff --git a/app/javascript/styles/application.scss b/app/javascript/styles/application.scss deleted file mode 100644 index 69ca3f10..00000000 --- a/app/javascript/styles/application.scss +++ /dev/null @@ -1,25 +0,0 @@ -@import './gabsocial/variables'; - -@import 'gabsocial/fonts'; -@import 'gabsocial/reset'; -@import 'gabsocial/basics'; -@import 'gabsocial/containers'; -@import 'gabsocial/lists'; -@import 'gabsocial/footer'; -@import 'gabsocial/compact_header'; -@import 'gabsocial/widgets'; -@import 'gabsocial/forms'; -@import 'gabsocial/accounts'; -@import 'gabsocial/stream_entries'; - -// NOTE - In the process of stripping this giant file into individual components (below) -@import 'gabsocial/components'; - -@import 'gabsocial/polls'; -@import 'gabsocial/emoji_picker'; -@import 'gabsocial/about'; -@import 'gabsocial/tables'; -@import 'gabsocial/admin'; -@import 'gabsocial/dashboard'; -@import 'gabsocial/rtl'; -@import 'gabsocial/accessibility'; \ No newline at end of file diff --git a/app/javascript/styles/base.scss b/app/javascript/styles/base.scss deleted file mode 100644 index 10603a4c..00000000 --- a/app/javascript/styles/base.scss +++ /dev/null @@ -1,3 +0,0 @@ -@import './colors'; -@import './font_families'; -@import './mixins'; \ No newline at end of file diff --git a/app/javascript/styles/gabsocial/compact_header.scss b/app/javascript/styles/gabsocial/compact_header.scss deleted file mode 100644 index e69de29b..00000000 diff --git a/app/javascript/styles/mailer.scss b/app/javascript/styles/mailer.scss index 670719f8..cd429b9c 100644 --- a/app/javascript/styles/mailer.scss +++ b/app/javascript/styles/mailer.scss @@ -1,4 +1,4 @@ -@import 'gabsocial/variables'; +// @import 'gabsocial/variables'; // : todo : //Check this out later - replace with 'gabsocial/fonts' diff --git a/app/views/public_timelines/show.html.haml b/app/views/public_timelines/show.html.haml index 0ad86a63..809ecad9 100644 --- a/app/views/public_timelines/show.html.haml +++ b/app/views/public_timelines/show.html.haml @@ -4,7 +4,6 @@ - content_for :header_tags do %meta{ name: 'robots', content: 'noindex' }/ %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json) - = javascript_pack_tag 'about', integrity: true, crossorigin: 'anonymous' .page-header %h1= t('about.see_whats_happening') diff --git a/app/views/tags/_meta.html.haml b/app/views/tags/_meta.html.haml index 072a2c45..ac7bb745 100644 --- a/app/views/tags/_meta.html.haml +++ b/app/views/tags/_meta.html.haml @@ -6,5 +6,4 @@ %link{ rel: 'alternate', type: 'application/rss+xml', href: tag_url(@tag, format: 'rss') }/ %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json) - = javascript_pack_tag 'about', integrity: true, crossorigin: 'anonymous' = render 'tags/og' diff --git a/config/webpack/configuration.js b/config/webpack/configuration.js index 80a094c7..1a2cbde1 100644 --- a/config/webpack/configuration.js +++ b/config/webpack/configuration.js @@ -8,9 +8,6 @@ const { readFileSync } = require('fs'); const configPath = resolve('config', 'webpacker.yml'); const settings = safeLoad(readFileSync(configPath), 'utf8')[env.RAILS_ENV || env.NODE_ENV]; -const themePath = resolve('config', 'themes.yml'); -const themes = safeLoad(readFileSync(themePath), 'utf8'); - function removeOuterSlashes(string) { return string.replace(/^\/*/, '').replace(/\/*$/, ''); } @@ -31,7 +28,6 @@ const output = { module.exports = { settings, - themes, env: { CDN_HOST: env.CDN_HOST, NODE_ENV: env.NODE_ENV, diff --git a/config/webpack/production.js b/config/webpack/production.js index fdf2df5a..460be1d3 100644 --- a/config/webpack/production.js +++ b/config/webpack/production.js @@ -95,13 +95,13 @@ module.exports = merge(sharedConfig, { '**/*-webfont-*.svg', '**/*.woff', ], - // ServiceWorker: { - // entry: `imports-loader?ATTACHMENT_HOST=>${encodeURIComponent(JSON.stringify(attachmentHost))}!${encodeURI(path.join(__dirname, '../../app/javascript/gabsocial/service_worker/entry.js'))}`, - // cacheName: 'gabsocial', - // output: '../assets/sw.js', - // publicPath: '/sw.js', - // minify: true, - // }, + ServiceWorker: { + entry: `imports-loader?ATTACHMENT_HOST=>${encodeURIComponent(JSON.stringify(attachmentHost))}!${encodeURI(path.join(__dirname, '../../app/javascript/gabsocial/service_worker/entry.js'))}`, + cacheName: 'gabsocial', + output: '../assets/sw.js', + publicPath: '/sw.js', + minify: true, + }, }), ], }); diff --git a/config/webpack/rules/css.js b/config/webpack/rules/css.js index e2907015..9c02e218 100644 --- a/config/webpack/rules/css.js +++ b/config/webpack/rules/css.js @@ -1,8 +1,4 @@ -const { join, resolve } = require('path'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); -const { settings, themes } = require('../configuration'); - -let pathy = resolve(join(settings.source_path, themes.default)); module.exports = { test: /\.s?css$/i, @@ -12,7 +8,7 @@ module.exports = { loader: 'css-loader', options: { sourceMap: true, - importLoaders: 2, + importLoaders: 1, modules: true, localIdentName: '[hash:base64:5]', }, @@ -23,20 +19,5 @@ module.exports = { sourceMap: true, }, }, - { - loader: 'sass-loader', - options: { - implementation: require('sass'), - sourceMap: true, - }, - }, - { - loader: 'sass-resources-loader', - options: { - resources: [ - pathy, - ] - }, - }, ], }; diff --git a/config/webpack/shared.js b/config/webpack/shared.js index 0dbd9ed3..61ef7f0e 100644 --- a/config/webpack/shared.js +++ b/config/webpack/shared.js @@ -6,9 +6,12 @@ const { sync } = require('glob'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const AssetsManifestPlugin = require('webpack-assets-manifest'); const extname = require('path-complete-extname'); -const { env, settings, themes, output } = require('./configuration'); +const { env, settings, output } = require('./configuration'); const rules = require('./rules'); -const localePackPaths = require('./generateLocalePacks'); +const localePackPaths = [ + '/Users/m3/Documents/dev/gab-social/tmp/packs/locale_en.js', +]; +//require('./generateLocalePacks'); const extensionGlob = `**/*{${settings.extensions.join(',')}}*`; const entryPath = join(settings.source_path, settings.source_entry_path);