mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Polish Importer UI
Summary: Changes include: * Hide the colum matching section for new destinations (for now). * Make the preview table read-only. * Don't show helper column IDs when the formula editor is open. * Fix the formula editor autocomplete to show suggestions from the active transform section. * Hide the formula icons in the preview table, and other unnecessary UI elements such as row dropdown menus. * Keep preview loading spinner shown if scheduled (i.e. debounced) diff updates exist. Test Plan: Browser tests. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3148
This commit is contained in:
@@ -30,6 +30,7 @@ const {encodeObject} = require("app/plugin/objtypes");
|
||||
/**
|
||||
* BaseView forms the basis for ViewSection classes.
|
||||
* @param {Object} viewSectionModel - The model for the viewSection represented.
|
||||
* @param {Boolean} options.isPreview - Whether the view is a read-only preview (e.g. Importer view).
|
||||
* @param {Boolean} options.addNewRow - Whether to include an add row in the model.
|
||||
*/
|
||||
function BaseView(gristDoc, viewSectionModel, options) {
|
||||
@@ -168,6 +169,8 @@ function BaseView(gristDoc, viewSectionModel, options) {
|
||||
return linking && linking.disableEditing();
|
||||
}));
|
||||
|
||||
this.isPreview = this.options.isPreview;
|
||||
|
||||
this.enableAddRow = this.autoDispose(ko.computed(() => this.options.addNewRow &&
|
||||
!this.viewSection.disableAddRemoveRows() && !this.disableEditing()));
|
||||
|
||||
@@ -198,7 +201,9 @@ function BaseView(gristDoc, viewSectionModel, options) {
|
||||
|
||||
// A koArray of FieldBuilder objects, one for each view-section field.
|
||||
this.fieldBuilders = this.autoDispose(
|
||||
FieldBuilder.createAllFieldWidgets(this.gristDoc, this.viewSection.viewFields, this.cursor)
|
||||
FieldBuilder.createAllFieldWidgets(this.gristDoc, this.viewSection.viewFields, this.cursor, {
|
||||
isPreview: this.isPreview,
|
||||
})
|
||||
);
|
||||
|
||||
// An observable evaluating to the FieldBuilder for the field where the cursor is.
|
||||
|
||||
Reference in New Issue
Block a user