Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condition actions for #show/#hide not working #249

Open
marklanham opened this issue May 24, 2021 · 3 comments
Open

Condition actions for #show/#hide not working #249

marklanham opened this issue May 24, 2021 · 3 comments

Comments

@marklanham
Copy link

marklanham commented May 24, 2021

Which version of the plugin are you using?
[ ] Data Populator for Sketch v3.6.2

Describe the bug
I'm trying to show/hide a layer in Sketch using Data Populator but it doesn't work. I've tried naming the layer to #show["{user.for_hire}"] as the docs suggest but not having any luck. I've also tried making it a symbol but nothing works. These are the different names I've tried calling the layers:

#show["{user.for_hire}"]
#show["{for_hire}"]
#show["{for_hire}" == true]
#show["{user.for_hire == true}"]
#show["{user.for_hire}" == true]
{#show["{user.for_hire}" == true]}
[#show["{user.for_hire}" == true]]

No matter what, the layer is always showing even if the boolean value is set to false in the data. I tried manually hiding the layer to see if it would then show once set to true but it just remains hidden — nothing I've tried works, have spent hours on this now.

I'm using the test datapopulator-demo.sketch template provided by Data Populator and I'm loading the data from this URL:
https://api.unsplash.com/search/photos?client_id=80d96f3329e4b8a67d17ccec7571fef9b606b6d21f0fcd5f2191f84cc5cbf933&page=1&per_page=100&order_by=popular&query=sunset

Environment:

  • macOS Version: macOS Big Sur v11.2.3
  • Sketch Version: 72.1 (124357)
  • Plugin Version: 3.6.2
@marklanham marklanham changed the title Condition symbols not working Condition layers for #show/#hide not working May 24, 2021
@marklanham marklanham changed the title Condition layers for #show/#hide not working Condition actions for #show/#hide not working May 24, 2021
@eaugustine
Copy link

I've experienced this as well, though specifically it doesn't work in symbol instances. I can get it working if I've named the layer appropriately and directly "Populate Again" on the layer to test it out. But the moment I make the layer into a symbol and attempt to "Populate Again" an instance of the symbol, it doesn't work.

@gustavneustadt
Copy link

gustavneustadt commented Sep 27, 2021

Experiencing the same here. Sketch Version 77 (131065)

Dirty fixed it with Detach from Symbol before populating with data. 🩹

@nitrada
Copy link
Member

nitrada commented Oct 12, 2021

sorry for the hassle, there are issues with conditional actions at the moment – especially with symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants