starshot-prototype icon indicating copy to clipboard operation
starshot-prototype copied to clipboard

Consider Same Page Preview

Open thejimbirch opened this issue 1 year ago • 9 comments

https://www.drupal.org/project/same_page_preview

They also have an issue to add it to core: https://www.drupal.org/project/ideas/issues/3367356

thejimbirch avatar Apr 25 '24 16:04 thejimbirch

I have not been able to get this module to work in my local instance of Starshot. Some weird JavaScript errors and whatnot.

phenaproxima avatar Apr 29 '24 14:04 phenaproxima

Hi there! I'll work on this at Drupalcon.

Very excited to see this in action. We know we have some things to fix for D11

cosmicdreams avatar May 06 '24 18:05 cosmicdreams

Hi there! I'll work on this at Drupalcon.

Me too!

In general, this also seems like a great opportunity to help refocus ongoing work on Same Page Preview...

backlineint avatar May 06 '24 18:05 backlineint

When I got starshot running I notice that it's actually running drupal 10.4 instead of 10.3. which is interseting.

the error appears to be based on our use of the off-canvas dialog. This is the part of the work we knew we would have to fix in D11 but I think that maps to what Drupal 10.4 also is.

Next Steps:

  • We need to create issues for all of the off-canvas dialog issues we need to fix.
  • With the goal being to get it going for Stashot

cosmicdreams avatar May 06 '24 18:05 cosmicdreams

Thanks Frenz!

thejimbirch avatar May 07 '24 00:05 thejimbirch

The team and I are investigating what the major issue here is. I was seeing consistent issues while others saw the initial issue that was encountered clear after a cache clear.

My issue was cleared from correcting the typing of how we're overriding the title of the off-canvas dialog (seen here: https://www.drupal.org/node/3426632#comment-15591039)

While investigating the cache clear issue, we believe that we can resolve any remnant issues in an install hook like this

function same_page_preview_install() {
  Cache::invalidateTags(['rendered']);
}

We are hopeful we won't have to do this an the issue can be resolved upstream.

cosmicdreams avatar May 10 '24 15:05 cosmicdreams

Starshot is happy to patch core and modules as needed - is there a patch/issue somewhere I could use? If it fixes the problems, I would love to give this module a try.

phenaproxima avatar May 10 '24 16:05 phenaproxima

Wow, you're fast. I was planning on updating the module with this small fix. Then when composer brings in the module it'll be updated.

Until then, you could use this patch 3445550-1.patch

cosmicdreams avatar May 10 '24 16:05 cosmicdreams

Patch worked.

And this module is insanely cool. It's a tad tricky to use, but in general I think it is magnificent. I'm going to submit a PR to add it for all content types.

phenaproxima avatar May 10 '24 16:05 phenaproxima