Facebook-style Topic Modal - Is it better?

I have been messing about trying to get a different look to other sites and have built a Facebook style topic modal. It seems to load quicker for me and seems to be more fluent on desktop.

What are your thoughts?

Link to test is https://www.carptalk-online.co.uk/ (only works on Desktop)

nicely done! i quite like that even though i’m not a facebook user. you have a cool site. :star_struck:

also, i didn’t realize carp can get so huge! :fishing_pole:

Very cool! have you tested it in topics with 20+ replies? that’s when we load more “pages” of posts on scroll and in my experience is one of the biggest complications with this sort of alternate view

No i’ll do this now and report back

Works fine - URL DELETED

I can see the page load like you say but it works as expected

The topic doesn’t show up in a modal when clicking the direct link. From the topic list, it works tho.

Yeah thats the next thing i need to look into but i have been pondering over this, does it matter? That’s the same as Facebook behaves, the direct link goes to the actual post, if clicked while browsing modal opens.

Nice concept, are you able to maintain a consistent connection with message bus for new messages while loading older messages?

Yes, because the modal loads the normal Discourse topic application inside an iframe rather than rendering a custom copy of the topic. The iframe establishes its own MessageBus connection and Discourse continues handling the post stream normally, including loading older posts and receiving newly published posts.

The parent page also remains active behind it, so technically there are two Discourse instances and two MessageBus connections while the modal is open. That works, although it is slightly heavier than a fully native implementation. Closing the modal removes the iframe and its connection.

I don’t know if it matters, and I don’t use facebook :stuck_out_tongue:

I was just surprised that clicking your link didn’t show the topic in a modal, when you posted it precisely to show it worked in a modal.

My original post was a link to the homepage, did you click my response to Kris testing the topics haha. Hows it going anyway not seen you in a while

Just finished the mobile version and am happy with the way it all works, next is to find a better way of doing this and get the load speed down. Has anyone got any suggestions?

After more testing, i have used the non js version that google sees and it loads instantly in the modal, if i can somehow use the contents of that it would make this rapid

It looks great on the desktop version,

but the loading speed on mobile is a bit slow. After tapping, you only see an empty page with a close button in the top right corner, seemingly requiring you to wait a long time in front of a blank screen.

This is what i’m working on now :slight_smile: At the minute its just a concept I want to make reality. However on my device it does load in 2 seconds on mobile with the discourse spinner loading icon so not sure whats happening. Probably because the server is in london UK with no CDN as of yet

That is indeed too far away, so the network takes time to transmit data.

I have now got the topics loading instantly in the modal, now to find a way to use the first discourse loaded instance for the replies etc. (this is on the test server)