-
Notifications
You must be signed in to change notification settings - Fork 216
Standardizing active state tracking across components #740
Comments
@zurbchris @gakimball |
makes sense to me. |
I know both show/hide and open/close are used in messages, but which is the preferred standard so the animation messages can use those values? |
I made this comment on #670, but should include it here for completeness: Accordions and Tabs do not use the foundation sub/pub system to handle changing active state of elements. In these cases, two-way binding of |
this has been completed in https://github.com/base-apps/angular-base-apps |
The way in which the active state of a component is tracked needs to be standardized across components. The change for PR #670 is great, however, it also allows for the active state to be changed outside of the directive due to the two-way binding. Components could be updated to watch for changes to this two-way bound value, however, the current model for activating/deactivating components is already established with the foundation sub/pub system.
Keeping the foundation sub/pub system as the standard, the components can be updated to send messages when the active state changes:
activated
can be sent when the component is changed from inactive to activedeactivated
can be sent when the component is changed from active to inactiveThe changes made with the
zf-advise
directive where intended to provide the ability to track the active state of the components, but really just track the state of the animation on the component. This has caused some intermittent bugs to pop up in my app due to thinking they were the same. I propose the messages sent via theanimateAndAdvise
method be renamed to specify they are related to animations and not related to the active state of the component. Thezf-advise
directive could be reserved for when a user needs to subscribe to animation events on the component. The following animation states can be tracked:animation-open-started
* andanimation-close-started
*animation-open-ended
* andanimation-close-ended
*animation-open-aborted
* andanimation-close-aborted
** Messages should use show/hide or open/close based on F4A standard
The text was updated successfully, but these errors were encountered: