(core) Remove deprecated code

Summary:
The removed code is no longer reachable now that a new version of the plugin
API is being served by Grist on production.

Test Plan: Existing tests.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D4081
This commit is contained in:
George Gevoian 2023-10-17 23:25:33 -04:00
parent 91eabb6b0c
commit f6256646ef
3 changed files with 3 additions and 10 deletions

View File

@ -260,7 +260,6 @@ export class CustomView extends Disposable {
frame.useEvents( frame.useEvents(
ConfigNotifier.create(frame, this.viewSection, { ConfigNotifier.create(frame, this.viewSection, {
access, access,
theme: this.gristDoc.currentTheme,
}), }),
new MinimumLevel(AccessLevel.none)); // none access is enough new MinimumLevel(AccessLevel.none)); // none access is enough
frame.useEvents( frame.useEvents(

View File

@ -209,11 +209,7 @@ export class WidgetFrame extends DisposableWithEvents {
this.trigger('ready', this); this.trigger('ready', this);
this._readyCalled.set(true); this._readyCalled.set(true);
} }
if ( if (event.data.data?.message === 'themeInitialized') {
event.data.data?.message === 'themeInitialized' ||
// DEPRECATED: remove once the plugin API starts sending the message above.
event.data.data?.settings?.status === 'initialized'
) {
this._visible.set(true); this._visible.set(true);
} }
this._rpc.receiveMessage(event.data); this._rpc.receiveMessage(event.data);
@ -572,7 +568,6 @@ export class RecordNotifier extends BaseEventSource {
export interface ConfigNotifierOptions { export interface ConfigNotifierOptions {
access: AccessLevel; access: AccessLevel;
theme: Computed<Theme>;
} }
/** /**
@ -580,7 +575,6 @@ export interface ConfigNotifierOptions {
*/ */
export class ConfigNotifier extends BaseEventSource { export class ConfigNotifier extends BaseEventSource {
private _accessLevel = this._options.access; private _accessLevel = this._options.access;
private _theme = this._options.theme;
private _currentConfig = Computed.create(this, use => { private _currentConfig = Computed.create(this, use => {
const options = use(this._section.activeCustomOptions); const options = use(this._section.activeCustomOptions);
return options; return options;
@ -612,8 +606,6 @@ export class ConfigNotifier extends BaseEventSource {
options: this._currentConfig.get(), options: this._currentConfig.get(),
settings: { settings: {
accessLevel: this._accessLevel, accessLevel: this._accessLevel,
// DEPRECATED: remove once the plugin API includes the `onThemeChange` handler.
...(fromReady ? {theme: this._theme.get()} : undefined),
}, },
fromReady, fromReady,
}); });

View File

@ -247,6 +247,8 @@ async function getMappingsIfChanged(data: any): Promise<WidgetColumnMap|null> {
* Used by tests to wait for all pending requests to settle. * Used by tests to wait for all pending requests to settle.
* *
* TODO: currently only waits for requests for mappings. * TODO: currently only waits for requests for mappings.
*
* @internal
*/ */
export async function testWaitForPendingRequests() { export async function testWaitForPendingRequests() {
return await _activeRefreshReq; return await _activeRefreshReq;