From 494bc3e48db84493faf340e00d5ba7cc57a2f74d Mon Sep 17 00:00:00 2001 From: chrisgarrity Date: Mon, 19 Nov 2018 14:59:56 -0500 Subject: [PATCH 1/2] Rename /preview to /projects --- src/routes.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes.json b/src/routes.json index d9b429b86..0b1c2230d 100644 --- a/src/routes.json +++ b/src/routes.json @@ -198,11 +198,11 @@ "title": "Microworlds" }, { - "name": "preview", - "pattern": "^/preview(/editor|(/\\d+(/editor|/fullscreen)?)?)?/?(\\?.*)?$", - "routeAlias": "/preview/?$", + "name": "projects", + "pattern": "^/projects(/editor|(/\\d+(/editor|/fullscreen)?)?)?/?(\\?.*)?$", + "routeAlias": "/projects/?$", "view": "preview/preview", - "title": "Scratch 3.0 Preview" + "title": "Scratch Project" }, { "name": "3faq", From c4403c5d8d9aaab9ce6ce18e67092b294cc0e97f Mon Sep 17 00:00:00 2001 From: chrisgarrity Date: Mon, 19 Nov 2018 17:02:09 -0500 Subject: [PATCH 2/2] Replace uses of `/preview` in URLs --- src/views/preview/preview.jsx | 6 +++--- src/views/preview/remix-credit.jsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/preview/preview.jsx b/src/views/preview/preview.jsx index 483bfe1c1..83404b509 100644 --- a/src/views/preview/preview.jsx +++ b/src/views/preview/preview.jsx @@ -63,7 +63,7 @@ class Preview extends React.Component { ]); const pathname = window.location.pathname.toLowerCase(); const parts = pathname.split('/').filter(Boolean); - // parts[0]: 'preview' + // parts[0]: 'projects' // parts[1]: either :id or 'editor' // parts[2]: undefined if no :id, otherwise either 'editor' or 'fullscreen' @@ -264,7 +264,7 @@ class Preview extends React.Component { if (!this.props.playerMode) modePath = 'editor/'; // fullscreen overrides editor if (this.props.fullScreen) modePath = 'fullscreen/'; - const newPath = `/preview/${idPath}${modePath}`; + const newPath = `/projects/${idPath}${modePath}`; if (push) { history.pushState( {}, @@ -745,7 +745,7 @@ GUI.setAppElement(document.getElementById('app')); const initGuiState = guiInitialState => { const pathname = window.location.pathname.toLowerCase(); const parts = pathname.split('/').filter(Boolean); - // parts[0]: 'preview' + // parts[0]: 'projects' // parts[1]: either :id or 'editor' // parts[2]: undefined if no :id, otherwise either 'editor' or 'fullscreen' if (parts.indexOf('editor') === -1) { diff --git a/src/views/preview/remix-credit.jsx b/src/views/preview/remix-credit.jsx index 52a7744ef..47ed764c7 100644 --- a/src/views/preview/remix-credit.jsx +++ b/src/views/preview/remix-credit.jsx @@ -24,7 +24,7 @@ const RemixCredit = props => { ), projectLink: ( {projectInfo.title}