From c290cbab1d54e8677a62e9b5e3be64f97faa2127 Mon Sep 17 00:00:00 2001 From: christina Date: Mon, 16 Nov 2020 16:19:58 -0500 Subject: [PATCH 1/3] Prevent namespace reset on page reload --- client/lib/helpers/session.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/lib/helpers/session.jsx b/client/lib/helpers/session.jsx index c3cdeac..d7836e1 100644 --- a/client/lib/helpers/session.jsx +++ b/client/lib/helpers/session.jsx @@ -148,7 +148,9 @@ export default { let result = data.context.result; window.localStorage["cs-config"] = JSON.stringify(result); window.localStorage["csos-user"] = JSON.stringify(result.user); - window.localStorage["csos-namespace"] = _.get(result.user, "defaultNamespace", "default"); + if (!window.localStorage["csos-namespace"]) { + window.localStorage["csos-namespace"] = _.get(result.user, "defaultNamespace", "default"); + } h.Vent.emit("main-menu:update"); return callback(true); }, From 3ef9151ce234358bd3a6adb7b164766dfd97dda5 Mon Sep 17 00:00:00 2001 From: christina Date: Mon, 16 Nov 2020 16:20:28 -0500 Subject: [PATCH 2/3] Clean up create drawer styles --- client/css/section-editor.css | 8 ++++---- client/css/tabs.css | 5 +++++ client/lib/layout/create/create-content.jsx | 10 +++++++--- client/lib/layout/create/create-drawer.jsx | 22 ++++++++------------- client/lib/layout/create/wizards.jsx | 8 ++++---- 5 files changed, 28 insertions(+), 25 deletions(-) diff --git a/client/css/section-editor.css b/client/css/section-editor.css index be6c490..d3d93db 100644 --- a/client/css/section-editor.css +++ b/client/css/section-editor.css @@ -12,10 +12,10 @@ div.section-editor { .cs-tabs div.section-editor { position: absolute; - top: 134px; - bottom: 20px; - left: 20px; - right: 20px; + top: 0; + bottom: 0; + left: 0; + right: 0; display: grid; grid-template-columns: 340px 1fr; grid-template-rows: minmax(55px, max-content); diff --git a/client/css/tabs.css b/client/css/tabs.css index 717ff0d..435cdee 100644 --- a/client/css/tabs.css +++ b/client/css/tabs.css @@ -86,3 +86,8 @@ padding: 20px; background: #fff; } + +.create-drawer .cs-tabs .react-tabs__tab-panel--selected { + position: relative; + flex-grow: 1; +} diff --git a/client/lib/layout/create/create-content.jsx b/client/lib/layout/create/create-content.jsx index b1841dc..59b159f 100644 --- a/client/lib/layout/create/create-content.jsx +++ b/client/lib/layout/create/create-content.jsx @@ -41,14 +41,18 @@ class CreateContent extends React.Component { style={{ border: 0, padding: "20px", - height: "100%", - marginBottom: "60px" + flexGrow: "1", + marginBottom: "0", + display: "flex", + flexDirection: "column" }} > this.handleTabClick(tab)} diff --git a/client/lib/layout/create/create-drawer.jsx b/client/lib/layout/create/create-drawer.jsx index 5a922ed..607e5a8 100644 --- a/client/lib/layout/create/create-drawer.jsx +++ b/client/lib/layout/create/create-drawer.jsx @@ -7,16 +7,15 @@ import CreateContent from "./create-content"; const useStyles = makeStyles(() => ({ root: { - display: "flex", - position: "fixed", - bottom: "10px", - right: "20px", - zIndex: 1000 + // position: "fixed", + // bottom: "10px", + // right: "20px", + // zIndex: 1000 }, drawer: { - width: "100%", - height: "100%", - flexShrink: 0, + // width: "100%", + // height: "100%", + // flexShrink: 0, }, drawerPaper: { width: "100%", @@ -28,18 +27,13 @@ const useStyles = makeStyles(() => ({ display: "flex", alignItems: "center", justifyContent: "space-between", - paddingRight: "20px", - paddingBottom: "20px", + padding: "10px 7px 10px 20px", backgroundColor: "#31383d" }, drawerHeaderTitle: { - float: "left", - marginLeft: "19px", display: "flex", - justifyContent: "center", alignItems: "center", fontSize: "40px", - marginBottom: "-10px", color: "#fff" }, drawerHeaderDefault: { diff --git a/client/lib/layout/create/wizards.jsx b/client/lib/layout/create/wizards.jsx index a3e24ba..495aeff 100644 --- a/client/lib/layout/create/wizards.jsx +++ b/client/lib/layout/create/wizards.jsx @@ -7,10 +7,10 @@ import resourceMetadata from "../../../shared/manifests/resource-metadata"; const useStyles = makeStyles(() => ({ root: { position: "absolute", - top: "134px", - bottom: "20px", - left: "20px", - right: "20px" + top: "0", + bottom: "0", + left: "0", + right: "0" }, content: { padding: "40px", From ddf0ac1bb5f1862486f6e5b713c0396290535c3d Mon Sep 17 00:00:00 2001 From: christina Date: Mon, 16 Nov 2020 17:50:51 -0500 Subject: [PATCH 3/3] Remove unneeded styles --- client/lib/layout/create/create-drawer.jsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/client/lib/layout/create/create-drawer.jsx b/client/lib/layout/create/create-drawer.jsx index 607e5a8..73fb2ee 100644 --- a/client/lib/layout/create/create-drawer.jsx +++ b/client/lib/layout/create/create-drawer.jsx @@ -6,17 +6,6 @@ import h from "../../helpers"; import CreateContent from "./create-content"; const useStyles = makeStyles(() => ({ - root: { - // position: "fixed", - // bottom: "10px", - // right: "20px", - // zIndex: 1000 - }, - drawer: { - // width: "100%", - // height: "100%", - // flexShrink: 0, - }, drawerPaper: { width: "100%", height: "100%",