bdkjones / CodeKit-1-Old

146 stars 1 forks source link

Browser refresh to early #442

Open DSafari opened 11 years ago

DSafari commented 11 years ago

Currently making updates to CSS turns the site into this: http://i.imgur.com/byp6q.png

Forcing a reload loads the stylesheet: http://i.imgur.com/mgJ0N.png

Running: Mountain Lion Desktop server serverpress.com/products/desktopserver/ Local wordpress installation with remote sql database Sublime text 2

Any ideas on how to fix?

bdkjones commented 11 years ago

Yea. This is something I'm looking into. Trying to figure out a better solution that simply "delaying" the refresh for a given amount of time.

gisu commented 11 years ago

Please include a Delay with the new Version of Codekit i got the old Problem. Browser refresh without the new modifications, only on the second refresh i see the modifications from the first step.

I Started after the Update Codekit with Shift + Click.

mcmorry commented 11 years ago

Same problem here. Just after update to 1.3.5 (7978) Saving a less file, generate a reload of the css before that compilation is completed.

oskarrough commented 11 years ago

Also having the problem compiling sass+compass. It refreshes my browser up to four times.

josephknight commented 11 years ago

I Second this (more like 6th it). 1.6.1 and this is still an issue. I must save every edit twice to get two compiles and finally see changes on second compile. Simply wait to trigger browser refresh upon completion of all compiles.

josephknight commented 11 years ago

This guy is having same issue and I also find that the bug occurs when editing the variables.less file from bootstrap. http://stackoverflow.com/questions/13016726/codekit-bootstrap-variables-less-does-not-reload-live

To duplicate the bug you could try creating a bootstrap framework from the source download. Copy the variables.less to your own project's less folder for sake of overriding. Do not clear out the file. Create an index.html that uses styles.less which itself does an @import "variables.less"; Change and save the background color variable in your overriding variables.less copy. You may not notice a change unless you either save twice in a row or save once and then go over to browser and manually refresh.

Problem hypothesis: Either this importing setup or problems with the structure of variables.less causes a premature browser refresh before the .css can be fully output.

Once again, waiting until all compiles are complete before doing an auto refresh would almost surely solve.

Thank you for this great tool. Take my money.

bdkjones commented 11 years ago

In theory, CodeKit will only attempt to compile "style.less" (because variables.less is only imported). In the scenario below, do you receive more than one entry in CodeKit's log telling you that the app has compiled multiple files each time you save "variables.less"?

On 2013 Apr 08, at 21:43 , josephknight notifications@github.com wrote:

This guy is having same issue and I also find that the bug occurs when editing the variables.less file from bootstrap. http://stackoverflow.com/questions/13016726/codekit-bootstrap-variables-less-does-not-reload-live

To duplicate the bug you could try creating a bootstrap framework from the source download. Copy the variables.less to your own project's less folder for sake of overriding. Do not clear out the file. Create an index.html that uses styles.less which itself does an @import "variables.less"; Change and save the background color variable in your overriding variables.less copy. You may not notice a change unless you either save twice in a row or save once and then go over to browser and manually refresh.

Problem hypothesis: Either this importing setup or problems with the structure of variables.less causes a premature browser refresh before the .css can be fully output.

Once again, waiting until all compiles are complete before doing an auto refresh would almost surely solve.

Thank you for this great tool. Take my money.

— Reply to this email directly or view it on GitHub.

josephknight commented 11 years ago

Yes. Changing variables.less triggers compile of main style.css.

http://i.imgur.com/jiCH1k7.png

Perhaps the browser is being refreshed at step 1 before step 3 is done? Just clutching...

bdkjones commented 11 years ago

Yep. What you want to do is structure your project so that exactly one less file creates a CSS output file. That is, only style.less should turn into style.css. Variables.less should not create variables.css and gridtest.less should not create gridtest.css.

Every other Less file should simply be imported somewhere in the chain that leads up to style.less. Once you've got the structure set up correctly, this refresh issue will no longer occur. That said, I've solved it in 2.0!

On 2013 Apr 08, at 22:09 , josephknight notifications@github.com wrote:

Yes. Changing variables.less triggers compile of main style.css.

[URL=http://imgur.com/jiCH1k7][IMG]http://i.imgur.com/jiCH1k7.png[/IMG][/URL]

— Reply to this email directly or view it on GitHub.

josephknight commented 11 years ago

But I don't have it setup the way you're saying. They're all imports whose compiles are triggered by others. Even style.less.

http://i.imgur.com/3eQD6th.png

Oops nevermind. I see. They do produce separate css. But I should be allowed to format my css however I want! 2.0 lets me export multiple .css files without refresh glitch?

josephknight commented 11 years ago

I've verified that setting only one .less to compile directly works around the bug.

Problem is that I design with 2 or 3 css files based on the page being loaded (no need to load css for a slider, contact form, and several other plugins if they're certainly not on this page). Therefore it remains a workaround since it forces us to either tolerate the bug or conform to your web design practices.

May I be so bold to say that that's not up to your standard of quality? You make clean, simple software that just works and fulfills the needs of the end-user. I'm not sure if you meant earlier that 2.0 allows us to compile multiple .css files without glitches but I certainly hope so, otherwise this is a significant inconvenience.

Fingers crossed, Joseph Knight

PS. Thanks for being so attentive to support. That's pretty cool.

bdkjones commented 11 years ago

2.0 solves this issue by waiting until all files recompile before refreshing the browser. Making that happen required some low-level changes to the app, which is why I put it off until 2.0. Sorry for the hassle!

On 2013 Apr 08, at 22:31 , josephknight notifications@github.com wrote:

I've verified that setting only one .less to compile directly works around the bug.

Problem is that I design with 2 or 3 css files based on the page being loaded (no need to load css for a slider, contact form, and several other plugins if they're certainly not on this page). Therefore it remains a workaround since it forces us to either tolerate the bug or conform to your web design practices.

May I be so bold to say that that's not up to your standard of quality? You make clean, simple software that just works and fulfills the needs of the end-user. I'm not sure if you meant earlier that 2.0 allows us to compile multiple .css files without glitches but I certainly hope so, otherwise this is a significant inconvenience.

Fingers crossed, Joseph Knight

— Reply to this email directly or view it on GitHub.

josephknight commented 11 years ago

I'll leave you alone now. Just want to leave you with this. Thanks for the great software and thanks for being so participatory with our gripes. You rock.

You may want to mark this other than open so we don't keep bothering you about it :)

1 last thing, I tried to search to no avail but, will 2.0 be free to v1 purchasers?