You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now we are using the same names as native events. This is causing issues with event bubbling and we think it is confusing that we don't differentiate between what a native event is and what our custom events are. Also, there are times we override the native events which isn't good.
We're going to rename all custom events so they begin with ion, so where we have:
What about infiniteScrollStart similar to refresher? We could have menuDidOpen and menuDidClose but we would have to add events for the others. Not a bad idea actually.
We decided to go back to using ion instead of the component name, since this API is easier because the user doesn't have to look up each event name to know which one to use.
Activity
mlynch commentedon May 20, 2016
Can we prepend with the component name instead? (tabChange) vs (ionChange)
[-]Prepend "ion" to every custom event emitted[/-][+]Prepend component name to every custom event emitted[/+]brandyscarney commentedon May 20, 2016
@mlynch Updated the issue to reflect the change to component names instead of
ion.refactor(events): rename all events to begin with the component name
brandyscarney commentedon May 21, 2016
List of event name changes:
change->ionChangechange->ionChangecancel->ionCancelinfinite->ionInfiniteopening->ionDragopened->ionOpenclosed->ionCloseselect->ionSelectchange->ionChangeselect->ionSelectchange->ionChangerefresh->ionRefreshpulling->ionPullstart->ionStartinput->ionInputblur->ionBlurfocus->ionFocuscancel->ionCancelclear->ionClearchange->ionChangeselect->ionSelectchange->ionChangecancel->ionCancelwillChange->ionWillChangedidChange->ionDidChangemove->ionDragselect->ionSelectselect->ionSelectchange->ionChangechange->ionChangeadamdbradley commentedon May 21, 2016
For menus, let's rename them to
menuOpenandmenuClose. I think they hadedat the end so it wasn't stepping on something else to begin with.For
Platformlet's not rename them since they're not on an element and wouldn't bubble up.Can't say
infiniteScrollLoadingis overly awesome, but for consistency reasons it makes sense.Overall looks good to go 👍
adamdbradley commentedon May 21, 2016
Actually, should we have
menuWillOpen,menuDidOpenandmenuWillClose,menuDidClose?refactor(events): rename custom Ionic events
brandyscarney commentedon May 21, 2016
What about
infiniteScrollStartsimilar to refresher? We could havemenuDidOpenandmenuDidClosebut we would have to add events for the others. Not a bad idea actually.[-]Prepend component name to every custom event emitted[/-][+]Prepend ion to every custom event emitted[/+]brandyscarney commentedon May 31, 2016
We decided to go back to using
ioninstead of the component name, since this API is easier because the user doesn't have to look up each event name to know which one to use.refactor(events): rename events to begin with ion
test(events): add some events to the e2e tests
refactor(events): rename all Ionic events to start with `ion`