Problem/Motivation
Slack discussion:
longwave Nov 23rd at 7:17 PM
@nod_ do we want to try and upgrade shepherd.js to 11.0.0 for D10? (tagging you because you are listed in https://github.com/shipshapecode/shepherd/blob/master/CHANGELOG.md#v1100...)maybe too late though as it's a breaking change, not sure
nod_
I think we can try to go for it. it's used only in tour so impact will be limited
catch
I think if we can just do the library update without a lot of changes, then we should go ahead. If it's hard because they've broken stuff... we'd find out.
(https://drupal.slack.com/archives/C1BMUQ9U6/p1669227448852719)
Steps to reproduce
Proposed resolution
I think if we can just do the library update without a lot of changes, then we should go ahead. If it's hard because they've broken stuff... we'd find out.
Remaining tasks
User interface changes
$ yarn-lock-diff -o old.yarn.lock -n yarn.lock
┌──────────────────────────────┬───────────────────┬───────────────────┐
│ package name │ old version(s) │ new version(s) │
├──────────────────────────────┼───────────────────┼───────────────────┤
│ @popperjs/core │ 2.11.6 │ - │
├──────────────────────────────┼───────────────────┼───────────────────┤
│ smoothscroll-polyfill │ 0.4.4 │ - │
├──────────────────────────────┼───────────────────┼───────────────────┤
│ sheperd.js │ 10.0.1 │ 11.0.0 │
├──────────────────────────────┼───────────────────┼───────────────────┤
│ @floating-ui/core │ - │ 1.0.2 │
├──────────────────────────────┼───────────────────┼───────────────────┤
│ @floating-ui/dom │ - │ 1.0.7 │
└──────────────────────────────┴───────────────────┴───────────────────┘
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3323834-3.patch | 914.24 KB | spokje |
Comments
Comment #2
spokjeComment #3
spokjeComment #4
spokjeComment #5
spokjeComment #6
spokjeComment #7
spokjeHmmm, could it really be this easy?
Comment #8
smustgrave commentedNot sure how to best test but the fact you updated and nothing broke is a good thing right?
Comment #9
nod_needs someone to try some of our tours
Some code needs to be removed/updated on our end.
Comment #10
smustgrave commentedAh just tested the tour for block layout.
The tour opens but at the bottom and page slowly auto scrolls up. So definitely buggy now.
Reverting patch makes the tour work perfectly again.
Comment #11
effulgentsia commentedAlthough the parent issue is already tagged as a stable release blocker, I think we're now getting close enough to 10.0.0's scheduled release date, that it's time for the individual issues to also be tagged with that.
That said, per the issue title, the scope of this issue is to "try to" do this, so if we get to a point where we feel we sufficiently tried without succeeding, at that time we can bump this to Drupal 11. But it would be nice to succeed with this prior to 10.0.0's release if we can.
Comment #12
bnjmnmI did some poking around and my findings have me thankful for the (Try to) qualifier.
The Floating UI equivalent of the PopperJS modifier option is middleware.. This middleware requires args that wrapped are by functions exported by Floating UI. For example, an offset middleware:
Notice how that
offset()is imported from'@floating-ui/dom'? Core doesn't have a runtimenode_modulesto pluck that from, and (as far as I can tell), Shepherd does not expose their Floating UI instance outside of the scope it is used in. It's also not available aswindow.FloatingUIDOM, which is how CDN supplied Floating UI's are provided. I see two options here:I don't see either working well for a 10.0 release, but perhaps there's an option 3?
Comment #13
bnjmnmAlso, if we need to provide true
['drupalSettings']['tourShepherdConfig']backwards compatibility so there's a deprecation window, this will likely require a complex shim. I think there might be valid arguments for limiting how much that shim covers, though.Comment #14
effulgentsia commentedGiven #12, I think we're too close to Drupal 10's release to do this for Drupal 10. We're already in the RC phase (and pretty far along in it), and it sounds like this can cause non-trivial disruption, even if it's contained to Tour and rogue modules depending on
core/internal.shepherddespite "internal" being in the name.Comment #15
catchLet's make this a Drupal 11 blocker, although #12 is not especially encouraging.
Comment #16
effulgentsia commentedFor Drupal 11, alternatives to dealing with the challenge of #12 include:
Comment #17
bnjmnmRe: item 1 from #16: Although removing Shepherd is an alternative to keep in mind, the scope of issue mentioned: #3204011: Replace Tour BackboneJS usage with VanillaJS equivalent is an orthogonal concern. That issue is focused on removing Tour's BackboneJS usage which is relatively easy to do but unfortunately would not bring us closer to addressing the issues faced here. It would change how the Shepherd code is invoked, but Shepherd would continue to operate as it currently does.
Comment #19
anybodyIsn't this outdated now that Tour is a contrib module? #3442286: Deprecate and remove shepherd.js
https://www.drupal.org/node/3442299
Otherwise please reopen!