From ea7577b6fb8660e2ada59ac81ae4f2adaf7b729f Mon Sep 17 00:00:00 2001 From: Vitor Gomes Date: Fri, 29 Jan 2021 17:56:51 -0300 Subject: [PATCH 1/7] Hide query string from the site editor top bar --- CHANGELOG.md | 10 ++++++++- .../EditorContainer/StoreIframe.tsx | 9 +++++++- .../Topbar/ContextSelectors/index.tsx | 2 +- .../EditorContainer/Topbar/UrlInput.tsx | 21 +++++++++++++++++-- 4 files changed, 37 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c34b37f1b..a9d3270ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Changed + +- Hides query strings from site editor top bar. + ## [4.37.0] - 2021-02-09 - Adds support for multi binding for redirect CSV managment @@ -39,11 +43,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Site editor flag in the iframe URL. ## [4.32.0] - 2021-01-21 + ### Added -- Adds binding selector for CMS Pages + +- Adds binding selector for CMS Pages ## [4.31.1] - 2021-01-20 + ### Fixed + - Sending blockId in `Form index` component even when is not changed to prevent unexpected behaviors ## [4.31.0] - 2021-01-13 diff --git a/react/components/EditorContainer/StoreIframe.tsx b/react/components/EditorContainer/StoreIframe.tsx index fed233f5c..2a2049cdd 100644 --- a/react/components/EditorContainer/StoreIframe.tsx +++ b/react/components/EditorContainer/StoreIframe.tsx @@ -32,11 +32,18 @@ const StoreIframe: React.FunctionComponent = ({ path }) => { let src = path ? `/${path}` : '/' + if (window?.location.search && !src.includes(window.location.search)) { + src = src + `${window.location.search}` + } + if (binding && !src.includes('__bindingAddress')) { + console.log('PASSOU') src += `${getJoiner(src)}__bindingAddress=${binding.canonicalBaseAddress}` } - src += `${getJoiner(src)}__siteEditor` + if (!src.includes('__siteEditor')) { + src += `${getJoiner(src)}__siteEditor=true` + } return (