GithubHelp home page GithubHelp logo

pausansol / camilo Goto Github PK

View Code? Open in Web Editor NEW
189.0 15.0 18.0 30.62 MB

Sketch plugin specially crafted to work in Design systems with multiple themes

License: MIT License

JavaScript 100.00%
sketch-plugin sketch-plugins sketch-app sketchapp

camilo's People

Contributors

mathieudutour avatar pausansol avatar ra100 avatar tomekmularczyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

camilo's Issues

Question: Any plans to do this for Figma too?

Hey @Pausansol - THANK YOu for making this awesome plugin for Sketch. We are moving our design system to Figma and I was wondering if you had any plans to also have Camilo for Figma?

I've written a few plugins for Sketch (auto-generating color palettes / text styles from JSON-based design tokens), and was considering having a go at it myself in Figma... but wanted to check in case u were already looking at it.

Otherwise I'd be happy to share the outcome if it works, or collab.

Cheers!
Lucas

Make a theme default or primary

Would be nice if the theme selector view could have a star marking for the theme i mostly use...

today i have to scroll to the bottom to select the theme, every time.

Not swapping nested symbol colors.

Hi there,

I believe I found a bug switching between brand libraries and the master library, when one of the symbols in the document contains a nested symbol with a shared style.

EDIT: To clarify, the issue only occurs when the "brand" libraries contain a symbol of the same name that also contains a nested symbol, with an applied style.

Here is the scenario:

I have a "master" library with a set of shared color styles, and 2 symbols. Symbol A is a circle, and Symbol B is a square with Symbol A nested inside of it. Both symbols, A & B are attached to shared styles, Primary and Accent, respectively.

I have 2 "brand" libraries set up that contain alternate shared styles, and both Symbol A and Symbol B. In each brand library Symbol B has a different layer mask on it to change it's shape.

All shared style and art board names in each library are identical.

The bug comes in on brand switch. When swapping from master > brand1 and then from brand1 > brand2, everything works correctly. However, when I swap back from brand1 > master or brand2 > master, colors in the nested symbol hold over from whichever brand library I was on previously.

However, after I notice that the nested color did not swap, if I sync master > master, then all colors are corrected.

My understanding is that the correct behavior should be all color overrides are swapped, regardless if they are top level or nested symbols.

For further clarification, I have attached my example libraries as described : testLibraries.zip

Thanks for checking this out!

Switching libraries does not preserve overrides on parallel text styles

Hey there,
When switching to another library, the plugin correctly switches out the local (or library) text styles for the target library text style, but it "resets" any overrides that may have been applied. For design files that have the occasional one-off override, like centered text for example, they'll be reset resulting in manually having to reapply them.

I think preserving these overrides when switching would be desirable behavior, especially if the overrides were intentional.
Thanks

Add to preserve layer opacity

Whenever we replace a symbol library, it replaced a set of layers from the selected library styles. But it forgets to preserve its opacity, and hence everything becomes filled as 100%. The problem is some of its nested elements having the same colors get merged. The example below has two layers, both of them are having the same color styles but the difference in opacity. So after applying camilo, the icon gets merged with its outer circle due to same color. If we can retain the color opacity it could solve the problem.

image

Camilo Documentation site

Do some documentation regarding using Camilo and how to create a Design System supporting multiple themes

Add Search Functionality

As a user, I'd like to be able to search through my libraries when using the Camilo plugin. In addition to alphabetically ordering the library list, the search functionality would allow me to quickly find the library I want to use in the document. Especially when managing 20+ libraries that all need to be active, this is an important feature.

Add unit testing

It would be nice to add unit tests to ensure quality for Camilo logic

Plugin not working with Sketch 91

Camilo plugin stopped working after updating Sketch to version 91. Plugin runs, but when trying to swap libraries, it does nothing.

Applying a theme when in that theme's library doesn't work

With the workflow I've put together, I want to have my theme variations use a symbol instance of a component from the master library within that themes library file. This would make it easier to edit and see changes quickly. At the moment however, if I use that symbol in my theme library file and I try to change the theme of that library to its own file, nothing happens.

As a work around I have to open a new file, add the symbols, run Camilo to switch to the (dark) theme and then open the (dark) theme library to copy and paste it in.

Is this a bug? I checked the console log and nothing relevant comes up. Perhaps there's some error as it's trying to switch to using the local file.

Add a progress bar

When a user has a large "master" library with an equally massive "UI Kit" with a lot of overrides, Camilo can take up to 20 seconds to swap between brand libraries.

Is there any chance that you'd consider adding some visual feedback that Camilo is working?

Thanks!

Camilo only in selected artboards or symbols.

Hi!

Would be nice to have the possibility to decide between apply the magic in the document or just in selected artboards or symbols. With this feature I can have different artboards with differents themes.

Thanks!

Symbol gets deleted

This is an awesome plugin - great work!

I have found one issue however....

My project organization is as follows :

Brand Libraries -> Component Library -> Master

To switch brands I go to my components library and run the plugin. All the symbols and type styles in my components switch fine except one artboard which gets entirely deleted...

The item is an illustration for which I have a different version in each brand. It sits on it's own artboard in components. When I switch brands the artboard just goes :(

This only happens when I select the 'Apply to Document' radio in the plugin. If I select the illustration and 'Apply to Selection' in swaps fine.

Screenshot 2019-04-01 at 16 19 26

Screenshot 2019-04-01 at 16 24 10

Be great to hear if you have any thoughts on this!

Renamed symbols not swapping in "Apply to Selection" (1.4)

Hi there,

Thank you for the release of "Apply to Selection" in 1.4.

In my first test I believe to have discovered a bug when swapping art boards with multiple instances of the same master symbol, where each symbol instance has a unique name. Only the symbol with the same name as the master symbol is getting replaced.

Steps to reproduce:

  1. Insert a symbol from the "master" library into an art board
  2. Dduplicate the symbol, allowing sketch to rename the symbol "(master symbol name) Copy, .... Copy 2, ...Copy 3. etc."
  3. Select the art board, activate Camilo and select to "Apply to Selection".

EDIT: to clarify, this only happens when there are physical symbols to swap between "master" and "brand" libraries.

Hopefully this is not by design, as this would create an additional step for designers to rename all of their symbol instances to the same master name.

Thank you again for this release!

Include Color variables in the switch

Sketch 69 introduced color variables. This is a great way to have themes in separate libraries.
However, when using Camilo, it doesn't replace the color variables.

Broken in Sketch 95.3

Following error shows up in Sketch Dev Tools

MOJavaScriptException: TypeError: null is not an object (evaluating 'library.sketchObject.document().documentData') main-view.js:42:62 forEach [native code] main-view.js:39:20 script.js:16:30 __skpm_run script.js:1368:19 __skpm_run [native code]

Running Camlio Deletes Symbols

having an issue with Camilo - running it to swap colours and typography either on "this document" or "selection" deletes a lot of necessary symbols whereby I would have to go in manually to replace the colours/text styles. I have tried reuploading Camilo and reverting to an older version but still having these issues.

If someone could help resolve this issue that would be fantastic - I love camilo and the ease of use and it's disappointing for it to corrupt my symbols/document

Not all layers re-link after changing theme

The theming switch works like a charm. Thanks a lot for sharing this plugin.

I'm experimenting a bug re library linking.

Example of my set up:

  1. Core theme library
  2. Product theme library

When I switch from Core to Product theme, visually it works well.

The issue I have is for the styles (colours, fonts) which are the same across both libraries they don't update when switching the theme. Even if I switch back to 'Core theme', Sketch keeps linking to 'Product theme' in all layers with the same property.

Thanks

Camilo not working?

I've noticed that Camilo has stopped working for me as of this AM. Always running on the latest version, it just stopped working. No error messages or anything...

It was fine on Friday, and no updates were applied. Any idea?

Bug when swap on entire document

Hi,

When I swap a selected component with an other file it's work like a charm but when I choose "Apply to document" Sketch no longer responding and I have to force quit Sketch.
(I also tried with only Camilo activated)

Sketch : 72.4
Camilo: 2.1.0
MacOS : Catalina 10.15.7

Crashes in Apple Silicon - M1

When used this plugin Apple Silicon - M1, it crashes the Sketch application.

Is there any work around or stable solution for this plug-in?

Text styles and layer styles don't get replaced

I have the exact same names (in both libraries) for all the symbols and styles. The symbols and nested symbols swap out perfectly however the layer styles and text styles remain unchanged. They still reference their current library.

Sketch 53

Panel width is too narrow

Would love a broader window so my library names are not truncated.
(Or help me where to change it in the script.js :D

Styles are not swapping

Seems that symbols are changing fine between files, but styles are not.

Sketch Version 58 (84663)
macOS Mohave version 10.14.6

Text styles overrides color variable

Hello,

I am testing the new version of Camilo with the color variables, it works really well with the colors and borders for shapes but I have an issue with text styles:

  • I have configured color variables and text styles in 2 libraries
  • In my final document I use a text style on a font AND I put also a color variable on that text style
  • When I swap the library with camilo it doesn't keep the color variable on the text, the text style overrides everything

On my final document, I have my text style and the color variable:
image

When I change library, it doesn't keep the color variable on the text style:
image

I think that it may be a sketch limitation because a base color is always attached to a text style (I think that it doesn't make sense since there is color variables now). I don't know if you can override this behaviour in a plugin and I don't know if this behaviour would be a benefit to everyone, open to debate ;)

And also thanks a lot for that wonderful plugin ! It help us a lot in the past years for our multi-branded apps ;)

Text style and layer Style

Hello, Thank you very much for your job, it's amazing.

I work on sketch 52.4 and text and layer style doesn't change, only symbols.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.