Skip to main content

hi, I made an overlay that contains a component with two states: Start and Enabled. 

Interacting with the overlay in Start state moves it to Enabled state.

In the Enabled state, component has a Close button.

On the Close button, I added actions

  1. close overlay
  2. set component back back to Start state

When I run the prototype, the second action never gets executed. The component remains in the Enabled state when the overlay is opened again. 

If I switch the order of the actions, the component returns to Start state but the overlay does not close. 

Only the first action is being executed.

For now, I’m trying to find a workaround but this is very annoying and it’s cost enough time that it’s compromising a tight deadline. Figma, please fix.



 

 

For any who are struggling with this…

here’s the workaround

  1. Don’t put the prototype actions in the component
  2. make two component sprites, one for each state with the start state on top
  3. Put the stacked sprites in the modal component that will be used as the overlay
  4. set a variable “overlay start state” with default = true and link the start state sprite’s visibility to it
  5. on interact with the start state sprite, set the “overlay start state” = false, this hides the start state and exposes the enabled state
  6. on interact with the enabled state closer, set the “overlay start state” = true
  7. In the enabled state sprite, the Save button is able to execute both
    1. setting the variable to “overlay start state” back to true
    2. closing the overlay

This made me long for Proto.io. Figma just can’t find actions created in a component reliably.

What this means

  1. I have to break all of my layout components to create reliable actions
  2. now my dev team can’t see all of the information about the component and its states. :( 
  3. As a workaround, I’m maintaining two versions of everything in my file - one with linked components, and one with detached components to use for the prototype

But this makes component feedback changes very difficult to execute, since parts of the prototype then have to be rebuilt and re-linked to actions.


Reply