The tour manager is available under the web_tour.tour namespace.
In the first step, we imported web_tour.tour. We can then add a new tour with the register() function. We registered our tour with the library_tour name and passed the URL on which this tour should run.
The next parameter is a list of these tour steps. A tour step requires three values. The trigger is used to select the element on which the tour should be displayed. This is a JavaScript selector. We used the XML ID of the out menu, because it is available in the DOM.
The first step, tour.STEPS.SHOW_APPS_MENU_ITEM , is the predefined step from the tour for the main menu. The next key is the content, and this is displayed when the user hovers over the tour drop. We used the _t() function because we want to translate the string, while the position key is used to decide on the position of the tour drop. Possible values include top, right, left, or bottom.