-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
371 improve initialization #427
Conversation
Deploying opendataeditor with Cloudflare Pages
|
Scenario 1The user opens the ODE FOR THE FIRST TIME: Screen 1: The tool will display a light blue background with the name of the tool while installing components. This screen will include a message: "Loading...The first time may take a few minutes" (message to be reviewed by @Faithkenny) If the process is successful... Screen 2: The ODE will show a message box with a summary of what the tool can do (explore data, detect errors and publish data). Then the user will access the main screen of the ODE If the ODE can not run successfully.. After screen 1, the tool will show this message: "Something went wrong. Please, try again or report this problem here" Scenario 2Let's say the app ran successfully the first time... The tool will display a light blue background with the name of the tool and this message: Loading...(message to be reviewed by @Faithkenny) Then the user will access the main screen of the ODE |
Resolves #371 (partialy)
Main Changes
PORT
andserverUrl
feature.ensure*
methods to more verbose and explicit names.Note: I didn't put much effort in the UI/UX of the splash screen since I'm expecting changes anyway.
Notes
Our current initialization process is a little bit messy. Basically we load everything in the background, initialize the application with a loading dialog, and then disable it once a background server is detected.
The main problems with this approach are the following:
Suggestion
In order to have a better workflow, control and messaging of the initialization steps I'm proposing a splash window that will be displayed while the application ensure all requirements are met and the server is up. This is inspired on datasette-app loading.html approach and several other resources I read online (like this one.)
Our current initialization workflow will be:
ensurePython
.ensureRequirements
, etc)finished
event to load themainWindow
Even when this PR does not address directly the issues in #371 it sets the ground to address them properly. Our former workflow was full of race conditions and parallel executions that made difficult to properly catch exceptions and displaying messages before the main window display takes place.
Demo
simplescreenrecorder-2024-06-14_15.29.13.webm