From 6f96ea10a91a6c5b5fc9510f44d2d5ebd1a4b6ce Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 22 Nov 2017 15:28:56 -0500 Subject: [PATCH 1/2] fix channel name alignment --- ui/js/component/fileCard/view.jsx | 13 +++---- ui/js/component/uriIndicator/view.jsx | 6 ++- ui/js/page/file/view.jsx | 47 +++++++++++++---------- ui/scss/component/_card.scss | 12 ++++++ ui/scss/component/_channel-indicator.scss | 5 ++- 5 files changed, 52 insertions(+), 31 deletions(-) diff --git a/ui/js/component/fileCard/view.jsx b/ui/js/component/fileCard/view.jsx index be825dc55..00a42eb29 100644 --- a/ui/js/component/fileCard/view.jsx +++ b/ui/js/component/fileCard/view.jsx @@ -59,9 +59,8 @@ class FileCard extends React.PureComponent { const uri = lbryuri.normalize(this.props.uri); const title = metadata && metadata.title ? metadata.title : uri; - const thumbnail = metadata && metadata.thumbnail - ? metadata.thumbnail - : null; + const thumbnail = + metadata && metadata.thumbnail ? metadata.thumbnail : null; const obscureNsfw = this.props.obscureNsfw && metadata && metadata.nsfw; const isRewardContent = claim && rewardedContentClaimIds.includes(claim.claim_id); @@ -96,13 +95,11 @@ class FileCard extends React.PureComponent {
- - {" "} - {isRewardContent && } - {" "} + {" "} + {isRewardContent && }{" "} {fileInfo && } - +
{/* Test for nizuka's design: should we remove description? diff --git a/ui/js/component/uriIndicator/view.jsx b/ui/js/component/uriIndicator/view.jsx index 3fa1cb41f..cff4bd073 100644 --- a/ui/js/component/uriIndicator/view.jsx +++ b/ui/js/component/uriIndicator/view.jsx @@ -21,7 +21,7 @@ class UriIndicator extends React.PureComponent { } render() { - const { claim, link, uri, isResolvingUri } = this.props; + const { claim, link, uri, isResolvingUri, smallCard } = this.props; if (isResolvingUri && !claim) { return Validating...; @@ -60,7 +60,9 @@ class UriIndicator extends React.PureComponent { const inner = ( - {channelName}{" "} + + {channelName} + {" "} {!signatureIsValid ? (
- {isPlayable - ?
- {(!tab || tab === "details") && + {(!tab || tab === "details") && (
- {" "} {" "} + {" "}
- {!fileInfo || fileInfo.written_bytes <= 0 - ? - - {isRewardContent && - {" "}} - - : null} + {!fileInfo || fileInfo.written_bytes <= 0 ? ( + + + {isRewardContent && ( + + {" "} + + + )} + + ) : null}

{title}

-
+
- - + Published on{" "}
-
} - {tab === "tip" && - } +
+ )} + {tab === "tip" && ( + + )}
); diff --git a/ui/scss/component/_card.scss b/ui/scss/component/_card.scss index 44575951c..a630d5558 100644 --- a/ui/scss/component/_card.scss +++ b/ui/scss/component/_card.scss @@ -194,6 +194,18 @@ $font-size-subtext-multiple: 0.82; line-height: calc( var(--font-line-height) * 1 / 0.85); } +.card--file-subtitle { + display: flex; +} + +// this is too specific +// it should be a helper class +// ex. ".m-padding-left" +// will come back to this during the redesign - sean +.card__publish-date { + padding-left: 20px; +} + .card-series-submit { margin-left: auto; diff --git a/ui/scss/component/_channel-indicator.scss b/ui/scss/component/_channel-indicator.scss index 58196e1be..aa344f8b2 100644 --- a/ui/scss/component/_channel-indicator.scss +++ b/ui/scss/component/_channel-indicator.scss @@ -1,12 +1,15 @@ .channel-name { - width: calc(var(--card-small-width) * 2 / 3); display: inline-block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis } +.channel-name--small { + width: calc(var(--card-small-width) * 2 / 3); +} + .channel-indicator__icon--invalid { color: var(--color-error); } -- 2.45.2 From 3f2c871e424e8737a8a44cb587c8be6be3e9b097 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 22 Nov 2017 15:33:45 -0500 Subject: [PATCH 2/2] add comment --- ui/scss/component/_channel-indicator.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/scss/component/_channel-indicator.scss b/ui/scss/component/_channel-indicator.scss index aa344f8b2..6c63a4235 100644 --- a/ui/scss/component/_channel-indicator.scss +++ b/ui/scss/component/_channel-indicator.scss @@ -6,6 +6,8 @@ text-overflow: ellipsis } +// this shouldn't know about the card width +// will come back to this for the redesign - sean .channel-name--small { width: calc(var(--card-small-width) * 2 / 3); } -- 2.45.2