From c7f3ac00e945a27633370c15a6dc37301fac4a33 Mon Sep 17 00:00:00 2001 From: kyleplo <31634240+kyleplo@users.noreply.github.com> Date: Thu, 3 Jan 2019 08:30:46 -0500 Subject: [PATCH 1/7] Fix font in add to studio modal --- src/components/modal/addtostudio/modal.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/modal/addtostudio/modal.scss b/src/components/modal/addtostudio/modal.scss index 40fb0ae8a..4c6f7147f 100644 --- a/src/components/modal/addtostudio/modal.scss +++ b/src/components/modal/addtostudio/modal.scss @@ -110,7 +110,7 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - font-family: "Helvetica Neue"; + font-family: "Helvetica Neue", sans-serif; font-size: .875rem; font-weight: regular; flex-shrink: 1; From 7cfad7b075a645ce47bdc509561b017ca2bcd2d0 Mon Sep 17 00:00:00 2001 From: kyleplo <31634240+kyleplo@users.noreply.github.com> Date: Thu, 3 Jan 2019 09:23:06 -0500 Subject: [PATCH 2/7] switch to more common options --- src/components/modal/addtostudio/modal.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/modal/addtostudio/modal.scss b/src/components/modal/addtostudio/modal.scss index 4c6f7147f..03640f753 100644 --- a/src/components/modal/addtostudio/modal.scss +++ b/src/components/modal/addtostudio/modal.scss @@ -110,7 +110,7 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - font-family: "Helvetica Neue", sans-serif; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: .875rem; font-weight: regular; flex-shrink: 1; From e10f4953b41575716824c538a909ab290cdcbb8d Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Thu, 3 Jan 2019 12:34:03 -0500 Subject: [PATCH 3/7] Update to latest gui --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3f2d9fa13..41a1037ce 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "redux": "3.5.2", "redux-thunk": "2.0.1", "sass-loader": "6.0.6", - "scratch-gui": "0.1.0-prerelease.20190102131553", + "scratch-gui": "0.1.0-prerelease.20190103170205", "scratch-l10n": "latest", "scratchr2_translations": "git://github.com/LLK/scratchr2_translations.git#master", "slick-carousel": "1.6.0", From 627737fdd480fc83aa09a7c83a08190fa43d39f2 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Thu, 3 Jan 2019 12:45:07 -0500 Subject: [PATCH 4/7] collapse empty project instructions or notes and credits --- src/views/preview/presentation.jsx | 168 +++++++++++++++-------------- 1 file changed, 88 insertions(+), 80 deletions(-) diff --git a/src/views/preview/presentation.jsx b/src/views/preview/presentation.jsx index d38d67912..bd2154ee1 100644 --- a/src/views/preview/presentation.jsx +++ b/src/views/preview/presentation.jsx @@ -123,6 +123,10 @@ const PreviewPresentation = ({ }) => { const shareDate = ((projectInfo.history && projectInfo.history.shared)) ? projectInfo.history.shared : ''; const revisedDate = ((projectInfo.history && projectInfo.history.modified)) ? projectInfo.history.modified : ''; + const showInstructions = editable || projectInfo.instructions || + (!projectInfo.instructions && !projectInfo.description); + const showNotesAndCredits = editable || projectInfo.description || + (!projectInfo.instructions && !projectInfo.description); // Allow embedding html in banner messages coming from the server const embedCensorMessage = message => ( @@ -348,89 +352,93 @@ const PreviewPresentation = ({ -
-
- -
- {editable ? - - - : -
- {decorateText(projectInfo.instructions, { - usernames: true, - hashtags: true, - scratchLinks: false - })} + {showInstructions && ( +
+
+
- } -
-
-
- -
- {editable ? - - + + : +
+ {decorateText(projectInfo.instructions, { + usernames: true, + hashtags: true, + scratchLinks: false })} - type="textarea" - validationErrors={{ - maxLength: intl.formatMessage({ - id: 'project.descriptionMaxLength' - }) - }} - validations={{ - // TODO: actual 5000 - maxLength: 1000 - }} - value={projectInfo.description} - /> - : -
- {decorateText(projectInfo.description, { - usernames: true, - hashtags: true, - scratchLinks: false - })} +
+ } +
+ )} + {showNotesAndCredits && ( +
+
+
- } -
+ {editable ? + + + : +
+ {decorateText(projectInfo.description, { + usernames: true, + hashtags: true, + scratchLinks: false + })} +
+ } +
+ )} {/* eslint-enable max-len */} From 9625bc554ddbda4f700bb99a629f32516db77c2e Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Thu, 3 Jan 2019 13:12:08 -0500 Subject: [PATCH 5/7] added comments explaining need to show project instructions, notes when both are empty --- src/views/preview/presentation.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/preview/presentation.jsx b/src/views/preview/presentation.jsx index bd2154ee1..37bf0d8bd 100644 --- a/src/views/preview/presentation.jsx +++ b/src/views/preview/presentation.jsx @@ -124,9 +124,9 @@ const PreviewPresentation = ({ const shareDate = ((projectInfo.history && projectInfo.history.shared)) ? projectInfo.history.shared : ''; const revisedDate = ((projectInfo.history && projectInfo.history.modified)) ? projectInfo.history.modified : ''; const showInstructions = editable || projectInfo.instructions || - (!projectInfo.instructions && !projectInfo.description); + (!projectInfo.instructions && !projectInfo.description); // show if both are empty const showNotesAndCredits = editable || projectInfo.description || - (!projectInfo.instructions && !projectInfo.description); + (!projectInfo.instructions && !projectInfo.description); // show if both are empty // Allow embedding html in banner messages coming from the server const embedCensorMessage = message => ( From e9fd0e5539990d35dda2cfe7ce566cc84374b220 Mon Sep 17 00:00:00 2001 From: Paul Kaplan Date: Thu, 3 Jan 2019 14:55:12 -0500 Subject: [PATCH 6/7] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 41a1037ce..c3b05cfc9 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "redux": "3.5.2", "redux-thunk": "2.0.1", "sass-loader": "6.0.6", - "scratch-gui": "0.1.0-prerelease.20190103170205", + "scratch-gui": "0.1.0-prerelease.20190103195353", "scratch-l10n": "latest", "scratchr2_translations": "git://github.com/LLK/scratchr2_translations.git#master", "slick-carousel": "1.6.0", From 0f5b32c467cc6f5a193a1691ed9733ad1df5a22f Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Thu, 3 Jan 2019 16:54:19 -0500 Subject: [PATCH 7/7] Bump scratch-gui Brings in font loading fixes --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c3b05cfc9..b56a293b5 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "redux": "3.5.2", "redux-thunk": "2.0.1", "sass-loader": "6.0.6", - "scratch-gui": "0.1.0-prerelease.20190103195353", + "scratch-gui": "0.1.0-prerelease.20190103214909", "scratch-l10n": "latest", "scratchr2_translations": "git://github.com/LLK/scratchr2_translations.git#master", "slick-carousel": "1.6.0",