(core) Allow configuring (mostly hiding) various little bits of UI

Summary:
Adds two new env vars GRIST_HIDE_UI_ELEMENTS and GRIST_PAGE_TITLE_SUFFIX which translate to values in GristLoadConfig that the server sends the client when loading.

For checkin task https://gristlabs.getgrist.com/doc/check-ins/p/5#a1.s9.r1882.c19

Test Plan: Tested manually

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3449
This commit is contained in:
Alex Hall
2022-05-27 13:03:56 +02:00
parent 74ec9358da
commit 6b372fa6cd
14 changed files with 64 additions and 14 deletions

View File

@@ -17,7 +17,7 @@ import {beaconOpenMessage} from 'app/client/lib/helpScout';
import {AppModel} from 'app/client/models/AppModel';
import {colors, testId, vars} from 'app/client/ui2018/cssVars';
import {icon} from 'app/client/ui2018/icons';
import {commonUrls} from 'app/common/gristUrls';
import {commonUrls, shouldHideUiElement} from 'app/common/gristUrls';
import {dom, DomContents, Observable, styled} from 'grainjs';
/**
@@ -25,6 +25,9 @@ import {dom, DomContents, Observable, styled} from 'grainjs';
* HelpCenter in a new tab.
*/
export function createHelpTools(appModel: AppModel, spacer = true): DomContents {
if (shouldHideUiElement("helpCenter")) {
return [];
}
return [
spacer ? cssSpacer() : null,
cssSplitPageEntry(