diff options
-rw-r--r-- | src/client/views/collections/CollectionSchemaView.scss | 82 | ||||
-rw-r--r-- | src/client/views/collections/CollectionSchemaView.tsx | 16 |
2 files changed, 4 insertions, 94 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.scss b/src/client/views/collections/CollectionSchemaView.scss index 2946fc4f7..3c4279eea 100644 --- a/src/client/views/collections/CollectionSchemaView.scss +++ b/src/client/views/collections/CollectionSchemaView.scss @@ -9,27 +9,12 @@ position: absolute; top: 0; width: 100%; - // transition: height .5s; - // transition: margin-top .5s; height: 100%; - // overflow: hidden; - // overflow-x: scroll; - // border: none; - // overflow: scroll; - // overflow-y: scroll; transition: top 0.5s; display: flex; justify-content: space-between; flex-wrap: nowrap; - // .collectionSchemaView-cellContents { - // height: $MAX_ROW_HEIGHT; - - // img { - // width: auto; - // max-height: $MAX_ROW_HEIGHT; - // } - // } .collectionSchemaView-tableContainer { width: 100%; @@ -40,7 +25,6 @@ .collectionSchemaView-previewRegion { position: relative; background: $light-color; - // float: left; height: 100%; .collectionSchemaView-previewDoc { @@ -64,7 +48,6 @@ .collectionSchemaView-dividerDragger { position: relative; - // float: left; height: 100%; width: 20px; z-index: 20; @@ -72,24 +55,17 @@ top: 0; background: gray; cursor: col-resize; - // background: $main-accent; - // box-sizing: border-box; - // border-left: 1px solid $intermediate-color; - // border-right: 1px solid $intermediate-color; } } .ReactTable { width: 100%; - // height: 100%; background: white; box-sizing: border-box; border: none !important; float: none !important; .rt-table { - // overflow-y: auto; - // overflow-x: auto; height: 100%; display: -webkit-inline-box; direction: ltr; @@ -101,14 +77,9 @@ margin-left: 50px; &.-header { - // background: $intermediate-color; - // color: $light-color; font-size: 12px; height: 30px; - // border: 1px solid $intermediate-color; box-shadow: none; - // width: calc(100% - 30px); - // margin-right: -30px; } .rt-resizable-header-content { @@ -125,10 +96,8 @@ } .rt-th { - // max-height: $MAX_ROW_HEIGHT; font-size: 13px; text-align: center; - // background-color: $light-color-secondary; &:last-child { overflow: visible; @@ -146,30 +115,17 @@ flex: 0 1 auto; min-height: 30px; border: 0 !important; - - // &:first-child { - // .rt-td { - // border-top: 1px solid lightgray !important; - // } - // } } .rt-tr { width: 100%; min-height: 30px; - // height: $MAX_ROW_HEIGHT; } .rt-td { - // border: 1px solid $light-color-secondary !important; - // border-width: 0 1px; - // border-width: 1px; - // border-right-color: $intermediate-color; - // max-height: $MAX_ROW_HEIGHT; padding: 0; font-size: 13px; text-align: center; - // white-space: normal; white-space: nowrap; .imageBox-cont { @@ -252,11 +208,6 @@ margin-right: 4px; } } - - // div[class*="css"] { - // width: 100%; - // height: 100%; - // } } } @@ -320,7 +271,6 @@ button.add-column { .keys-dropdown { position: relative; - // max-width: 175px; width: 100%; input { @@ -339,14 +289,15 @@ button.add-column { max-height: 150px; overflow-y: scroll; position: absolute; - top: 20px; + top: 28px; + box-shadow: 0 10px 16px rgba(0,0,0,0.1); .key-option { background-color: $light-color; - border: 1px solid $light-color-secondary; + border: 1px solid lightgray; padding: 2px 3px; - &:not(:last-child) { + &:not(:first-child) { border-top: 0; } @@ -377,14 +328,11 @@ button.add-column { } .collectionSchema-row { - // height: $MAX_ROW_HEIGHT; height: 100%; background-color: white; - // white-space: nowrap; &.row-focused .rt-td { background-color: rgb(255, 246, 246); //$light-color-secondary; - // background-color: $light-color; } &.row-wrapped { @@ -396,21 +344,15 @@ button.add-column { .row-dragger { display: flex; justify-content: space-around; - // height: $MAX_ROW_HEIGHT; flex: 50 0 auto; width: 50px; max-width: 50px; height: 100%; min-height: 30px; - // padding: 5px 5px 5px 0; color: lightgray; background-color: white; transition: color 0.1s ease; - // &:hover { - // color: lightgray; - // } - .row-option { // padding: 5px; cursor: pointer; @@ -426,7 +368,6 @@ button.add-column { } .collectionSchema-row-wrapper { - // max-height: $MAX_ROW_HEIGHT; &.row-above { border-top: 1px solid red; @@ -474,11 +415,8 @@ button.add-column { } &.focused { - // background-color: yellowgreen; - // border: 2px solid yellowgreen; &.inactive { - // border: 2px solid rgba(255, 255, 0, 0.4); border: none; } } @@ -486,7 +424,6 @@ button.add-column { p { width: 100%; height: 100%; - // word-wrap: break-word; } &:hover .collectionSchemaView-cellContents-docExpander { @@ -513,9 +450,7 @@ button.add-column { display: flex; justify-content: flex-end; padding: 0 10px; - border-bottom: 2px solid gray; - // margin-bottom: 10px; .collectionSchemaView-toolbar-item { display: flex; @@ -530,26 +465,17 @@ button.add-column { } .collectionSchemaView-table { - // width: calc(100% - 7px); width: 100%; height: 100%; - // overflow-y: scroll; overflow: visible; } .sub { padding: 10px 30px; - // padding-left: 80px; background-color: rgb(252, 252, 252); width: calc(100% - 50px); margin-left: 50px; - // .rt-table { - // // overflow-x: hidden; // todo; this shouldnt be like this :(( - // // overflow-y: visible; - // // overflow: visible; - // } // TODO fix - .row-dragger { background-color: rgb(252, 252, 252); } diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx index a666a428b..0a77008ec 100644 --- a/src/client/views/collections/CollectionSchemaView.tsx +++ b/src/client/views/collections/CollectionSchemaView.tsx @@ -44,7 +44,6 @@ export enum ColumnType { String, Boolean, Doc, - // Checkbox } // this map should be used for keys that should have a const type of value const columnTypes: Map<string, ColumnType> = new Map([ @@ -75,14 +74,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { super.CreateDropTarget(ele); } - // detectClick = (e: PointerEvent): void => { - // if (this._node && this._node.contains(e.target as Node)) { - // } else { - // this._isOpen = false; - // this.props.setIsEditing(false); - // } - // } - isFocused = (doc: Doc): boolean => { if (!this.props.isSelected()) return false; return doc === this._focusedTable; @@ -119,8 +110,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) { let movedWidth = this.props.ScreenToLocalTransform().transformDirection(nativeWidth.right - e.clientX, 0)[0]; let width = movedWidth < minWidth ? minWidth : movedWidth > maxWidth ? maxWidth : movedWidth; this.props.Document.schemaPreviewWidth = width; - // this.props.Document.schemaPreviewWidth = Math.min(nativeWidth.right - nativeWidth.left - 40, - // this.props.ScreenToLocalTransform().transformDirection(nativeWidth.right - e.clientX, 0)[0]); } @action onDividerUp = (e: PointerEvent): void => { @@ -257,7 +246,6 @@ export interface SchemaTableProps { deleteDocument: (document: Doc) => boolean; moveDocument: (document: Doc, targetCollection: Doc, addDocument: (document: Doc) => boolean) => boolean; ScreenToLocalTransform: () => Transform; - // CreateDropTarget: (ele: HTMLDivElement)=> void; // super createdriotarget active: () => boolean; onDrop: (e: React.DragEvent<Element>, options: DocumentOptions, completed?: (() => void) | undefined) => void; addDocTab: (document: Doc, dataDoc: Doc | undefined, where: string) => void; @@ -269,7 +257,6 @@ export interface SchemaTableProps { @observer export class SchemaTable extends React.Component<SchemaTableProps> { - // private _mainCont?: HTMLDivElement; private DIVIDER_WIDTH = 4; @observable _headerIsEditing: boolean = false; @@ -499,7 +486,6 @@ export class SchemaTable extends React.Component<SchemaTableProps> { @action setCellIsEditing = (isEditing: boolean): void => { - console.log("SET CELL IS EDITING", isEditing); this._cellIsEditing = isEditing; } @@ -739,8 +725,6 @@ export class SchemaTable extends React.Component<SchemaTableProps> { @computed get reactTable() { let children = this.childDocs; - - // let previewWidth = this.previewWidth(); // + 2 * this.borderWidth + this.DIVIDER_WIDTH + 1; let hasCollectionChild = children.reduce((found, doc) => found || doc.type === "collection", false); let expandedRowsList = this._openCollections.map(col => children.findIndex(doc => doc[Id] === col).toString()); let expanded = {}; |