mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Remove code related to newui
Summary: Change code that conditionally depended on #newui in the URL to assume that everything is always in the new UI now. Test Plan: this Reviewers: dsagal Reviewed By: dsagal Subscribers: dsagal Differential Revision: https://phab.getgrist.com/D3246
This commit is contained in:
@@ -17,7 +17,7 @@ import {BaseAPI} from 'app/common/BaseAPI';
|
||||
import {DisposableWithEvents} from 'app/common/DisposableWithEvents';
|
||||
import {fetchFromHome} from 'app/common/urlUtils';
|
||||
import {ISupportedFeatures} from 'app/common/UserConfig';
|
||||
import {dom, DomElementMethod} from 'grainjs';
|
||||
import {dom} from 'grainjs';
|
||||
import * as ko from 'knockout';
|
||||
|
||||
// tslint:disable:no-console
|
||||
@@ -31,9 +31,6 @@ export class App extends DisposableWithEvents {
|
||||
// Used by #newui code to avoid a dependency on commands.js, and by tests to issue commands.
|
||||
public allCommands = commands.allCommands;
|
||||
|
||||
// Whether new UI should be produced by code that can do either old or new.
|
||||
public readonly useNewUI: true = true;
|
||||
|
||||
public comm = this.autoDispose(Comm.create());
|
||||
public clientScope: ClientScope;
|
||||
public features: ko.Computed<ISupportedFeatures>;
|
||||
@@ -182,14 +179,6 @@ export class App extends DisposableWithEvents {
|
||||
this.topAppModel.reload();
|
||||
}
|
||||
|
||||
// When called as a dom method, adds the "newui" class when ?newui=1 is set. For example
|
||||
// dom('div.some-old-class', this.app.addNewUIClass(), ...)
|
||||
// Then you may override newui styles in CSS by using selectors like:
|
||||
// .some-old-class.newui { ... }
|
||||
public addNewUIClass(): DomElementMethod {
|
||||
return (elem) => { if (this.useNewUI) { elem.classList.add('newui'); } };
|
||||
}
|
||||
|
||||
// Intended to be used by tests to enable specific features.
|
||||
public enableFeature(featureName: keyof ISupportedFeatures, onOff: boolean) {
|
||||
const features = this.features();
|
||||
|
||||
Reference in New Issue
Block a user