-
Notifications
You must be signed in to change notification settings - Fork 250
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
issue/2760 Added ChildViews API for rendering control (v5.7.0) #2761
Conversation
Co-Authored-By: tomgreenfield <tomgreenfield@users.noreply.github.com>
Co-Authored-By: tomgreenfield <tomgreenfield@users.noreply.github.com>
Co-Authored-By: tomgreenfield <tomgreenfield@users.noreply.github.com>
Co-Authored-By: tomgreenfield <tomgreenfield@users.noreply.github.com>
Co-Authored-By: tomgreenfield <tomgreenfield@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code 👓 one minor thing, otherwise looks good
this PR should probably be changed to merge into master rather than release/v5.6.0 I think? either that or the release/v5.6.0 branch just needs renaming |
@olivermartinfoster conflict needs resolving... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
#2760
Changed
async Adapt.navigateToElement
Made async, resolves when navigation is finishedasync Adapt.scrollTo
Made async, resolves when scroll/navigation is finishedAdaptView.childViews
from an indexed hash into a flat array with deprecated warningsAdapt.remove
now resets_isReady
and_isRendered
AdaptModel.checkReadyStatus
now returns true/false and checks_isRendered
and_isReady
PageView.preRender
now executes newAdaptModel.checkIfResetOnRevisit
on descendants before rendering themasync AdaptView.addChildren
now renders first-child-first rather than parent-first, resolves asynchronously when all possible children have been added, triggers aview:addChild(ChildEvent)
event before rendering a model to see if plugins want to stop the render. It triggers aview:requestChild(ChildEvent)
if model has_canRequestChild: true
when it is at the end of the list of children to see if plugins wish to add any more. IfaddChildren
is called more than once it will now continue rendering from where it was last stopped makingawait Adapt.parentView.addChildren(); await Adapt.parentView.whenReady();
the easiest way to continue adding children and to wait until they are rendered and ready.Adapt.navigateToElement
when routing to a sub contentobject idAdded
ChildEvent
object to control renderingAdaptModel.checkIfResetOnRevisit
as this is a view only function at the momentAdaptModel._canRequestChild
to control ifAdaptView.addChildren
can request more children from pluginsAdaptModel._isRendered
to indicate when a model has been renderedAdaptView.addChildView(AdaptView)
triggersview:childAdded(parentView, childView)
AdaptView.getChildViews()
AdaptView.setChildViews([AdaptView])
async AdaptView.addDescendants()
runsaddChildren
on existing child viewsasync AdaptView.whenReady()
to resolve when all of the views are readyAdaptView._getAddChildEvent(model)
to triggerview:addChild
andview:requestChild
events and returnChildEvent
control object on behalf ofAdaptView.addChildren
await ContentObjectView.renderTo(id)
to have a content object force render to the specified id, resolves when the views are ready