tadeuzagallo / GithubPulse

OS X StatusBar app to help you remember to contribute every day on Github
http://tadeuzagallo.com/GithubPulse
MIT License
542 stars 20 forks source link

[bug] Broken layout #18

Closed rafaell-lycan closed 9 years ago

rafaell-lycan commented 9 years ago

@tadeuzagallo please check this.

I'll try to fix that later, but no sure.

captura de tela 2015-01-14 as 15 48 52

tadeuzagallo commented 9 years ago

Something similar have been reported on #11 but I haven't been able to reproduce yet... It is a canvas element with fixed size, so it should happen. Really, it shouldn't...

Anyway, it's not a fix, but you can right click on the status bar icon, it'll reload the WebView and probably fix for now, so doesn't get stuck that way.

Did it just happen after your commits today went from 0 to 2?

rafaell-lycan commented 9 years ago

@tadeuzagallo the last version 0.2.8 broken in native, but in Chrome it's ok.

What's happening? O.O

tadeuzagallo commented 9 years ago

What kind of broken?

rafaell-lycan commented 9 years ago

The same problem with the Graph.

tadeuzagallo commented 9 years ago

I think this might be happening because the canvas is the root view of the react component, I'll try wrapping it on another div and add a key to it and release on the next version

tadeuzagallo commented 9 years ago

@rafaell-lycan I've tried to fix it altogether with the design improvements on the experimental branch, if you'd please try it out and check if it still crashes for you that'd be much appreciated!

rafaell-lycan commented 9 years ago

@tadeuzagallo the font-family it's like Times? Yeah now it's ok but the font is strange.

tadeuzagallo commented 9 years ago

Damn it, I totally forgot to embed the font! haha I'll fix it right away! On Fri Jan 16 2015 at 3:45:48 PM Rafaell Lycan notifications@github.com wrote:

@tadeuzagallo https://github.com/tadeuzagallo the font-family it's like Times? Yeah now it's ok but the font is strange.

— Reply to this email directly or view it on GitHub https://github.com/tadeuzagallo/GithubPulse/issues/18#issuecomment-70291918 .

rafaell-lycan commented 9 years ago

@tadeuzagallo just wait to release this version. For now I think it's better make this fix in 0.2.9 with others stuffs, and in 0.3.0 maybe some others awesome features =)

tadeuzagallo commented 9 years ago

I just updated it, again on the experimental branch, thanks for helping out! The version is 0.3.0 because of the new layout, in order to be compliant with semver.org

oscarmcm commented 9 years ago

Some texts need to be adjusted @tadeuzagallo image

rafaell-lycan commented 9 years ago

@oscarmcm I'm doing this fix. @tadeuzagallo you or someone take this?

tadeuzagallo commented 9 years ago

That had been fixed after v0.2.8, but the new layout came out and it never got released... I'll move v0.3.0 from experimental to master and it should be ok!

tadeuzagallo commented 9 years ago

I'm closing it for now since v0.3.0 appears to have fixed it and is already available on master. Ping me if you see it again and I'll reopen!

/cc @ljharb

ljharb commented 9 years ago

Thanks, manually updated (when's the Sparkle auto-update system coming?) and I'll let you know if it reoccurs

rafaell-lycan commented 9 years ago

Yeah, I want that too.

ljharb commented 9 years ago

This still happens to me on v0.3.0 - although now it's a little different. screen shot 2015-01-17 at 10 43 25 am

oscarmcm commented 9 years ago

This still happens on v0.3.0 I have the same issue that @ljharb

tadeuzagallo commented 9 years ago

Really, how come that it never happened to me?! I compile and recompile it hundreds of times everyday... I'm reopening and will try again to fix it.

ljharb commented 9 years ago

@tadeuzagallo are you on a non-retina mac? I'm on a Retina mac, and that almost certainly can affect your webview's CSS.

oscarmcm commented 9 years ago

@tadeuzagallo @ljharb yeah! I have a retina mac, maybe this is the problem, when react render the layout in the webview.

tadeuzagallo commented 9 years ago

@jlharb That should be it! Since @rafaell-lycan is also on o rMBP and I'm not... I'm looking into ways of simulating a retina display. Thanks for the great catch!

On Sat Jan 17 2015 at 5:11:50 PM Jordan Harband notifications@github.com wrote:

@tadeuzagallo https://github.com/tadeuzagallo are you on a non-retina mac? I'm on a Retina mac, and that almost certainly can affect your webview's CSS.

— Reply to this email directly or view it on GitHub https://github.com/tadeuzagallo/GithubPulse/issues/18#issuecomment-70379937 .

tadeuzagallo commented 9 years ago

@ljharb was right! Thanks every body for helping out, I'll release it really soon.

TL;DR: The way I was using Chart.js was doubling the size of the canvas on every update

Long explanation: Chart.js checks if it's retina display on the constructor, and if it is, multiplies the size of the canvas per the screen pixel ratio. Every time the commits changes I created a new instance of Chart.js, so it was getting the bigger size, and would just keep increasing. The solution was dead easy though, just check if there was a previous instance and call destroy to restore it to its previous size before creating a new instance.

rafaell-lycan commented 9 years ago

@tadeuzagallo I like to use amCharts, if you want, try it.