I'm not looking for a full implementation, I'm more interested in how they do it. I know they use GWT, but I'd like a more low level answer. Naively, I would start by thinking when you click the popout link they simply open a new window and copy content into it. There are lots of reasons why that won't work out well, so I'm wondering if anyone knows or has ideas on how they do this or how it could be done.
If you're already on a conversation and want to pop up a different one, just look to the left of your screen – the 'Chat' section. Hover your cursor over the chat you want to pop up. You will see a southeast pointing arrow at the bottom-right corner of the chat tile. This is the 'Open in a pop-up' button.
To enable the feature on iOS or Android, open the side menu and scroll down to Settings. If you have multiple accounts, select the one you want, then look for “Chat (early access)” under General. Flipping the toggle will turn it on (after you restart the app).
Quick launch summaryYou can now configure the Chat Progressive Web Application (PWA) to "Start app when you sign in" to your computer. This can be done on your Windows, MAC OS or Linux computer by going to chrome://apps, right clicking on Google Chat and then choosing "Start app when you sign in."
I would say the easiest way would be to have the data stored on the server (which you probably do already), then just have the new window retrieve that data.
Of course that wouldn't persist things like contents of a text-box the user has input, so depending on what the window is for, it may be impractical.. but it's always best to start trying the simplest option!
I recently needed to solve exactly this problem in an app. I ended up using this great little jQuery plugin to do the trick: WindowMsg (see link at bottom) While I'm sure there are other ways to accomplish the same task, that plugin does works thusly:
In my experience working with the library, it would have also been quite nice if they had included the JSON 2 lib from JSON.org. Out of the box, WindowMsg only allows you to send string messages between windows, but with some pretty simple use of the JSON 2 lib, I was able to hack it to allow the sending of full JSON objects between windows. I bet more mature libraries (such as whatever google uses) include that kind of serialization and de-serialization baked in.
I am putting this link here because for some reason, the Stack Overflow formatter turns it into an anchor link with no closing tag and I don't want my whole post to be one giant hyperlink!
WindowMsg: http://www.sfpeter.com/2008/03/13/communication-between-browser-windows-with-jquery-my-new-plugin/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With