slate icon indicating copy to clipboard operation
slate copied to clipboard

Add option to show preview bar

Open presto2116 opened this issue 5 years ago • 1 comments

This repo is currently on low maintenance. See README for details

Problem

With beta 16 the preview bar was completely removed when on localhost. This seems like a bandaid fix and poor dev experience. I work locally on multiple themes and need to know which theme I am currently in. Also with Shopify's theme caching, you can get kicked out of theme without even knowing. As a workaround for the broken preview bar, I created a component with a close button that was placed above the preview bar and it added the #preview-bar-iframe { height: 60px !important; }` when on localhost. Just outrightly removing the preview bar seems like a cop-out instead of fixing the actual problem in shopify core or coming up with a better solution in slate. I would revert to beta 15, but since boomerang script gets loaded randomly as html that is also not going to work.

Replication steps

Use beta 16 or above and type yarn start

Possible Solution

Add a flag to show or hide preview bar. you can default it to hide or show, but at least have the option to add the &pb=0 to const queryStringComponents = ['_fd=0&pb=0']; either --show-preview-bar or --hide-preview-bar depending on which you would want the default to be.

presto2116 avatar Oct 31 '19 12:10 presto2116

You can always do Shopify.theme to see the current theme details

cgilbe27 avatar Jan 06 '20 03:01 cgilbe27