5 ms·
It's probably just me, but I don't get what is cool about rendering in another window. Also, I generally don't like it if an app uses more than one window, so I
by amelius 9y ago
It's probably just me, but I don't get what is cool about rendering in another window. Also, I generally don't like it if an app uses more than one window, so I'm not sure what this is useful for.
- onirom 9y agoCan be useful when you have multiple monitors and don't want to clutter the main window, especially for single page apps or visualization/monitoring things. I have done my own take at this since some times but vanilla only https://github.com/grz0zrg/wui https://github.com/grz0zrg/wui where any of the dialog widget can be detached off the main window keeping the same content & state. A feature i never saw in any web apps but saw often on desktop apps, nice to see that some peoples think of this sort of thing with cleaner approach!
- speps 9y agoManaged to break your demo, open a modal from the right attached panel, make that modal a new window (button next to close button), close that new window, everything is stuck with the black alpha on top. Pressing Esc in that state, makes the main window disappear...
- deleted 9y ago[deleted]
- amelius 9y agoI would prefer opening the same url in a new browser window, rather than the app opening the window for me. This would also allow me to use my window-manager's built-in mechanisms for positioning the window programmatically.
- vanderZwan 9y ago> Can be useful when you have multiple monitors and don't want to clutter the main window, especially for single page apps or visualization/monitoring things. Yep, this is precisely the use-case I would have for this in loom-viewer[0], a SPA data viewer I'm developing for the Loom file format[1] (think large genomic data matrices + metadata). It has a lot of scatter plots and bar charts, and for people with multiple monitors using a separate window as a pop-out would be quite beneficial. It also would make it easier to print out the graphs (which I find silly, but it's a thing researchers do). I've looked at golden-layout before, but it doesn't play nice with redux at the moment[1]. Since I'm already on React 16 this might be what I'm looking for. [0] http://loom.linnarssonlab.org/ http://loom.linnarssonlab.org/ [1] http://loompy.org/ http://loompy.org/ [2] http://golden-layout.com/ http://golden-layout.com/
- acemarke 9y agoHi, I'm a Redux maintainer. Could you clarify what you mean by "doesn't play nice with Redux"?
- vanderZwan 9y agoHi! Well, note that I say that golden-layout does not play nice with Redux, not the other way around. It's not Redux being problematic here, as far as I can tell. There's an open issue on their github repo asking for examples of how to integrate it: https://github.com/deepstreamIO/golden-layout/issues/280 https://github.com/deepstreamIO/golden-layout/issues/280 Maybe things have improved since I've last looked at it, but when I tried a few months ago, it seemed like it would require quite a bit of change in my code to get it up and running By comparison, this new React 16 solution looks like it's a lot simpler to integrate in my existing code.
- deleted 9y ago[deleted]
- mlsarecmg 9y agoPortals can render your branch anywhere, inside the dom or outside in another. The cool thing is that it maintains current state, props and context, even when it's rendered elsewhere. That is insanely useful for common menus, overlaps, popups, annotations, when your container has overflow:hidden and you need to break out, etc. Used to be hacky or hard to realize, now all that's needed is returning a ReactDOM.createPortal(child, dom).
- mattmanser 9y agoIt's useful in enterprise apps. You have three projects/clients/orders/enquiries/purchase orders/invoices/etc. You want to compare them/discuss them/etc. You need to be able to switch between them. It is very common for those kind of apps to get requests that lists/tables open a new window on link click.
- stefantheard 9y agoThe first thing that comes to mind is a gaming app where your main browser is the lobby but the windows are actual game instances. There's a site called global poker that does this for poker instances and it's clean / useful for this kind of use case.