JohnCoates / CSSketch

Plugin that adds CSS support to Sketch 3 for a faster design workflow.
MIT License
1.89k stars 97 forks source link

Broken by Sketch 3.9 with "Set Page's Stylesheet" selection loop. #47

Open nbiehl opened 7 years ago

nbiehl commented 7 years ago

CSSketch no longer functions with the Sketch 3.9 update. Attempting to assign a stylesheet to a sketch doc results in a selection loop:

  1. Open a sketch doc. In this case the Keyboard.sketch example.
  2. Select "Plugins" > "CSSketch" > "Set Page's Style"
  3. Finder opens > Navigate to and select Keyboard.less stylesheet > Click "Choose"
  4. After clicking the "Choose" button, it becomes disabled.
  5. Reselect Keyboard.less > Click "Choose"
  6. GoTo # 4 and repeat infinitum.
fadlee commented 7 years ago

I had this problem too

bichinl commented 7 years ago

Hi, I have the same problem here. Sketch 3.9.1

rezki-olx commented 7 years ago

+1 same problem. Sketch 3.9.1

@JohnCoates , I would love to help, but don't know where to start. Seems like the plugin fails to get the stylesheet URL. Or am I digging at the wrong place? Really appreciate your help here

fredDesign commented 7 years ago

Ok thats why nothing happens when i try to use this plugin 🎯

aaadryyy commented 7 years ago

Daaaaamn! To good to be true...

Do you think you can do something @JohnCoates ?

@rezki-olx Please do something !

shendrick commented 7 years ago

+1

Davst commented 7 years ago

+1

kamil-borkowski commented 7 years ago

+1 does not work in Sketch 3.9.1

kristianmandrup commented 7 years ago

Let's try to debug to see where the mismatch is... Don't just complain ;)

hendrykj commented 7 years ago

+1 any updates on this?

ghost commented 7 years ago

Having the same issue with Version 4.0.1.

Also console is showing this error, not sure if it is related: image

Appreciate your help in solving this @JohnCoates

eliteproxy7 commented 7 years ago

same here

samueljoos commented 7 years ago

I'm trying to debug this issue. It seems like the context argument of (void)selectStylesheetWithContext:(NSDictionary *)context Is always an empty dictionary. The dictionary should contain a document and a command property to make the connection between the css and the sketch file.

The strange thing is that the context does has value in the CSSSketch.js file but it gets lost when its send to CSKMainController.selectStylesheetWithContext.

I'll try to fix the issue but I'm new with sketch plugin development so any hints or tips might come in handy.