From 2e4ab06f38323bba06a4d77c04da1507bac5657f Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 24 Aug 2020 18:09:48 -0400 Subject: moved contexts from properties button to properties view section --- .../collectionFreeForm/PropertiesView.scss | 34 ++++++++++++++++++++++ .../collectionFreeForm/PropertiesView.tsx | 18 ++++++++++++ 2 files changed, 52 insertions(+) (limited to 'src/client/views/collections/collectionFreeForm') diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.scss b/src/client/views/collections/collectionFreeForm/PropertiesView.scss index e3ced887d..254afeb0a 100644 --- a/src/client/views/collections/collectionFreeForm/PropertiesView.scss +++ b/src/client/views/collections/collectionFreeForm/PropertiesView.scss @@ -394,6 +394,40 @@ cursor: auto; } } + .propertiesView-contexts { + + .propertiesView-contexts-title { + font-weight: bold; + font-size: 12.5px; + padding: 4px; + display: flex; + color: white; + padding-left: 8px; + background-color: rgb(51, 51, 51); + + &:hover { + cursor: pointer; + } + + .propertiesView-contexts-title-icon { + float: right; + justify-items: right; + align-items: flex-end; + margin-left: auto; + margin-right: 9px; + + &:hover { + cursor: pointer; + } + } + } + + .propertiesView-contexts-content { + overflow: hidden; + padding: 10px; + } + + } .propertiesView-layout { diff --git a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx index c5d396859..f3e3c77f7 100644 --- a/src/client/views/collections/collectionFreeForm/PropertiesView.tsx +++ b/src/client/views/collections/collectionFreeForm/PropertiesView.tsx @@ -25,6 +25,8 @@ import { PropertiesButtons } from "../../PropertiesButtons"; import { FormatShapePane } from "./FormatShapePane"; import "./FormatShapePane.scss"; import "./PropertiesView.scss"; +import { CollectionDockingView } from "../CollectionDockingView"; +import { ParentDocSelector, SelectorContextMenu } from "../ParentDocumentSelector"; const higflyout = require("@hig/flyout"); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -64,6 +66,7 @@ export class PropertiesView extends React.Component { @observable openSharing: boolean = true; @observable openFields: boolean = true; @observable openLayout: boolean = true; + @observable openContexts: boolean = true; @observable openAppearance: boolean = true; @observable openTransform: boolean = true; // @observable selectedUser: string = ""; @@ -251,6 +254,10 @@ export class PropertiesView extends React.Component { ref && observer.observe(ref); } + @computed get contexts() { + return !this.selectedDoc ? (null) : CollectionDockingView.AddRightSplit(doc)} />; + } + previewBackground = () => "lightgrey"; @computed get layoutPreview() { if (this.selectedDoc) { @@ -959,6 +966,17 @@ export class PropertiesView extends React.Component { {novice ? this.noviceFields : this.expandedField} } +
+
this.openContexts = !this.openContexts)} + style={{ backgroundColor: this.openContexts ? "black" : "" }}> + Contexts +
+ +
+
+ {this.openContexts ?
{this.contexts}
: null} +
this.openLayout = !this.openLayout)} -- cgit v1.2.3-70-g09d2