zeroheight / library-symbol-replacer

Sketch plugin to replace symbols in an existing documents with library symbols đź’Ž đź“š
MIT License
190 stars 6 forks source link

Linked libraries from other Abstract projects can't be chosen as a library #6

Open emarvegt opened 6 years ago

emarvegt commented 6 years ago

Symbol Libraries within the same Abstract project can be used with this plugin, by finding them manually in ~/Library/Application Support/Abstract/Documents/Edits/XXXXXXXXXX/...

For that to work, you need to have opened the library file at least once, so Abstract has created a local copy.

So that's very cool!

However, though Abstract supports using library files from other Abstract projects, this plugin doesn't allow selecting a such a linked library. Instead, it tells me that the file I selected is not a library.

In Sketch, replacing a local symbol with a symbol from a linked library that actually lives in another project works when done manually without the plugin.

robintindale commented 6 years ago

I don't have Abstract, sorry, so I'm unable to test this.

The "not a library" error means the file you're trying to link with hasn't been added to the Libraries preferences pane. Does it work if you add the file manually to the preference pane, and then retry the plugin?

kibinchi commented 6 years ago

I am also running into the issue of not being able to access the Abstract specific library under Library files. Not sure if this is a plug-in end issue though.

nathangross commented 6 years ago

I'm having similar issues. Here is some additional info. Hopefully it helps!

The "not a library" error means the file you're trying to link with hasn't been added to the Libraries preferences pane. Does it work if you add the file manually to the preference pane, and then retry the plugin?

When you have a Sketch Library file that was generated from Abstract open, it will appear, temporarily, in the Preferences pane as a Library. Once you close that Library, it disappears from the Preferences pane. You can add that same file manually and it will show as an added Library in the Preferences pane until that file is opened then closed, or until Sketch is closed.

It does not seem like there is a way to keep Abstract generated Sketch Library files persistent in the Preferences pane.

robintindale commented 6 years ago

So does the plugin work if the Abstract library you want to use is open in the background?

nathangross commented 6 years ago

Not in my experience, currently.

Oddly though, I have had success with the plugin working with Abstract files—just yesterday. I'm trying to figure out what I was doing different then vs now. So far I have not been able to reproduce the same result.

I did update to 49.1 this morning. Not sure if that has anything to do with it or not.

EricKramp commented 6 years ago

I can confirm that it is still broken in Sketch 50.2.

Libraries connected via Abstract do appear as "normal" libraries in the Sketch preferences, but they do have the branch name in parentheses. That's the only thing that makes them abnormal that I can tell from the UI.

I tried selecting the library both with the target library file open and not, and consistently in both cases it isn't recognized as a library.

I'm using the free plan of Abstract, so you wouldn't need to subscribe to reproduce the problem.

robintindale commented 6 years ago

Yep I've since downloaded Abstract đź‘Ť will look into this when I get some free time

EricKramp commented 6 years ago

That would be great. I randomly got it to work today by using the "Replace Symbols from Previous Library" option, I guess that I didn't think to try that before...?

So, it may be that if it successfully found the file previously it still works, but just can't find new files.