diff --git a/ui/component/channelDiscussion/view.jsx b/ui/component/channelDiscussion/view.jsx index 232bc551d..30372f543 100644 --- a/ui/component/channelDiscussion/view.jsx +++ b/ui/component/channelDiscussion/view.jsx @@ -1,7 +1,6 @@ // @flow import React from 'react'; import CommentsList from 'component/commentsList'; -import CommentCreate from 'component/commentCreate'; type Props = { uri: string, @@ -10,14 +9,9 @@ type Props = { function ChannelDiscussion(props: Props) { const uri = props.uri; return ( -
-
- -
-
- -
-
+
+ +
); } diff --git a/ui/component/router/view.jsx b/ui/component/router/view.jsx index 4f3e9fc53..ef9a327f8 100644 --- a/ui/component/router/view.jsx +++ b/ui/component/router/view.jsx @@ -46,6 +46,7 @@ import ChannelNew from 'page/channelNew'; import BuyPage from 'page/buy'; import NotificationsPage from 'page/notifications'; import SignInWalletPasswordPage from 'page/signInWalletPassword'; +import { LINKED_COMMENT_QUERY_PARAM } from 'constants/comment'; import { parseURI } from 'lbry-redux'; import { SITE_TITLE, WELCOME_VERSION } from 'config'; @@ -115,6 +116,7 @@ function AppRouter(props: Props) { const entryIndex = history.index; const urlParams = new URLSearchParams(search); const resetScroll = urlParams.get('reset_scroll'); + const hasLinkedCommentInUrl = urlParams.get(LINKED_COMMENT_QUERY_PARAM); // For people arriving at settings page from deeplinks, know whether they can "go back" useEffect(() => { @@ -152,8 +154,10 @@ function AppRouter(props: Props) { }, [entries, entryIndex, title, uri]); useEffect(() => { - window.scrollTo(0, currentScroll); - }, [currentScroll, pathname, resetScroll]); + if (!hasLinkedCommentInUrl) { + window.scrollTo(0, currentScroll); + } + }, [currentScroll, pathname, resetScroll, hasLinkedCommentInUrl]); // react-router doesn't decode pathanmes before doing the route matching check // We have to redirect here because if we redirect on the server, it might get encoded again diff --git a/ui/constants/comment.js b/ui/constants/comment.js new file mode 100644 index 000000000..b1a8ae740 --- /dev/null +++ b/ui/constants/comment.js @@ -0,0 +1 @@ +export const LINKED_COMMENT_QUERY_PARAM = 'lc'; diff --git a/ui/scss/component/_comments.scss b/ui/scss/component/_comments.scss index 90ddd2787..486f43c60 100644 --- a/ui/scss/component/_comments.scss +++ b/ui/scss/component/_comments.scss @@ -129,6 +129,12 @@ $thumbnailWidthSmall: 2rem; .comment__message { word-break: break-word; max-width: 35rem; + + p { + & + p { + margin-top: var(--spacing-xxs); + } + } } .comment__author { diff --git a/ui/scss/init/_gui.scss b/ui/scss/init/_gui.scss index 9608c0567..426932ea4 100644 --- a/ui/scss/init/_gui.scss +++ b/ui/scss/init/_gui.scss @@ -44,6 +44,12 @@ h6 { font-size: 1rem; } +p { + & + p { + margin-top: var(--spacing-s); + } +} + ul, ol { li {