Preview your work and share it
See the preview of your environment, choose who can see it, create and revoke visitor links, and know what a visitor can and cannot do. A stopped environment has no preview, and nobody starts it by looking.
- Availability: Experimental
- Evidence: Recorded run
- How-to guide
Before you start
- A preview runs inside your environment. With the environment stopped there is no preview.
- The installation must serve previews at all. One that does not answers that previews are not supported.
See your preview
Open Preview and choose Open preview. Each environment has its own preview address, on a separate origin from Workspace itself, so the code you preview never runs where your Workspace session lives. Reload preview loads it again.
The panel explains how long you stay in: "Your access to the preview lasts a few minutes and is renewed while this panel is open. If the frame says “Access required”, renew access; if it keeps saying so, your browser blocks cookies inside frames: open the preview in its own tab." Renew access and Open in its own tab are beside it.
An edit shows after a reload
The panel tells you what the development server reports. For a project generated from the project template it reads "Nothing applies updates to the running page:" with the reason, and "New code appears when you reload, which is a reload, not an update." Saving rebuilds the modules; Reload preview shows them, and the state of the page is lost as in any reload.
If a development runtime is present, the panel names it: "Updates are applied to the running page by" followed by its name. If the server does not say, it reads "This Dev Server does not report whether updates are applied. Reloading shows rebuilt code; that is not an update."
Choose who can see it
Under Who can see it:
| Mode | The panel describes it as | Who gets in |
|---|---|---|
| Only me | "signed in as you" | You |
| Project members | "admitted members who can open the project" | Members with Workspace development access who can open the project |
| Anyone with a link | "no account needed; each link can be revoked" | Also anyone who holds a visitor link that was not revoked |
Only you read or change this for your environment. Access is checked again on every request, not only on arrival: narrowing the mode, revoking a link or losing membership ends what was open at once.
Create and revoke a visitor link
- Set Who can see it to Anyone with a link. "Links work only while access is “Anyone with a link”."
- Under Visitor links, fill in Label, for you and choose Create link.
- Copy this link now: "It is shown once. Workspace keeps only a digest and cannot show it again. It gives no access to the editor."
- Send it yourself, by a channel you trust.
To take it back, choose Revoke on the link; it then reads Revoked, and whoever was looking through it is cut off at once. If you lose a link, create another and revoke the old one. With none the list says "No links."
What a visitor can and cannot do
A visitor needs no account. With the link they can load the preview page and the compiled modules it needs, and follow its build updates. They cannot:
- reach the editor, your files, your conversations or anything of Workspace;
- read or write a file through the preview address: only the preview's own content is served there;
- start your environment, or keep it running. A visitor's request is never activity.
When the environment is stopped
The panel says "The preview is unavailable while the environment is stopped": "A preview runs inside your environment. Start the environment from the header to see it; this panel never starts it, and neither does a visitor."
A visitor sees a page that explains the same. Nothing starts an environment except its own person choosing Start or opening the project. See "Preview unavailable".
Limits
- Previewing never publishes or deploys anything. See Preview, integration and publication are different things.
- In a hosted installation a browser that blocks cookies inside frames needs Open in its own tab. No browser has confirmed the hosted behavior. The renewal and the separate tab ran against the fixture and in unit tests, not against the real administration, because the end of a preview session cannot be observed from the page that frames it.