Closed danielhollas closed 1 year ago
I just had an idea how to improve this. We should be able to detect inside the javascript, whether we're running in the Appmode or not, which would make this workaround safe. Marking as a draft for now.
@unkcpz @yakutovicha This should be ready. Please take a look and test (I suggested the testing plan in the OP). Let me know if the suggested commit message makes things sufficiently clear.
It turns out the solution is quite simple. I am not very familiar with javascript so need a close look after it goes to appmode. I give it a test and it works fine. I can now change the apps order in the home page without seeing the annoying prompt dialog, and the change of app order also gets saved after refresh.
Thanks @unkcpz.
Note that I've applied the same fix in my app and have been using this for last two weeks and did not notice any issues.
@yakutovicha If you agree I'll merge this so we can give this a try.
This part of a solution for #133 (see more info there). See also the commit message below for full context.
In this PR, I am only affecting the home page. After we verify this works in real world testing, we should probably apply this fix in the Appmode itself, specifically after this line here: https://github.com/oschuett/appmode/blob/3998dc1a6d61f06581fe818351e70860c26c442a/appmode/static/main.js#L136
Essentially, I just added a piece of Javascript that disables the prompt functionality which comes from Jupyter notebook. We only disable the prompt when in the appmode.
Testing plan:
Draft for commit message: