qualialabs / reval

Instant Meteor reloads
MIT License
98 stars 15 forks source link

HTML File does not refresh view #11

Closed masterial closed 7 years ago

masterial commented 7 years ago

Happens occasionally. I think it has to do with moving around the templates.

veered commented 7 years ago

Could you give more specific steps to reproduce?

masterial commented 7 years ago

I don't have the steps. I thought it was cutting and pasting the templates but it is not. I see events in terminal but the view does not refresh.

veered commented 7 years ago

Are there any errors in the console (browser or server)?

masterial commented 7 years ago

Might not be related. But editing the html does not work for me, not sure why yet. http://nebulon.s3.amazonaws.com/snnRMJUU.png

veered commented 7 years ago

Hmm, I'd guess it's unrelated. Does the editing work for any HTML templates? Does it work for JS?

masterial commented 7 years ago

It works for CSS. Can update styles fine? Not HTML tho.

masterial commented 7 years ago

Just plain weird. https://s3.amazonaws.com/nebulon/file-1496639233.mov

Using Chrome Version 58.0.3029.110 (64-bit)

masterial commented 7 years ago

Noticed, when you type inside templates it works. Just does not work in the body.

veered commented 7 years ago

Oh, I think the issue is probably just with the <body> tag. I'm not surprised that doesn't work. I'll look into it over the weekend. It should work with all named templates. Are you having issues with any named templates (i.e. not the <body> tag)?

masterial commented 7 years ago

If I typed basic text then you are correct it only works in the templates html and not body. Need to try to o nested templates to see how it goes. On another note, Reval rocks! :P

veered commented 7 years ago

Thanks :)

I have a good idea of what's going on, I'll let you know when I fix it. In the meantime, if you break out your code into sub templates (so it's not in <body>), then you shouldn't have any issues.

masterial commented 7 years ago

Right on! Thanks again.

masterial commented 7 years ago

BTW, are you able to share a sample project that has a couple of views and some buttons? I'm still learning. :P

masterial commented 7 years ago

Also, I can't figure out how to edit multiple html files/js files.

veered commented 7 years ago

I can try to put together a sample project, shouldn't be very hard.

What do you mean that you can't edit multiple files?

masterial commented 7 years ago

Here is an example tree. I want to edit templates in forms.html.

http://nebulon.s3.amazonaws.com/TMw46ajG.png

The file is imported via main.js but I don't know where to edit it. I can only edit main.html, main.css and main.js.

Cheers!

veered commented 7 years ago

I looked into reloading the <body> tag, and the prospects don't look good. It works totally different than other templates. The best solution is just to move the code to a sub-template. I've added a warning with this advice.

If you can't find the template you want to edit by clicking it on the page, I recommend using the "Find a template..." search bar.

I'm going to close this issue now.