Glavin001 / atom-preview

:construction: (NO LONGER MAINTAINED) :construction: - :eyeglasses: Ultimate previewer of source code in Atom.
https://atom.io/packages/preview
MIT License
51 stars 23 forks source link

Preview breaks in Atom >= 0.137.0 #69

Closed bjmiller closed 9 years ago

bjmiller commented 9 years ago

Everything seems to have broken spectacularly. I have no idea if this is on the atom team, or if it needs to be fixed in the plugin.

bjmiller commented 9 years ago

Possibly of note, from the 0.137.0 release notes:

Atom now runs Chrome 38

Glavin001 commented 9 years ago

Thanks for letting me know! I will look into this ASAP. It may be Sunday night/Monday before I have an opportunity to do so, as I am away this weekend for family wedding. Sorry for any inconvenience.

Glavin001 commented 9 years ago

I have confirmed / reproduced this issue: image

I recommend everyone needing to use Atom-Preview, wait before this issue is closed before upgrading to v0.137.0 and subsequent versions. For those who has already upgraded, I can only suggest that you downgrade manually by downloading from https://github.com/atom/atom/releases/tag/v0.136.0 until further notice.

bjmiller commented 9 years ago

Update: The part of the issue where Preview didn't appear in the list of commands has been resolved by the atom team in 0.138.0 . The larger issue is still present, but that's one less thing to think about.

Glavin001 commented 9 years ago

My flight was delayed, so I've been trying to resolve this while I'm waiting, however I am not having any luck.

There were some drastic changes to the TextEditorView from v0.136.0 to v0.137.0, specifically with their constructor: v0.136.0: https://github.com/atom/atom/blob/v0.136.0/src/text-editor-view.coffee#L55-L104 v0.137.0: https://github.com/atom/atom/blob/v0.137.0/src/text-editor-view.coffee#L48-L71

I will have to do some more research into the new Atom API however it looks like this could be a rather time consuming issue and unfortunately this week I have exams. Hopefully after Friday I will be able to figure this out / or Atom will stop making breaking changes to their API. For now, the only workaround is to use v0.136.0 of Atom.

Glavin001 commented 9 years ago

I have a fix that is tested to work on v0.138.0, and will not be backwards compatible with Atom versions less than v0.137.0.

I will push this patch, please let me know if there are any problems! I was able to hack thru the new Atom API changes and get something working, however I do want to later review that Atom source code and figure out what they are doing....

Update: Also let me know if it does work for you. Thanks!

Glavin001 commented 9 years ago

Published to v0.13.3

rprieto commented 9 years ago

Hi, I tried the latest Atom (0.139.0) and Preview (0.13.3), and the "Preview" command is back in the palette. However I still seem to get some of this behaviour:

screen shot 2014-10-27 at 3 33 04 pm

screen shot 2014-10-27 at 3 41 11 pm

This happens every time I close the Preview tab, and run the command again.

Note: once the preview tab is open, I also can't focus into the main tab anymore - the focus keep jumping back to the preview. But this could be a separate issue.

Glavin001 commented 9 years ago

Thanks @rprieto. I will have to test out later tonight. Just to confirm, it does update with the converted code in the preview tab? However you are unable to type in your editor because it keeps refocusing?

Is anyone else experiencing problems?

blvz commented 9 years ago

I am. Edit: Improved screencast and updated Atom to v0.140.0

preview-issue-69

Glavin001 commented 9 years ago

Thanks for the screencast @blvz. In the future, including a concise, text summary of the issue you are indicating would be additionally helpful. I recognized the issue that selecting a different renderer would error. Is there any other issues?

Glavin001 commented 9 years ago

I am now developing on Atom v0.141.0.

Fix list:

Glavin001 commented 9 years ago

Published fixes to v0.13.4.

Please let me know if this works for you and if there are no more issues caused by Atom's latest API breaking changes. I hope we can call this issue closed soon. Thank you for your feedback and patients.

blvz commented 9 years ago

Sorry, I thought that I was replicating the same bug reported by @rprieto. I'll be more clear next time.

There was also another problem I didn't notice at the time: The overlay with compile errors, wasn't being displayed.

I confirm that all these issues have been resolved in v0.13.4.

Glavin001 commented 9 years ago

No worries, @blvz. Thanks for letting me know there were more unseen issues!

Thanks for confirming that it all is working. I am going to close this issue in the hopes that we did not miss anything. Let me know if anyone notices any more breaking changes. Thanks!