Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
From #1921188-15: Implement Tour UI module.
Keep tips that are not bound to an id or data attribute. Because with something like Tour UI people will add those kind of tips and we need to show them otherwise confusion ensue. That's what happened to me anyway.
Comment | File | Size | Author |
---|---|---|---|
core-js-tour-simplify.patch | 4.77 KB | nod_ | |
Comments
Comment #1
nod_…
Comment #2
nick_schuch CreditAttribution: nick_schuch commentedI really like this patch. I after having others take it for a test I think your right; we should keep the tips in the markup. I have gone through both a manual test and code review.
Comment #3
Wim LeersI have no idea what this means.
We use document in the code, so why remove it?
Why these changes?
Doing this breaks things. It will show tour items for element that don't exist.
Look at e.g. tour.tour.views-ui.yml. The tips are path-based. But not all of the tips are necessarily present (e.g. the "Search" tip on the front page shouldn't show up if the site is configured to not have a Search block).
Of course, I don't like that very much either, ideally the server side would only send tips that *are* relevant to the current page.
Comment #4
nick_schuch CreditAttribution: nick_schuch commentedI believe nod_ is referencing that if we hide the markup of the tips that don't match a selector on the page then "tip creators" will be worried that there tips didn't work. I ran my views ui tour with a few broken selectors and they don't break the tour.
Comment #5
Wim LeersOkay :)
As I said in chat to nod_: I'd *love* to get rid of
_removeIrrelevantTourItems()
. It was necessary in the early Tour days, if it's not anymore: great! :)Comment #6
nick_schuch CreditAttribution: nick_schuch commentedAwesome,
As long as we can still filter down the tips on the page as per this: http://drupal.org/node/1942576
I use a query of ?tour=1&tips=tip-example and it filters down the available tips on the page to the ones with the "tips" corresponding class.
Comment #7
nick_schuch CreditAttribution: nick_schuch commentedHmm. I think we are going to have to keep that portion of code guys. With the use of wildcards in the URL a tour could span over multiple pages and we would only want the tip to appear on the page that it's element is available on.
Comment #8
nod_See #1982008: Modal if no tour tip id or class is provided..