Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Add option to show preview bar #1068

Open
presto2116 opened this issue Oct 31, 2019 · 1 comment
Open

Add option to show preview bar #1068

presto2116 opened this issue Oct 31, 2019 · 1 comment

Comments

@presto2116
Copy link

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.

@cgilbe27
Copy link

cgilbe27 commented Jan 6, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants