Open victorporof opened 8 years ago
Electron's dialog module I think would work for some interactions, but we can also just spawn new BW's with whatever custom window we want. Any changes should be global and each browser chrome BW should receive changes via UAS
Spawning a new browser window would spawn a new process and we'll end up having a different redux store. I don't think that's desirable.
It's becoming increasingly obvious that we require some kind of component that would present UI in separate windows. For example, the UI for importing profile data https://github.com/mozilla/tofino/issues/1214 or other general popups.
Ideally such a component could just wrap existing components and everything would still work automagically: redux's
connect
, dispatching actions etc., just as if a single store is available for all windows.I don't know if new windows absolutely need to have their own processes. Currently, every single browser window we have has a separate app state etc. because it lives in a separate process. This is not ideal, and will get extremely hairy in the long run where more windows are needed for different purposes or we want to present UI in different windows for some reason.
Someone who writes UI code should not have to think about these issues and the nuances need to be abstracted away. Someone should simply be able to wrap an existing component with a window component and everything still work properly.