question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to perform consistent sync of Sketch Library File

See original GitHub issue

Hey there,

to be honest, I’m blown away how easily this turns my html into sketch symbols. Big props for that.

Let me explain what I’m struggling with:

  1. I turn a html file into the asketch.json file
  2. I trigger the sketch plugin and select both files
  3. I save that file
  4. I link the saved filed in the preferences as a library
  5. I create a new file and use the symbols from the library
  6. I update the html and perform step 1-3

I’d expect to have this image in my sketch but it does not appear. I’m able to use the updated symbols from the library but already used symbols are not updated.

Do you know this issue or how to fix it?

thanks for the awesome work ❤️

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:5
  • Comments:23 (8 by maintainers)

github_iconTop GitHub Comments

5reactions
macintoshhelpercommented, Nov 27, 2018

Hi, I’ve opened a PR in html-sketchapp to allow customising do_objectID for library sync. I found that symbol and text object IDs have to stay consistent for library updates.

/cc @kdzwinel

3reactions
mathieudutourcommented, May 13, 2019

@mnikkane the reason why Sketch is not showing the “update library” is because the changeIdentifier is always set to 0: https://github.com/brainly/html-sketchapp/blob/master/html2asketch/model/symbolMaster.js#L107. I’d recommend setting a integer generated from the Date instead.

That’s what we do in react-sketchapp:

// Keep track on previous numbers that are generated
let previousNumber = 1;

// Will always produce a unique Number (Int) based on of the current date
function generateIdNumber() {
  let date = Date.now();

  if (date <= previousNumber) {
    previousNumber += 1;
    date = previousNumber;
  } else {
    previousNumber = date;
  }

  return date;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix common library issues - Sketch Help
If your Symbol instances do not reflect the latest changes made to your Library, try using File > Sync Library Components… If the...
Read more >
Problem with Library update - Sketch Talk
Hi, When I updated the document to v71 my document can't update the library. I click on "Library update is available" a then...
Read more >
The designer's guide to Sketch Libraries in Abstract
Increase design consistency across Projects and Teams; Reduce project-size and improve performance — in Sketch and Abstract; Organize and view ...
Read more >
How to keep design library in sync across the team ... - Inchoo
2. Press CMD + comma to open Sketch's Preferences and navigate to the Libraries tab. 3. You'll notice there is iOS UI Design...
Read more >
A Beginners Guide to Sketch Libraries 🔗 | Design + Sketch
You can sync, share and update Symbols across all of your documents, allowing your designs to stay consistent and up-to-date when working on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found