Skip to content

Commit 89225f1

Browse files
authored
edit readme: change preview "banner" to "overlay" (#735)
1 parent 3416225 commit 89225f1

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ same. There are three major stages, each with distinct steps.
121121
1. **Editing**
122122
1. Make your changes in Storyblok.
123123
2. Preview how your changes will look on the site using Storyblok's preview
124-
iframe. You should see a yellow banner at the top of the page telling you
124+
iframe. You should see a yellow overlay at the top of the page telling you
125125
that you can see draft content.
126126
3. Save your changes.
127127
2. **Publishing**
@@ -285,7 +285,7 @@ Some middleware checks if the HTTP referrer is
285285
<https://app.storyblok.com/>. In that case, the code assumes that the end user
286286
is coming to the site from within the Storyblok iframe. So it puts the user in
287287
Next.js preview mode. When the user is in preview mode, the website shows a
288-
yellow banner at the top of the page, letting the user know that they are seeing
288+
yellow overlay at the top of the page, letting the user know that they are seeing
289289
draft content on the site.
290290

291291
### Vercel
@@ -331,20 +331,20 @@ In this case, the code forces the browser to automatically enter into Next.js
331331
preview mode.
332332

333333
**To help the end user distinguish which view of the site they are seeing, the
334-
codebase defines a visual banner at the top of each page.** When the site is in
335-
preview mode, the banner turns yellow and displays a message telling the user
334+
codebase defines a visual overlay at the top of each page.** When the site is in
335+
preview mode, the overlay turns yellow and displays a message telling the user
336336
that they can see draft content. When the site is not in preview mode, the
337-
banner turns gray and tells the user that they can see published content. The
338-
banner provides a clickable link to switch in and out of Next.js preview mode.
337+
overlay turns gray and tells the user that they can see published content. The
338+
overlay provides a clickable link to switch in and out of Next.js preview mode.
339339
This switch is turned off when the user is viewing the page via the Storyblok UI because when
340340
they are working within Storyblok, they should always see the site in Next.js preview
341341
mode so that they can see changes that are being worked on.
342-
The banner does not show at all if the site was built in a
342+
The overlay does not show at all if the site was built in a
343343
production environment.
344344

345345
The codebase takes advantage of [Vercel environment
346346
variables](https://vercel.com/docs/concepts/projects/environment-variables) at
347-
build time. For example, the preview mode banner links to the git branch that
347+
build time. For example, the preview mode overlay links to the git branch that
348348
the site was built from (when that environment variable is available at build
349349
time).
350350

@@ -354,23 +354,23 @@ Throughout the develop-deploy process, there are several ways to view the
354354
website. The following table summarizes the important ways in which those views
355355
differ from each other.
356356

357-
| Name | How to access | GitHub branch | Vercel env | Storyblok API key | Next.js preview? | Storyblok version param | Display top banner? | Top banner color | Button to enter/exit preview? |
357+
| Name | How to access | GitHub branch | Vercel env | Storyblok API key | Next.js preview? | Storyblok version param | Display top overlay? | Top overlay color | Button to enter/exit preview? |
358358
| -------------------------- | ---------------------- | -------------- | ---------- | ----------------- | ---------------- | ----------------------- | ------------------- | ---------------- | ----------------------------- |
359359
| Production | .com/.org URL | `main` | production | public | off | `published` | No | n/a | n/a |
360-
| Storyblok (yellow banner) | via Storyblok UI | `develop` | preview | preview | on | `draft` | Yes | yellow | No |
361-
| Vercel URL (gray banner) | via link to Vercel URL | any non-`main` | preview | preview | off | `published` | Yes | gray | Yes |
362-
| Vercel URL (yellow banner) | via enter-preview | any non-`main` | preview | preview | on | `draft` | Yes | yellow | Yes |
360+
| Storyblok (yellow overlay) | via Storyblok UI | `develop` | preview | preview | on | `draft` | Yes | yellow | No |
361+
| Vercel URL (gray overlay) | via link to Vercel URL | any non-`main` | preview | preview | off | `published` | Yes | gray | Yes |
362+
| Vercel URL (yellow overlay) | via enter-preview | any non-`main` | preview | preview | on | `draft` | Yes | yellow | Yes |
363363

364-
Let's take the row labeled "Vercel URL (gray banner)." This view is accessed by
364+
Let's take the row labeled "Vercel URL (gray overlay)." This view is accessed by
365365
clicking on a Vercel SHA-style URL, which looks like
366366
`https://labs-{SHA}-quansight.vercel.app`. Typically, this URL is found
367367
either on a GitHub pull request or in `#website-vercel-bot-log` in Slack. The site served by that URL can be
368368
built from any branch or commit on GitHub except `main`, which is reserved for
369369
production. It is built with the "preview" Vercel environment. It does not start
370370
in Next.js preview mode (though the end user can switch to it). The preview
371371
Vercel environment contains the preview Storyblok API key. The site passes
372-
`version=published` to the Storyblok API. It displays a gray banner at the top
373-
of each page, and that gray banner contains a way for the end user to switch to and out of the Next.js preview mode.
372+
`version=published` to the Storyblok API. It displays a gray overlay at the top
373+
of each page, and that gray overlay contains a way for the end user to switch to and out of the Next.js preview mode.
374374

375375
Note that within Storyblok, there is no button to switch out of preview mode.
376376
This was done by design because the whole point of the Storyblok UI is to be
@@ -402,12 +402,12 @@ editors to previewing draft content against the `develop` branch to help catch
402402
any potential code/content conflicts before merging to `main`.
403403

404404
When viewing the site in local development or at a Vercel preview URL, there
405-
should be a banner that explains that you are looking at a preview of the site.
406-
This helps reduce confusion when screenshots are shared. This banner should not
405+
should be a overlay that explains that you are looking at a preview of the site.
406+
This helps reduce confusion when screenshots are shared. This overlay should not
407407
be present on a production build of the site.
408408

409-
The preview/development environment banner should allow the user to toggle
410-
between seeing published versus draft/saved Storyblok content. The banner should
409+
The preview/development environment overlay should allow the user to toggle
410+
between seeing published versus draft/saved Storyblok content. The overlay should
411411
change colors to indicate which of the two content preview modes the user is in
412412
(that is, whether they are seeing draft or published content from Storyblok).
413413

0 commit comments

Comments
 (0)