From 8dde1abdd47524cc01011b0af09c1b32b4661336 Mon Sep 17 00:00:00 2001 From: Baptiste Lemoine Date: Tue, 7 Jan 2020 16:44:50 +0100 Subject: [PATCH] :art: style on conversations stacks Signed-off-by: Baptiste Lemoine --- .../mastodon/components/error_boundary.js | 51 +++++++++----- .../features/ui/components/link_footer.js | 5 +- .../components/messaging/conversation-item.js | 69 +++++++++++++------ .../messaging/conversation-stream.js | 29 +++++++- .../components/messaging/conversationStack.js | 42 +++++------ .../components/messaging/mockConversation.js | 33 +++++++++ app/javascript/styles/bliss/admin.scss | 16 +++++ app/javascript/styles/bliss/messaging.scss | 19 ++--- app/javascript/styles/mastodon/basics.scss | 4 ++ app/views/settings/profiles/show.html.haml | 28 ++++---- 10 files changed, 214 insertions(+), 82 deletions(-) create mode 100644 app/javascript/mastodon/features/ui/components/messaging/mockConversation.js diff --git a/app/javascript/mastodon/components/error_boundary.js b/app/javascript/mastodon/components/error_boundary.js index 800b1c270..6f763619c 100644 --- a/app/javascript/mastodon/components/error_boundary.js +++ b/app/javascript/mastodon/components/error_boundary.js @@ -1,7 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; -import { version, source_url } from 'mastodon/initial_state'; +import { source_url, version } from 'mastodon/initial_state'; export default class ErrorBoundary extends React.PureComponent { @@ -10,17 +10,17 @@ export default class ErrorBoundary extends React.PureComponent { }; state = { - hasError: false, - stackTrace: undefined, + hasError : false, + stackTrace : undefined, componentStack: undefined, }; - componentDidCatch (error, info) { + componentDidCatch(error, info) { this.setState({ - hasError: true, - stackTrace: error.stack, + hasError : true, + stackTrace : error.stack, componentStack: info && info.componentStack, - copied: false, + copied : false, }); } @@ -28,7 +28,7 @@ export default class ErrorBoundary extends React.PureComponent { const { stackTrace } = this.state; const textarea = document.createElement('textarea'); - textarea.textContent = stackTrace; + textarea.textContent = stackTrace; textarea.style.position = 'fixed'; document.body.appendChild(textarea); @@ -44,7 +44,7 @@ export default class ErrorBoundary extends React.PureComponent { this.setState({ copied: true }); setTimeout(() => this.setState({ copied: false }), 700); - } + }; render() { const { hasError, copied } = this.state; @@ -54,13 +54,32 @@ export default class ErrorBoundary extends React.PureComponent { } return ( -
-
-

-

-

Mastodon v{version} · ·

-
-
+
+
+

+

+

Mastodon v{version} · ·

+
+
); } diff --git a/app/javascript/mastodon/features/ui/components/link_footer.js b/app/javascript/mastodon/features/ui/components/link_footer.js index dd0a2d47d..f3fd69e47 100644 --- a/app/javascript/mastodon/features/ui/components/link_footer.js +++ b/app/javascript/mastodon/features/ui/components/link_footer.js @@ -106,7 +106,10 @@ class LinkFooter extends React.PureComponent { var snowClasses = this.props.enableChristmasSnow ? 'snow-button active' : 'snow-button '; const navToTags = HashTagNavlinks.map(element => { return ( -
  • +
  • -
    +
  • +
    - Un Gens - - (3) + + {this.props.newMessages && ( + + ({this.props.newMessages}) + + )}
    -
    -
    -

    oh hello there! 😋

    -
    -
    -
    -

    General Emoji

    -
    -
    -
    -

    we just achieved comedy

    -
    -
    -
    +