The detailed view of the properties shows one line for each property of the event. When the value of a property changed since it was last reported, the old and the new value are shown.
The <VtBotDebug> component logs the transition groups that participate in the transition. Beside the name of the transition group, the component shows the CSS selector that matches the elements on the current page and the target page of the navigation. (nowhere) is used as placeholder if the transition name does not appear on both pages.
<VtBotDebug> now logs the ::view-transition CSS pseudo-elements that the browser inserts to control the animations of the view transitions. Here an example with collapsed output:
Scripts of the new page are executed between astro:after-swap and astro:page-load if they had not been on the old page. Module scripts are executed the first time they are found after a full page reload. Later occurrences on other pages will not result in re-execution as module scrips can only be refreshed in the browser by full page loads.
<VtBotDebug/> shows the scripts that will be executed and those that won’t. For inline scripts, it can show the source, for other scrips it shows the source URL.
After the view transition got started, the API provides three promises that can be used to wait for different stages of the transition. The <VtBotDebug> component logs when these promises are resolved or rejected. If rejected, the reason is also shown.
Sometimes it can be quite difficult to keep track of the individual animations of a view transitions. Each definition of a transition:name defines three different animations and there are also three implicit ones for the root element! Now, with the <VtBotDebug> component, there is a way to look at all these animations in order to better understand what is happening here simultaneously.
Animations where the name begins with -ua are browser defined. Those might be static like -ua-view-transition-fade-in or even dynamically generated depending on your page like -ua-view-transition-group-anim-astro-izu6424p-1 in the example above.
The three kinds of animations generated for each transition are:
The group or morph animation (view-transition-group) that matches elements with same transition name on the old and new page and morphs one into the other. This is done be transitioning the old images size and position to the new images size and position.
The old-animation(s) (::view-transition-old) that fade out the old image.
The new-animation(s) (::view-transition-new) that fade in the new image.
The pseudo elements for the old an new image can have multiple animations at once.
Install astro-vtbot in your project as an Astro integration with npx astro add astro-vtbot or as a node package with npm install astro-vtbot.
The <VtBotDebug> component should be inserted as early as possible in the <head> of the page you want to investigate. As it only works for pages with view transitions, it is a good idea to place it just before the <ViewTransitions /> component.