OpenSourceBrain / OSBv2

An updated version of the Open Source Brain platform
https://www.v2.opensourcebrain.org/
Other
12 stars 6 forks source link

839 - Loading a file in NWBE via a click on NWB resource while Jupyterlab open should warn about navigating away from page #907

Closed Aiga115 closed 9 months ago

Aiga115 commented 9 months ago

Issue #839 Problem: Loading a file in NWBE via a click on NWB resource while Jupyterlab open should warn about navigating away from page Solution: Add pop up with window confirm and check whether current resource application type is different than resource type we want to navigate to

https://github.com/OpenSourceBrain/OSBv2/assets/67194168/ce56bb7c-fc3a-47d3-8ba5-4ce527329c4d

filippomc commented 9 months ago

@pgleeson can you please check in the video if this is what you expected?

pgleeson commented 9 months ago

Ok, looks good, but is there a reason it should be a browser level popup, rather than an internal warning/info dialog as already used in other areas (e.g. after creating a new workspace, the dialog that offers to open it)

filippomc commented 9 months ago

@pgleeson yes we need to make it in OSB: the other warning was generated inside jupyterlab and to make it look the same we should do it both in nwb explorer and netpyne with iframe messaging. I don't think it's worth it

pgleeson commented 9 months ago

@Aiga115 I also seem to get this warning when I'm on the workspace homepage (no app loaded yet), and click a resource for an application that's not the last app opened (e.g. I've clicked a netpyne model below, but it had "Open with Jupyterlab" in top corner)

Screenshot 2024-02-21 at 10 42 23