From 003113a0dafb57e175c3c7eb2429b0d28053a042 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 17:19:48 -0400 Subject: [PATCH 01/17] Added legal in-text links to legal pages for: privacy, terms, sales, dmca --- app/views/about/privacy.html.haml | 11 +++++- app/views/about/sales.html.haml | 9 ++++- app/views/about/terms.html.haml | 62 ++++++++++++++++++++++++++----- 3 files changed, 69 insertions(+), 13 deletions(-) diff --git a/app/views/about/privacy.html.haml b/app/views/about/privacy.html.haml index 889ffa7a..9e8b0b9f 100644 --- a/app/views/about/privacy.html.haml +++ b/app/views/about/privacy.html.haml @@ -96,13 +96,20 @@ %li With your consent. %li We may also disclose your personal information: %li To comply with any court order, law, or legal process, including to respond to any government or regulatory request. - %li To enforce or apply our terms of use and sale and other agreements, including for billing and collection purposes. + %li + To enforce or apply our + = link_to 'terms of use', about_tos_path + and + = link_to 'sale', about_sales_path + and other agreements, including for billing and collection purposes. %li If we believe disclosure is necessary or appropriate to protect the rights, property, or safety of Gab AI Inc, our employees, our customers, or any other person. %h3 Accessing, Correcting and Deleting Your Information %p You can review and change your personal information by logging into the Website and visiting your account profile page. %p You may also send us an email at support [at] gab [dot] com to request access to, correct or delete any personal information that you have provided to us. We cannot delete your personal information except by also deleting your user account. We may not accommodate a request to change information if we believe the change would violate any law or legal requirement or cause the information to be incorrect. - %p If you delete your User Contributions from the Website, copies of your User Contributions may remain viewable in cached and archived pages, or might have been copied or stored by other Website users. Proper access and use of information provided on the Website, including User Contributions, is governed by our Terms of Use. + %p + If you delete your User Contributions from the Website, copies of your User Contributions may remain viewable in cached and archived pages, or might have been copied or stored by other Website users. Proper access and use of information provided on the Website, including User Contributions, is governed by our + = link_to 'Terms of Use.', about_tos_path %h3 Data Security %p We have implemented measures designed to secure your personal information from accidental loss and from unauthorized access, use, alteration, and disclosure. All information you provide to us is stored on our secure servers behind firewalls. Any payment transactions will be encrypted using SSL. diff --git a/app/views/about/sales.html.haml b/app/views/about/sales.html.haml index 8a20f68a..06d16dbe 100644 --- a/app/views/about/sales.html.haml +++ b/app/views/about/sales.html.haml @@ -8,7 +8,14 @@ %p Gab AI Inc (“We” or “Gab”) hereby allow you to access certain premium features or content in exchange for a one-time or recurring fee, as applicable to the relevant features or content, such as our “GabPro” enhanced social media offering (collectively, each a “Paid Service” and collectively the "Paid Services"). Your transactions and any other use of the Paid Services are subject to these Gab Paid Service Terms of Service ("Terms”). %h3 1. Your Acceptance - %p By using a Paid Service, you signify your agreement to (1) these Terms of Sale; and (2) Gab AI Inc’s Terms of Service, Privacy Notice, and Copyright Notice, and all other terms and conditions that generally apply to the Website (as such term is defined in the Terms of Service).  Please read the Terms carefully. If you do not understand the Terms, or do not accept any part of them, then you may not use the Paid Services. + %p + By using a Paid Service, you signify your agreement to (1) these Terms of Sale; and (2) Gab AI Inc’s + = link_to 'Terms of Service', about_tos_path + , + = link_to 'Privacy Notice', about_privacy_path + , and + = link_to 'Copyright Notice', about_dmca_path + , and all other terms and conditions that generally apply to the Website (as such term is defined in the Terms of Service).  Please read the Terms carefully. If you do not understand the Terms, or do not accept any part of them, then you may not use the Paid Services. %p Each time you place an order for a Paid Service (including when you order individual subscriptions or items of content), you enter into a separate contract for services on these Terms. When you complete a purchase, you signify that you wish to enter into a binding contract for the provision of the applicable Paid Services. %h3 2. Payment, Refund and Cancellation Policy diff --git a/app/views/about/terms.html.haml b/app/views/about/terms.html.haml index 837f8904..97525514 100644 --- a/app/views/about/terms.html.haml +++ b/app/views/about/terms.html.haml @@ -10,10 +10,27 @@ %h3 Acceptance of the Terms of Use   - %p These terms of use are entered into by and between You and GAB AI INC (”Company,” “we,” or “us”). The following terms and conditions, together with the Copyright Policy, the Privacy Policy and any other documents expressly incorporated by reference (collectively, “Terms of Use”), govern your access to and use of GAB.COM and DISSENTER.COM and other web properties of Gab AI Inc, including any content, functionality, and services offered on or through GAB.COM and DISSENTER.COM (the “Website”), whether as a guest or a registered user. - %p Please read the Terms of Use carefully before you start to use the Website. By using the Website, you accept and agree to be bound and abide by these Terms of Use and our Privacy Policy, incorporated herein by reference. If you do not want to agree to these Terms of Use or the Privacy Policy, you must not access or use the Website. + %p + These terms of use are entered into by and between You and GAB AI INC (”Company,” “we,” or “us”). The following terms and conditions, together with the + = link_to 'Copyright Policy', about_dmca_path + , the + = link_to 'Privacy Policy', about_privacy_path + and any other documents expressly incorporated by reference (collectively, “Terms of Use”), govern your access to and use of GAB.COM and DISSENTER.COM and other web properties of Gab AI Inc, including any content, functionality, and services offered on or through GAB.COM and DISSENTER.COM (the “Website”), whether as a guest or a registered user. + %p + Please read the Terms of Use carefully before you start to use the Website. By using the Website, you accept and agree to be bound and abide by these Terms of Use and our + = link_to 'Privacy Policy', about_privacy_path + , incorporated herein by reference. If you do not want to agree to these Terms of Use or the + = link_to 'Privacy Policy', about_privacy_path + , you must not access or use the Website. %p This Website is offered and available to users who are 18 years of age or older. By using this Website, you represent and warrant that you are of legal age to form a binding contract with the Company and meet all of the foregoing eligibility requirements. If you do not meet all of these requirements, you must not access or use the Website. - %p Please be aware of the Terms of Sale, Privacy Policy, and Copyright Policy which are incorporated into these Terms of Use by reference. + %p + Please be aware of the + = link_to 'Terms of Sale', about_sales_path + , + = link_to 'Privacy Policy', about_privacy_path + , and + = link_to 'Copyright Policy', about_dmca_path + which are incorporated into these Terms of Use by reference. %h3 Changes to the Terms of Use  %p We may revise and update these Terms of Use from time to time in our sole discretion. All changes are effective immediately when we post them, and apply to all access to and use of the Website thereafter. Your continued use of the Website following the posting of revised Terms of Use means that you accept and agree to the changes. You are expected to check this page frequently so you are aware of any changes, as they are binding on you. @@ -27,7 +44,11 @@ %li Making all arrangements necessary for you to have access to the Website. %li Ensuring that all persons who access the Website through your internet connection are aware of these Terms of Use and comply with them. - %p To access the Website or some of the resources it offers, you may be asked to provide certain registration details or other information. It is a condition of your use of the Website that all the information you provide on the Website is correct, current, and complete. You agree that all information you provide to register with this Website or otherwise, including, but not limited to, through the use of any interactive features on the Website, is governed by our Privacy Policy, and you consent to all actions we take with respect to your information consistent with our Privacy Policy. + %p + To access the Website or some of the resources it offers, you may be asked to provide certain registration details or other information. It is a condition of your use of the Website that all the information you provide on the Website is correct, current, and complete. You agree that all information you provide to register with this Website or otherwise, including, but not limited to, through the use of any interactive features on the Website, is governed by our + = link_to 'Privacy Policy', about_privacy_path + , and you consent to all actions we take with respect to your information consistent with our + = link_to 'Privacy Policy.', about_privacy_path %p If you choose, or are provided with, a user name, password, or any other piece of information as part of our security procedures, you must treat such information as confidential, and you must not disclose it to any other person or entity. You also acknowledge that your account is personal to you and agree not to provide any other person with access to this Website or portions of it using your user name, password, or other security information. You agree to notify us immediately of any unauthorized access to or use of your user name or password or any other breach of security. You should use particular caution when accessing your account from a public or shared computer so that others are not able to view or record your password or other personal information. %p We have the right to disable any user name, password, or other identifier, whether chosen by you or provided by us, at any time if we believe you have violated any provision of these Terms of Use. @@ -109,7 +130,9 @@ %li Interfere with the operation of any computer. %li Be obscene, sexually explicit or pornographic. Note that mere nudity e.g. as a form of protest or for educational/medical reasons will not fall foul of this rule. %li Infringe any patent, trademark, trade secret, copyright, or other intellectual property or other rights of any other person. - %li Violate the legal rights (including the rights of publicity and privacy) of others or contain any material that could give rise to any civil or criminal liability under applicable laws or regulations of the United States or that otherwise may be in conflict with these Terms of Use and our Privacy Policy. + %li + Violate the legal rights (including the rights of publicity and privacy) of others or contain any material that could give rise to any civil or criminal liability under applicable laws or regulations of the United States or that otherwise may be in conflict with these Terms of Use and our + = link_to 'Privacy Policy.', about_privacy_path %li Impersonate any person, or misrepresent your identity or affiliation with any person or organization, for a purpose not protected by the First Amendment. %li Involve commercial activities relating to finance, investments or gambling, such as contests and sweepstakes, penny stock promotion, money transmission, or Initial Coin Offerings; or the trade of live or endangered animals or animal parts, or anything that portrays or encourages the abuse of animals. %li Give the impression that they emanate from or are endorsed by us or any other person or entity, if this is not the case. @@ -118,7 +141,10 @@ %p Although our Content Standards, following the First Amendment, do not proscribe offensive speech, we strongly encourage you to ensure that your User Contributions are cordial and civil. The foundation of a free society requires people to peacefully settle their differences through dialogue and debate. Gab exists to promote the free flow of information online. It is our view that the responsible exercise of one’s free speech rights is its own reward and, as a general rule, the most well-respected online publishers tend to be the ones who behave the most civilly and put forward their arguments most intelligently. %h3 Copyright Infringement - %p If you believe that any User Contributions violate your copyright, please see our Copyright Policy for instructions on sending us a notice of copyright infringement. It is the policy of the Company to terminate the user accounts of repeat infringers. + %p + If you believe that any User Contributions violate your copyright, please see our + = link_to 'Copyright Policy', about_dmca_path + for instructions on sending us a notice of copyright infringement. It is the policy of the Company to terminate the user accounts of repeat infringers. %h3 Reliance on Information Posted %p The information presented on or through the Website is made available solely for general information purposes. We do not warrant the accuracy, completeness, or usefulness of this information. Any reliance you place on such information is strictly at your own risk. We disclaim all liability and responsibility arising from any reliance placed on such materials by you or any other visitor to the Website, or by anyone who may be informed of any of its contents. @@ -128,10 +154,16 @@ %p We may update the content on this Website from time to time, but its content is not necessarily complete or up-to-date. Any of the material on the Website may be out of date at any given time, and we are under no obligation to update such material. ‌ %h3 Information About You and Your Visits to the Website - %p All information we collect on this Website is subject to our Privacy Policy. By using the Website, you consent to all actions taken by us with respect to your information in compliance with the Privacy Policy. + %p + All information we collect on this Website is subject to our + = link_to 'Privacy Policy.', about_privacy_path + By using the Website, you consent to all actions taken by us with respect to your information in compliance with the + = link_to 'Privacy Policy.', about_privacy_path ‌ %h3 Online Purchases and Other Terms and Conditions - %p All purchases through our site or other transactions for the sale of services formed through the Website, or resulting from visits made by you, are governed by our Terms of Sale. + %p + All purchases through our site or other transactions for the sale of services formed through the Website, or resulting from visits made by you, are governed by our + = link_to 'Terms of Sale.', about_sales_path %p Additional terms and conditions may also apply to specific portions, services, or features of the Website. All such additional terms and conditions are hereby incorporated by this reference into these Terms of Use. ‌ %h3 Linking to the Website and Social Media Features @@ -180,11 +212,21 @@ %p If any provision of these Terms of Use is held by a court or other tribunal of competent jurisdiction to be invalid, illegal, or unenforceable for any reason, such provision shall be eliminated or limited to the minimum extent such that the remaining provisions of the Terms of Use will continue in full force and effect. %h3 Entire Agreement - %p The Terms of Use, our Privacy Policy, our Copyright Policy and any Terms of Sale constitute the sole and entire agreement between you and Gab AI Inc. regarding the Website and supersede all prior and contemporaneous understandings, agreements, representations, and warranties, both written and oral, regarding the Website. + %p + The Terms of Use, our + = link_to 'Privacy Policy', about_privacy_path + , our + = link_to 'Copyright Policy', about_dmca_path + and any + = link_to 'Terms of Sale', about_sales_path + constitute the sole and entire agreement between you and Gab AI Inc. regarding the Website and supersede all prior and contemporaneous understandings, agreements, representations, and warranties, both written and oral, regarding the Website. ‌ %h3 Your Comments and Concerns %p This Website is operated by GAB AI INC. - %p All notices of copyright infringement claims should be sent pursuant to the terms of our Copyright Policy in the manner and by the means set out therein. + %p + All notices of copyright infringement claims should be sent pursuant to the terms of our + = link_to 'Copyright Policy', about_dmca_path + in the manner and by the means set out therein. %p All other feedback, comments, requests for technical support, and other communications relating to the Website should be directed to %p From 247ccbc26535e20dfef4acf0cc868d8894dbd806 Mon Sep 17 00:00:00 2001 From: robcolbert Date: Mon, 8 Jul 2019 18:29:52 -0400 Subject: [PATCH 02/17] indentation fix --- streaming/index.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/streaming/index.js b/streaming/index.js index 30110427..38d9b28f 100644 --- a/streaming/index.js +++ b/streaming/index.js @@ -660,19 +660,20 @@ const startWorker = (workerId) => { streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel))); }); break; + case 'group': - const groupId = location.query.group; - - authorizeGroupAccess(groupId, req, authorized => { - if (!authorized) { - ws.close(); - return; - } - - channel = `timeline:group:${groupId}`; - streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel))); - }); - break; + const groupId = location.query.group; + + authorizeGroupAccess(groupId, req, authorized => { + if (!authorized) { + ws.close(); + return; + } + + channel = `timeline:group:${groupId}`; + streamFrom(channel, req, streamToWs(req, ws), streamWsEnd(req, ws, subscriptionHeartbeat(channel))); + }); + break; default: ws.close(); } From f12145eb4797e915dc608405e7838846803d464e Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:49:44 -0400 Subject: [PATCH 03/17] Added HomePage for use with components that require all home page related features such as compose, user panel, etc. --- app/javascript/gabsocial/pages/home_page.js | 58 +++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 app/javascript/gabsocial/pages/home_page.js diff --git a/app/javascript/gabsocial/pages/home_page.js b/app/javascript/gabsocial/pages/home_page.js new file mode 100644 index 00000000..931fae4c --- /dev/null +++ b/app/javascript/gabsocial/pages/home_page.js @@ -0,0 +1,58 @@ +import React from 'react'; +import { connect } from 'react-redux'; +import { me } from 'gabsocial/initial_state'; +import PropTypes from 'prop-types'; +import ImmutablePureComponent from 'react-immutable-pure-component'; +import WhoToFollowPanel from '../features/ui/components/who_to_follow_panel'; +import LinkFooter from '../features/ui/components/link_footer'; +import PromoPanel from '../features/ui/components/promo_panel'; +import UserPanel from '../features/ui/components/user_panel'; +import ComposeFormContainer from '../features/compose/containers/compose_form_container'; +import Avatar from '../components/avatar'; + +const mapStateToProps = state => ({ + account: state.getIn(['accounts', me]), +}); + +export default @connect(mapStateToProps) +class HomePage extends ImmutablePureComponent { + render () { + const {children, account} = this.props; + + return ( +
+
+
+ +
+
+ + + +
+
+ +
+
+
+
+ +
+ +
+ + {children} +
+
+ +
+
+ +
+
+
+
+
+ ) + } +} From c7b70b77c5c97f68049680961e431b725116c274 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:50:12 -0400 Subject: [PATCH 04/17] Updated home route to use HomePage instead of home layout --- app/javascript/gabsocial/features/ui/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/javascript/gabsocial/features/ui/index.js b/app/javascript/gabsocial/features/ui/index.js index 28d0cc3b..0b1e2c70 100644 --- a/app/javascript/gabsocial/features/ui/index.js +++ b/app/javascript/gabsocial/features/ui/index.js @@ -29,6 +29,7 @@ import UserPanel from './components/user_panel'; import PromoPanel from './components/promo_panel'; import ProfilePage from 'gabsocial/pages/profile_page'; import SearchPage from 'gabsocial/pages/search_page'; +import HomePage from 'gabsocial/pages/home_page'; import { Compose, @@ -181,7 +182,7 @@ class SwitchingColumnsArea extends React.PureComponent { return ( - + From 899be5b4f0cdfa82d6120aa824992308c1030e61 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:50:30 -0400 Subject: [PATCH 05/17] Removed home layout in ui/index unused now that we have HomePage --- app/javascript/gabsocial/features/ui/index.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/javascript/gabsocial/features/ui/index.js b/app/javascript/gabsocial/features/ui/index.js index 0b1e2c70..e1746ae0 100644 --- a/app/javascript/gabsocial/features/ui/index.js +++ b/app/javascript/gabsocial/features/ui/index.js @@ -111,17 +111,6 @@ const LAYOUT = { LEFT: null, RIGHT: null, }, - HOME: { - LEFT: [ - , - , - , - ], - RIGHT: [ - // , - , - ], - }, DEFAULT: { LEFT: [ , From cf83aa58c38eab07f56aa4d228858abb4ff39ab4 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:50:57 -0400 Subject: [PATCH 06/17] Added all/community timeline route --- app/javascript/gabsocial/features/ui/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/javascript/gabsocial/features/ui/index.js b/app/javascript/gabsocial/features/ui/index.js index e1746ae0..efdada4d 100644 --- a/app/javascript/gabsocial/features/ui/index.js +++ b/app/javascript/gabsocial/features/ui/index.js @@ -172,6 +172,7 @@ class SwitchingColumnsArea extends React.PureComponent { + From de2126bd60e25341524559f54264154693138c4d Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:51:08 -0400 Subject: [PATCH 07/17] Removed unused imports --- app/javascript/gabsocial/features/ui/index.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/javascript/gabsocial/features/ui/index.js b/app/javascript/gabsocial/features/ui/index.js index efdada4d..9c46d2ba 100644 --- a/app/javascript/gabsocial/features/ui/index.js +++ b/app/javascript/gabsocial/features/ui/index.js @@ -24,9 +24,6 @@ import TabsBar from './components/tabs_bar'; // import TrendsPanel from './components/trends_panel'; import WhoToFollowPanel from './components/who_to_follow_panel'; import LinkFooter from './components/link_footer'; -import ProfileInfoPanel from './components/profile_info_panel'; -import UserPanel from './components/user_panel'; -import PromoPanel from './components/promo_panel'; import ProfilePage from 'gabsocial/pages/profile_page'; import SearchPage from 'gabsocial/pages/search_page'; import HomePage from 'gabsocial/pages/home_page'; @@ -35,7 +32,6 @@ import { Compose, Status, GettingStarted, - PublicTimeline, CommunityTimeline, AccountTimeline, AccountGallery, From 2c047a11260cc139d7bd65059915d526c8681574 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:52:18 -0400 Subject: [PATCH 08/17] Fixed issue with key warning/error log --- app/javascript/gabsocial/components/autosuggest_textarea.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/gabsocial/components/autosuggest_textarea.js b/app/javascript/gabsocial/components/autosuggest_textarea.js index 4ae4c48e..a892bfae 100644 --- a/app/javascript/gabsocial/components/autosuggest_textarea.js +++ b/app/javascript/gabsocial/components/autosuggest_textarea.js @@ -208,7 +208,7 @@ export default class AutosuggestTextarea extends ImmutablePureComponent { } return [ -
+
{children}
, -
+
{suggestions.map(this.renderSuggestion)}
From 41895b12ab39fe1073864a9c170af2e7c78e4c61 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:56:11 -0400 Subject: [PATCH 09/17] Added home_column_header includes custom tabs for home, all buttons to switch between home page and all/community page --- .../components/home_column_header.js | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 app/javascript/gabsocial/components/home_column_header.js diff --git a/app/javascript/gabsocial/components/home_column_header.js b/app/javascript/gabsocial/components/home_column_header.js new file mode 100644 index 00000000..34a1488f --- /dev/null +++ b/app/javascript/gabsocial/components/home_column_header.js @@ -0,0 +1,109 @@ +'use strict'; + +import React from 'react'; +import PropTypes from 'prop-types'; +import classNames from 'classnames'; +import { FormattedMessage, injectIntl, defineMessages } from 'react-intl'; +import { Link } from 'react-router-dom'; +import Icon from 'gabsocial/components/icon'; + +const messages = defineMessages({ + show: { id: 'column_header.show_settings', defaultMessage: 'Show settings' }, + hide: { id: 'column_header.hide_settings', defaultMessage: 'Hide settings' }, + homeTitle: { id: 'home_column_header.home', defaultMessage: 'Home' }, + allTitle: { id: 'home_column_header.all', defaultMessage: 'All' }, +}); + +export default @injectIntl +class ColumnHeader extends React.PureComponent { + + static contextTypes = { + router: PropTypes.object, + }; + + static propTypes = { + intl: PropTypes.object.isRequired, + active: PropTypes.bool, + children: PropTypes.node, + activeItem: PropTypes.string, + }; + + state = { + collapsed: true, + animating: false, + }; + + handleToggleClick = (e) => { + e.stopPropagation(); + this.setState({ collapsed: !this.state.collapsed, animating: true }); + } + + handleTransitionEnd = () => { + this.setState({ animating: false }); + } + + render () { + const { active, children, intl: { formatMessage }, activeItem } = this.props; + const { collapsed, animating } = this.state; + + const wrapperClassName = classNames('column-header__wrapper', { + 'active': active, + }); + + const buttonClassName = classNames('column-header', { + 'active': active, + }); + + const collapsibleClassName = classNames('column-header__collapsible', { + 'collapsed': collapsed, + 'animating': animating, + }); + + const collapsibleButtonClassName = classNames('column-header__button', { + 'active': !collapsed, + }); + + let extraContent, collapseButton; + + if (children) { + extraContent = ( +
+ {children} +
+ ); + + collapseButton = ; + } + + const collapsedContent = [ + extraContent, + ]; + + return ( +
+

+ + + {formatMessage(messages.homeTitle)} + + + + + {formatMessage(messages.allTitle)} + + +
+ {collapseButton} +
+

+ +
+
+ {(!collapsed || animating) && collapsedContent} +
+
+
+ ); + } + +} From 7b2aa82ac5362499984ee0d3cf9fd7bea55cf23e Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:57:06 -0400 Subject: [PATCH 10/17] Updated style updates for column header buttons for grouped, active --- app/javascript/styles/gabsocial/components.scss | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/javascript/styles/gabsocial/components.scss b/app/javascript/styles/gabsocial/components.scss index b45325ca..c0020d1e 100644 --- a/app/javascript/styles/gabsocial/components.scss +++ b/app/javascript/styles/gabsocial/components.scss @@ -2481,7 +2481,8 @@ a.status-card.compact:hover { outline: 0; overflow: hidden; - & > button { + & > button, + & > .btn { margin: 0; border: none; padding: 15px 0 15px 15px; @@ -2490,9 +2491,19 @@ a.status-card.compact:hover { font: inherit; text-align: left; text-overflow: ellipsis; + text-decoration: none; overflow: hidden; white-space: nowrap; - flex: 1; + + &.grouped { + margin: 6px; + } + + &.active { + color: $primary-text-color; + border-radius: 10px; + background-color: rgba($highlight-text-color, .1); + } } & > .column-header__back-button { @@ -2517,6 +2528,7 @@ a.status-card.compact:hover { .column-header__buttons { height: 48px; display: flex; + margin-left: auto; } .column-header__links .text-btn { From 100076ab6fb1beea091107fb1015ac3d9d83f224 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:57:24 -0400 Subject: [PATCH 11/17] Updated margin of compose block --- app/javascript/styles/gabsocial/components.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/styles/gabsocial/components.scss b/app/javascript/styles/gabsocial/components.scss index c0020d1e..22c46bbc 100644 --- a/app/javascript/styles/gabsocial/components.scss +++ b/app/javascript/styles/gabsocial/components.scss @@ -246,7 +246,7 @@ align-items: flex-start; padding: 20px; border-radius: 10px; - margin-bottom: 20px; + margin-bottom: 10px; background: $gab-background-container; body.theme-gabsocial-light & { @include light-theme-shadow(); From a74d1ce2fcb06d869758f475dd063246bfde4936 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:57:52 -0400 Subject: [PATCH 12/17] Updated padding of column header buttons --- app/javascript/styles/gabsocial/components.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/styles/gabsocial/components.scss b/app/javascript/styles/gabsocial/components.scss index 22c46bbc..6dc4a58c 100644 --- a/app/javascript/styles/gabsocial/components.scss +++ b/app/javascript/styles/gabsocial/components.scss @@ -2485,7 +2485,7 @@ a.status-card.compact:hover { & > .btn { margin: 0; border: none; - padding: 15px 0 15px 15px; + padding: 15px; color: inherit; background: transparent; font: inherit; From 29215a2479a55f0265b2975e5842776726c58434 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:58:07 -0400 Subject: [PATCH 13/17] Updated column header style to match other panels with rounded corners --- app/javascript/styles/gabsocial/components.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/javascript/styles/gabsocial/components.scss b/app/javascript/styles/gabsocial/components.scss index 6dc4a58c..5933ccdc 100644 --- a/app/javascript/styles/gabsocial/components.scss +++ b/app/javascript/styles/gabsocial/components.scss @@ -2445,6 +2445,9 @@ a.status-card.compact:hover { .column-header__wrapper { position: relative; flex: 0 0 auto; + border-top-right-radius: 10px; + border-top-left-radius: 10px; + overflow: hidden; &.active { &::before { From 2a7e3bb78276b5a506781cc554beb85ae0f8b4c7 Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:58:19 -0400 Subject: [PATCH 14/17] Fixed issue with scrollbar showing on main column pane --- app/javascript/styles/gabsocial/components.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/javascript/styles/gabsocial/components.scss b/app/javascript/styles/gabsocial/components.scss index 5933ccdc..2dce18e5 100644 --- a/app/javascript/styles/gabsocial/components.scss +++ b/app/javascript/styles/gabsocial/components.scss @@ -1475,7 +1475,8 @@ a.account__display-name { flex-direction: column; width: 100%; margin: 0 auto; - + overflow: hidden; + .column, .drawer { width: 100%; From 451e5eaca0262af4aec75ce6c04d8922e2a4ab5f Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Mon, 8 Jul 2019 23:59:11 -0400 Subject: [PATCH 15/17] Updated community/home timeilne to use new HomeColumnHeader removed duplicate components from home_timeline that is now in home_page like compose, avatar, etc. removed unused imports --- .../features/community_timeline/index.js | 12 ++++----- .../gabsocial/features/home_timeline/index.js | 25 ++++++------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/app/javascript/gabsocial/features/community_timeline/index.js b/app/javascript/gabsocial/features/community_timeline/index.js index c42e0707..cb8ae3d3 100644 --- a/app/javascript/gabsocial/features/community_timeline/index.js +++ b/app/javascript/gabsocial/features/community_timeline/index.js @@ -4,10 +4,10 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; import StatusListContainer from '../ui/containers/status_list_container'; import Column from '../../components/column'; -import ColumnHeader from '../../components/column_header'; import { expandCommunityTimeline } from '../../actions/timelines'; import ColumnSettingsContainer from './containers/column_settings_container'; import { connectCommunityStream } from '../../actions/streaming'; +import HomeColumnHeader from '../../components/home_column_header'; const messages = defineMessages({ title: { id: 'column.community', defaultMessage: 'Local timeline' }, @@ -79,14 +79,12 @@ class CommunityTimeline extends React.PureComponent { return ( - - - - + + ({ hasUnread: state.getIn(['timelines', 'home', 'unread']) > 0, isPartial: state.getIn(['timelines', 'home', 'isPartial']), - account: state.getIn(['accounts', me]), }); export default @connect(mapStateToProps) @@ -72,22 +67,16 @@ class HomeTimeline extends React.PureComponent { } render () { - const { intl, hasUnread, columnId, account } = this.props; + const { intl, hasUnread, columnId } = this.props; return ( - -
-
- -
- -
- - + - - + Date: Tue, 9 Jul 2019 00:19:03 -0400 Subject: [PATCH 16/17] Added functionality to notifications page to scroll top on component mount clears notification badge (unread count) on page open --- app/javascript/gabsocial/features/notifications/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/javascript/gabsocial/features/notifications/index.js b/app/javascript/gabsocial/features/notifications/index.js index 7857eaa8..011c6ecb 100644 --- a/app/javascript/gabsocial/features/notifications/index.js +++ b/app/javascript/gabsocial/features/notifications/index.js @@ -64,6 +64,10 @@ class Notifications extends React.PureComponent { this.props.dispatch(scrollTopNotifications(false)); } + componentDidMount() { + this.props.dispatch(scrollTopNotifications(true)); + } + handleLoadGap = (maxId) => { this.props.dispatch(expandNotifications({ maxId })); }; From fd50f03304d87e1d6ce88a00d9ffbfaa7158cda7 Mon Sep 17 00:00:00 2001 From: robcolbert Date: Tue, 9 Jul 2019 00:48:11 -0400 Subject: [PATCH 17/17] Gabbers like servers that are less pushy. --- app/services/fan_out_on_write_service.rb | 14 +++++++------- app/workers/push_conversation_worker.rb | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/services/fan_out_on_write_service.rb b/app/services/fan_out_on_write_service.rb index 1478da29..ea5e4788 100644 --- a/app/services/fan_out_on_write_service.rb +++ b/app/services/fan_out_on_write_service.rb @@ -58,10 +58,10 @@ class FanOutOnWriteService < BaseService def deliver_to_group(status) return if status.group_id.nil? - + Rails.logger.debug "Delivering status #{status.id} to group" - - Redis.current.publish("timeline:group:#{status.group_id}", @payload) + + # Redis.current.publish("timeline:group:#{status.group_id}", @payload) end def deliver_to_mentioned_followers(status) @@ -89,15 +89,15 @@ class FanOutOnWriteService < BaseService def deliver_to_public(status) Rails.logger.debug "Delivering status #{status.id} to public timeline" - Redis.current.publish('timeline:public', @payload) - Redis.current.publish('timeline:public:local', @payload) if status.local? + # Redis.current.publish('timeline:public', @payload) + # Redis.current.publish('timeline:public:local', @payload) if status.local? end def deliver_to_media(status) Rails.logger.debug "Delivering status #{status.id} to media timeline" - Redis.current.publish('timeline:public:media', @payload) - Redis.current.publish('timeline:public:local:media', @payload) if status.local? + # Redis.current.publish('timeline:public:media', @payload) + # Redis.current.publish('timeline:public:local:media', @payload) if status.local? end def deliver_to_own_conversation(status) diff --git a/app/workers/push_conversation_worker.rb b/app/workers/push_conversation_worker.rb index 16f53821..f7a1c7a1 100644 --- a/app/workers/push_conversation_worker.rb +++ b/app/workers/push_conversation_worker.rb @@ -7,8 +7,8 @@ class PushConversationWorker conversation = AccountConversation.find(conversation_account_id) message = InlineRenderer.render(conversation, conversation.account, :conversation) timeline_id = "timeline:direct:#{conversation.account_id}" - - Redis.current.publish(timeline_id, Oj.dump(event: :conversation, payload: message, queued_at: (Time.now.to_f * 1000.0).to_i)) + # Redis.current.publish(timeline_id, Oj.dump(event: :conversation, payload: message, queued_at: (Time.now.to_f * 1000.0).to_i)) + true rescue ActiveRecord::RecordNotFound true end