Preview can be viewed and hot reloaded in a new tab

Created on 15 September 2023, over 1 year ago
Updated 31 May 2024, 7 months ago

Problem

At @cosmicdreams talk on SamePage preview (great talk!), there was a question about running the preview in a new browser tab. It sounded like this might not be possible right now with the hot reloading. I think the BroadcastChannel API can potentially be used to achieve viewing the preview in a new tab with hot reloading while editing.

Feature request
Status

Postponed

Version

2.1

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @coby.sher
  • 🇺🇸United States cosmicdreams Minneapolis/St. Paul

    As far as i understand we could:

    • Create (THE SAME) broadcast channel on both the edit and the preview tabs
    • Add to our "preview" logic (the logic invoked when we want to refresh the preview) a single sent through the broadcast channel to refresh to the preview tab

    Some of the examples I've researched show that it is important to ensure your messages have a unique key / id or some kind of attempt is made to ensure that you're sure you sent the single to the correct tab.

    I would prefer an api were I could target the tab I'm sending a message to.

    Still, it would be fun to put a proof of concept together for this.

  • Status changed to Postponed 7 months ago
  • 🇺🇸United States brianperry

    This would be fun to solve, but postponing for now to focus on tightening up existing features.

Production build 0.71.5 2024