mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add GRIST_UI_FEATURES env variable
Summary: Tutorials are now hidden by default in grist-core and grist-ee, and can be re-enabled via a new env variable, GRIST_UI_FEATURES, which accepts a comma-separated list of UI features to enable. Test Plan: Browser tests. Reviewers: jarek Reviewed By: jarek Subscribers: jarek Differential Revision: https://phab.getgrist.com/D3885
This commit is contained in:
@@ -16,7 +16,7 @@ import {testId, theme} from 'app/client/ui2018/cssVars';
|
||||
import {icon} from 'app/client/ui2018/icons';
|
||||
import {menu, menuIcon, menuItem, upgradableMenuItem, upgradeText} from 'app/client/ui2018/menus';
|
||||
import {confirmModal} from 'app/client/ui2018/modals';
|
||||
import {commonUrls, shouldHideUiElement} from 'app/common/gristUrls';
|
||||
import {commonUrls, isFeatureEnabled} from 'app/common/gristUrls';
|
||||
import * as roles from 'app/common/roles';
|
||||
import {Workspace} from 'app/common/UserAPI';
|
||||
import {computed, dom, domComputed, DomElementArg, observable, Observable, styled} from 'grainjs';
|
||||
@@ -109,7 +109,7 @@ export function createHomeLeftPane(leftPanelOpen: Observable<boolean>, home: Hom
|
||||
)),
|
||||
cssTools(
|
||||
cssPageEntry(
|
||||
dom.hide(shouldHideUiElement("templates")),
|
||||
dom.show(isFeatureEnabled("templates")),
|
||||
cssPageEntry.cls('-selected', (use) => use(home.currentPage) === "templates"),
|
||||
cssPageLink(cssPageIcon('Board'), cssLinkText(t("Examples & Templates")),
|
||||
urlState().setLinkUrl({homePage: "templates"}),
|
||||
@@ -125,7 +125,7 @@ export function createHomeLeftPane(leftPanelOpen: Observable<boolean>, home: Hom
|
||||
),
|
||||
cssSpacer(),
|
||||
cssPageEntry(
|
||||
dom.hide(shouldHideUiElement("templates")),
|
||||
dom.show(isFeatureEnabled('tutorials')),
|
||||
cssPageLink(cssPageIcon('Bookmark'), cssLinkText(t("Tutorial")),
|
||||
{ href: commonUrls.basicTutorial, target: '_blank' },
|
||||
testId('dm-basic-tutorial'),
|
||||
|
||||
Reference in New Issue
Block a user