(core) mark engine setting as experimental

Summary:
This marks the engine setting in document settings as experimental,
with a skull and cross-bones.

It also makes sure the setting is shown if PYTHON_VERSION_ON_CREATION
is set (this relates to a separate change to set the default python
version to 3).

Test Plan: manual

Reviewers: alexmojaki, dsagal

Reviewed By: alexmojaki, dsagal

Subscribers: anaisconce

Differential Revision: https://phab.getgrist.com/D3120
pull/115/head
Paul Fitzpatrick 3 years ago
parent 4ddc29fb40
commit 877542225d

@ -52,7 +52,7 @@ export async function showDocSettingsModal(docInfo: DocInfoRec, docPageModel: Do
{defaultCurrencyLabel: `Local currency (${getCurrency(l)})`})
)),
canChangeEngine ? [
cssDataRow('Engine:'),
cssDataRow('Engine (experimental ☠ change at own risk):'),
select(engineObs, getSupportedEngineChoices()),
] : null,
],

@ -155,7 +155,8 @@ export function getLogMetaFromDocSession(docSession: OptDocSession) {
* Only offer choices of engine on experimental deployments (staging/dev).
*/
export function getSupportedEngineChoices(): EngineCode[]|undefined {
if (process.env.GRIST_EXPERIMENTAL_PLUGINS === '1') {
if (process.env.GRIST_EXPERIMENTAL_PLUGINS === '1' ||
process.env.PYTHON_VERSION_ON_CREATION) {
return ['python2', 'python3'];
}
return undefined;

Loading…
Cancel
Save