From 60c1a0e1f68542537e05aba6d5c62f138b94f945 Mon Sep 17 00:00:00 2001 From: Adam Obuchowicz Date: Wed, 10 Jul 2024 22:19:23 +0200 Subject: [PATCH] Record control tweaks (#10509) Fixes #10388 [Screencast from 2024-07-10 13-55-46.webm](https://github.com/enso-org/enso/assets/3919101/4ad7c039-84f6-4e42-aad9-5e287ccd88bb) # Important Notes Also, removed unnecessary setExecutionEnvironment call on startup --- CHANGELOG.md | 3 +++ app/gui2/src/components/GraphEditor.vue | 22 ------------------ app/gui2/src/components/RecordControl.vue | 23 ++++++++----------- app/gui2/src/components/TopBar.vue | 9 +------- .../src/stores/project/executionContext.ts | 13 +++++++++-- app/gui2/src/stores/project/index.ts | 4 ++++ .../Base/0.0.0-dev/src/System/File.enso | 2 +- .../0.0.0-dev/src/Internal/Upload_Table.enso | 8 +++---- .../org/enso/interpreter/EnsoLanguage.java | 2 ++ 9 files changed, 36 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d10224a316b1..448a201d0f2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,12 @@ - ["Add node" button is not obscured by output port][10433] - [Numeric Widget does not accept non-numeric input][10457]. This is to prevent node being completely altered by accidental code put to the widget. +- [Redesigned "record control" panel][10509]. Now it contains more intuitive + "refresh" and "run workflow" buttons. [10433]: https://github.com/enso-org/enso/pull/10443 [10457]: https://github.com/enso-org/enso/pull/10457 +[10509]: https://github.com/enso-org/enso/pull/10509 #### Enso Enso Standard Library diff --git a/app/gui2/src/components/GraphEditor.vue b/app/gui2/src/components/GraphEditor.vue index 0ae72830c276..906cbd629fe4 100644 --- a/app/gui2/src/components/GraphEditor.vue +++ b/app/gui2/src/components/GraphEditor.vue @@ -422,27 +422,6 @@ const { documentation } = useAstDocumentation(graphStore, () => unwrapOr(graphStore.methodAst, undefined), ) -// === Execution Mode === - -/** Handle record-once button presses. */ -function onRecordOnceButtonPress() { - projectStore.lsRpcConnection.initialized.then(async () => { - const modeValue = projectStore.executionMode - if (modeValue == undefined) { - return - } - projectStore.executionContext.recompute('all', 'Live') - }) -} - -// Watch for changes in the execution mode. -watch( - () => projectStore.executionMode, - (modeValue) => { - projectStore.executionContext.executionEnvironment = modeValue === 'live' ? 'Live' : 'Design' - }, -) - // === Component Browser === const componentBrowserVisible = ref(false) @@ -720,7 +699,6 @@ const groupColors = computed(() => { :zoomLevel="100.0 * graphNavigator.targetScale" :componentsSelected="nodeSelection.selected.size" :class="{ extraRightSpace: !showDocumentationEditor }" - @recordOnce="onRecordOnceButtonPress()" @fitToAllClicked="zoomToSelected" @zoomIn="graphNavigator.stepZoom(+1)" @zoomOut="graphNavigator.stepZoom(-1)" diff --git a/app/gui2/src/components/RecordControl.vue b/app/gui2/src/components/RecordControl.vue index d7ca1a6dfc67..f1f391d25beb 100644 --- a/app/gui2/src/components/RecordControl.vue +++ b/app/gui2/src/components/RecordControl.vue @@ -1,29 +1,28 @@