From a6a5ef7941b3d275927c80222165923d4eb6dc71 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Wed, 28 Nov 2018 17:58:37 -0800 Subject: [PATCH] long and short shared messages; clarified logic around which banner to show --- src/views/preview/banner.scss | 2 +- src/views/preview/l10n.json | 3 ++- src/views/preview/presentation.jsx | 33 ++++++++++++++++++++---------- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/views/preview/banner.scss b/src/views/preview/banner.scss index 3773f7dfc..adc545a3f 100644 --- a/src/views/preview/banner.scss +++ b/src/views/preview/banner.scss @@ -9,8 +9,8 @@ $navigation-height: 50px; min-height: 3.75rem; overflow: hidden; color: $ui-orange; - font-weight: bold; font-size: .875rem; + font-weight: bold; align-self: center; } diff --git a/src/views/preview/l10n.json b/src/views/preview/l10n.json index bd30aeb1f..588486488 100644 --- a/src/views/preview/l10n.json +++ b/src/views/preview/l10n.json @@ -13,7 +13,8 @@ "project.comments.turnOff": "Turn off commenting", "project.comments.turnedOff": "Sorry, comment posting has been turned off for this project.", "project.share.notShared": "This project is not shared — so only you can see it. Click share to let everyone see it!", - "project.share.shared": "Congratulations on sharing your project! Other people can now try it out, give comments, and remix it.", + "project.share.sharedLong": "Congratulations on sharing your project! Other people can now try it out, give comments, and remix it.", + "project.share.sharedShort": "Your project is now shared.", "project.share.shareButton": "Share", "project.seeInsideButton": "See inside", "project.remixButton": "Remix", diff --git a/src/views/preview/presentation.jsx b/src/views/preview/presentation.jsx index c67a6cf35..ba56a5280 100644 --- a/src/views/preview/presentation.jsx +++ b/src/views/preview/presentation.jsx @@ -135,17 +135,28 @@ const PreviewPresentation = ({ message={embedCensorMessage(visibilityInfo.censorMessage)} />); } - } else if (canShare && !isShared) { - banner = (} - message={} - onAction={onShare} - />); - } else if (isShared && isNewScratcher) { - banner = (} - />); + } else if (canShare) { + if (isShared) { + if (justShared) { + if (isNewScratcher) { + banner = (} + />); + } else { + banner = (} + />); + } + } // if was shared a while ago, don't show any share banner + } else { + banner = (} + message={} + onAction={onShare} + />); + } } return (