aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.scss4
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx14
-rw-r--r--src/client/views/collections/collectionSchema/SchemaRowBox.tsx2
3 files changed, 11 insertions, 9 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.scss b/src/client/views/collections/collectionSchema/CollectionSchemaView.scss
index 46c2e2d1a..5c0b6d88b 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.scss
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.scss
@@ -135,7 +135,7 @@
}
.schema-row-wrapper {
- max-height: 70px;
+ // max-height: 70px;
overflow: hidden;
}
@@ -144,7 +144,7 @@
display: flex;
flex-direction: row;
height: 100%;
- max-height: 70px;
+ // max-height: 70px;
overflow: auto;
.schema-column-header,
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index 379676f41..bd9303997 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -33,7 +33,7 @@ export enum ColumnType {
Image,
}
-const defaultColumnKeys: string[] = ['title', 'type', 'author', 'text', 'data', 'creationDate'];
+const defaultColumnKeys: string[] = ['title', 'type', 'author', 'creationDate', 'links'];
@observer
export class CollectionSchemaView extends CollectionSubView() {
@@ -43,6 +43,7 @@ export class CollectionSchemaView extends CollectionSubView() {
private _closestDropIndex: number = 0;
private _previewRef: HTMLDivElement | null = null;
+ public static _rowHeight: number = 50;
public static _minColWidth: number = 150;
public static _rowMenuWidth: number = 100;
public static _previewDividerWidth: number = 4;
@@ -419,7 +420,7 @@ export class CollectionSchemaView extends CollectionSubView() {
@action
addNewTextDoc = (value: string, shiftDown?: boolean, forceEmptyNote?: boolean) => {
if (!value && !forceEmptyNote) return false;
- const newDoc = Docs.Create.TextDocument(value, { title: value });
+ const newDoc = Docs.Create.TextDocument(value, { title: value, _autoHeight: true });
FormattedTextBox.SelectOnLoad = newDoc[Id];
FormattedTextBox.SelectOnLoadChar = forceEmptyNote ? '' : ' ';
return this.props.addDocument?.(newDoc) || false;
@@ -534,7 +535,7 @@ export class CollectionSchemaView extends CollectionSubView() {
SelectionManager.SelectSchemaViewDoc(undefined);
this._previewDoc = undefined;
})}>
- <div className="schema-header-row">
+ <div className="schema-header-row" style={{ height: CollectionSchemaView._rowHeight }}>
<div className="row-menu" style={{ width: CollectionSchemaView._rowMenuWidth }}></div>
{this.columnKeys.map((key, index) => {
return (
@@ -561,7 +562,7 @@ export class CollectionSchemaView extends CollectionSubView() {
const dataDoc = !doc.isTemplateDoc && !doc.isTemplateForField && !doc.PARAMS ? undefined : this.props.DataDoc;
let dref: Opt<DocumentView>;
return (
- <div className="schema-row-wrapper">
+ <div className="schema-row-wrapper" style={{ maxHeight: CollectionSchemaView._rowHeight }}>
<DocumentView
{...this.props}
ref={r => (dref = r || undefined)}
@@ -573,7 +574,7 @@ export class CollectionSchemaView extends CollectionSubView() {
ContainingCollectionView={this.props.CollectionView}
ContainingCollectionDoc={this.Document}
PanelWidth={() => this.tableWidth}
- PanelHeight={() => 70}
+ PanelHeight={() => CollectionSchemaView._rowHeight}
styleProvider={DefaultStyleProvider}
focus={this.focusDocument}
docFilters={this.childDocFilters}
@@ -581,12 +582,13 @@ export class CollectionSchemaView extends CollectionSubView() {
docRangeFilters={this.childDocRangeFilters}
searchFilterDocs={this.searchFilterDocs}
rootSelected={this.rootSelected}
- ScreenToLocalTransform={() => this.getDocTransform(doc, dref)}
+ ScreenToLocalTransform={Transform.Identity}
bringToFront={emptyFunction}
isContentActive={this.isChildContentActive}
hideDecorations={true}
hideTitle={true}
hideDocumentButtonBar={true}
+ fitWidth={returnTrue}
/>
</div>
);
diff --git a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
index 0378fa67e..e72ed3c4f 100644
--- a/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
+++ b/src/client/views/collections/collectionSchema/SchemaRowBox.tsx
@@ -102,7 +102,7 @@ export class SchemaRowBox extends ViewBoxBaseComponent<FieldViewProps>() {
return (
<div
className="schema-row"
- style={this.props.isSelected() ? { backgroundColor: Colors.LIGHT_BLUE /*, opacity: this.props.dragging ? 0.5 : 1 */ } : {}}
+ style={this.props.isSelected() ? { height: CollectionSchemaView._rowHeight, backgroundColor: Colors.LIGHT_BLUE /*, opacity: this.props.dragging ? 0.5 : 1 */ } : { height: CollectionSchemaView._rowHeight }}
// onPointerDown={this.onRowPointerDown}
// onPointerEnter={this.onPointerEnter}
onPointerLeave={this.onPointerLeave}