mirror of
https://github.com/enso-org/enso.git
synced 2024-12-27 23:36:59 +03:00
Run IDE with Project Manager endpoint instead of Language Server endpoints, when on local backend (#6810)
This is a fix for a couple of recent regressions: - Fixes #6756: Projects couldn't be renamed anymore from within the project view. - Fixes #6804: One could no longer switch between projects from within the project view. - It also unblocks the issue with the spinner (that got reverted), but that probably needs some extra attention. It might be the long-term goal to have different UX solutions to these cases, but this should fix those regressions in the short term at least. Thanks to @somebody1234 for the in-depth conversation (and the actual code!).
This commit is contained in:
parent
4fdcea3635
commit
ab159238dd
@ -299,6 +299,7 @@ function Dashboard(props: DashboardProps) {
|
||||
|
||||
const switchToDashboardTab = react.useCallback(() => {
|
||||
setTab(Tab.dashboard)
|
||||
doRefresh()
|
||||
const ideElement = document.getElementById(IDE_ELEMENT_ID)
|
||||
if (ideElement) {
|
||||
ideElement.style.top = '-100vh'
|
||||
|
@ -4,6 +4,8 @@ import * as react from 'react'
|
||||
import * as backendModule from '../backend'
|
||||
import * as backendProvider from '../../providers/backend'
|
||||
|
||||
import GLOBAL_CONFIG from '../../../../../../../../gui/config.yaml' assert { type: 'yaml' }
|
||||
|
||||
// =================
|
||||
// === Constants ===
|
||||
// =================
|
||||
@ -67,6 +69,15 @@ function Ide(props: IdeProps) {
|
||||
}
|
||||
})()
|
||||
const runNewProject = async () => {
|
||||
const engineConfig =
|
||||
backend.type === backendModule.BackendType.remote
|
||||
? {
|
||||
rpcUrl: jsonAddress,
|
||||
dataUrl: binaryAddress,
|
||||
}
|
||||
: {
|
||||
projectManagerUrl: GLOBAL_CONFIG.projectManagerEndpoint,
|
||||
}
|
||||
await appRunner.runApp({
|
||||
loader: {
|
||||
assetsUrl: `${assetsRoot}dynamic-assets`,
|
||||
@ -74,8 +85,7 @@ function Ide(props: IdeProps) {
|
||||
jsUrl: `${assetsRoot}pkg${JS_EXTENSION[backend.type]}`,
|
||||
},
|
||||
engine: {
|
||||
rpcUrl: jsonAddress,
|
||||
dataUrl: binaryAddress,
|
||||
...engineConfig,
|
||||
preferredVersion: engineVersion,
|
||||
},
|
||||
startup: {
|
||||
|
Loading…
Reference in New Issue
Block a user