Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not reloading on Guide's theme preview #364

Open
suzu2469 opened this issue Jul 26, 2021 · 9 comments
Open

Not reloading on Guide's theme preview #364

suzu2469 opened this issue Jul 26, 2021 · 9 comments

Comments

@suzu2469
Copy link

The preview of my theme is not automatically reflected during theme development in Guide.
Updating my theme files does not automatically upload them and the zat theme preview console log is unresponsive.
I started experiencing this symptom after updating to macOS BigSur.
What should I do?

OS: macOS BigSur 11.4

❯ ruby -v
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-darwin20].
```
@RamChilla
Copy link

I'm having the same problem. The theme preview works on the first load. I go back to my editor, make a change, and go back to the browser and refresh, but no changes reflected.

I have to start and stop the preview after every change I would like to test.

@alexk-lb
Copy link

alexk-lb commented Oct 21, 2021

Having the same problem, looks like it's been this way for several months. For now the only workaround I've found is the one @RamChilla stated above: starting and stopping zat theme preview every time I make a change.

Edit to note: I'm running Windows 10 and ZAT in Ubuntu/WLS, tried Ruby versions 2.4.1 and 2.7.0.

@RamChilla
Copy link

Having the same problem, looks like it's been this way for several months. For now the only workaround I've found is the one @RamChilla stated above: starting and stopping zat theme preview every time I make a change.

Edit to note: I'm running Windows 10 and ZAT in Ubuntu/WLS, tried Ruby versions 2.4.1 and 2.7.0.

yessir, still the same problem. Are you saying that it recently worked on Catalina? Only thing I didn't try was an older MacOS, but unsure how it would affect it using rbenv and bundle. I did try a Ubuntu VM but same results. I've given up trying to get it to work, so I try to get all my definitive markup changes in, start the theme preview, then work on the CSS/JS as those do update on change. Stop the preview, make changes, rinse, repeat as needed. Using a .zat file helps to not input login details every time you start the preview, which was a big help in my workflow.

Sometime, just sometimes, a git commit & push will actually trigger an upload and I get my theme changes, but too far and few between to make it reliable. I've tried a bunch of Ruby versions from 2.3 up using rbenv along with bundle and still no luck.

I'm curious to hear about a proper solution because I actually enjoyed developing on the platform, minus the tooling hurting my feelings though.

@alexk-lb
Copy link

alexk-lb commented Nov 4, 2021

I spent a bit more time looking at this and in my case, the live-reload was failing on tokenized assets (e.g. $assets-customfont-woff) in my stylesheet. Commenting out those assets and/or any place they were used as a value in a CSS property fixed the live-reload feature.

This was not the case until recently. I had used the theme preview tool successfully with tokens in the past.

@glook
Copy link
Contributor

glook commented Jan 26, 2022

I made some changes that can help with this issue #374

@token-cjg
Copy link
Contributor

Hi all, thanks for the issue report for zendesk_apps_tools.

@glook thank you for submitting a candidate fix for this.

#374 has now been merged and released with tag 3.8.7, please advise if this is still an issue while working with zat theme preview.

@PaddyMurphy
Copy link

PaddyMurphy commented Apr 22, 2022

@token-cjg I was having the same issue zat theme preview works until I make a change (I’m using zendesk_apps_tools 3.8.8).

I can confirm the @alexk-lb solution worked for me. I removed all references to $assets in style.css and it works perfectly. Just change to relative links for assets and it works.

running macos 12.3.1 and ruby 2.6.8p205

@evenfrost
Copy link

evenfrost commented Jul 12, 2022

I'm having an issue when using $assets- helpers with fonts completely hangs the local server, and the Zendesk HC page never finishes loading. In the Network tab I see a bunch of pending requests from localhost:4567 that just stay there until I forcefully kill the server and start it again in the new tab.

@font-face {
  font-family: 'Roboto';
  src: local ("Roboto"),
  src: url($assets-roboto-bold-eot);
  src: url($assets-roboto-bold-eot) format('eot'),
  url($assets-roboto-bold-woff) format('woff'),
  url($assets-roboto-bold-ttf) format('truetype'),
  url($assets-roboto-bold-svg) format('svg');
  font-weight: 700;
  font-style: normal;
}

@ramybenaroya
Copy link

ramybenaroya commented Oct 30, 2022

I am with macOS 12.2, ruby 2.6.9
For me, after updating locally the gem listen to its latest version (3.7.1), the issue was resolved.

@token-cjg token-cjg mentioned this issue Oct 30, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants