Repository navigation
Closed
Labels
Please! ♥︎Particularly useful features that everyone would love!acceptedbugmetaRelated to Refined GitHub itselfunder discussion
Description
- Visit https://github.com/refined-github/refined-github/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc
- Click "Closed" filter
- Notice features appearing a fraction of a second later
In some cases this is unavoidable, but for these instant features this wasn't the case before. AJAX navigation loads the whole document at once and then immediately calls the "turbo:render" event, which lets us swoop in and make the changes before it's shown to the user.
GitHub recently changed the Ajax library so this might be causing issues. We're already using the earliest event for this so I don't know what we can do, exploration is necessary:
Here's the sequence again:
Generated via
['turbo:before-cache',
'turbo:before-fetch-request',
'turbo:before-fetch-response',
'turbo:before-render',
'turbo:before-stream-render',
'turbo:before-visit',
'turbo:click',
'turbo:frame-load',
'turbo:frame-render',
'turbo:load',
'turbo:reload',
'turbo:render',
'turbo:submit-end',
'turbo:submit-start',
'turbo:visit',
'pjax:start',
'pjax:end',
'pjax:complete',
'pjax:error',].map(x => document.addEventListener(x, e => console.log(x)))Notes
turbo:before-renderappears to be too early and some features won't work.- do we have to use
before-renderand pass around the newbodybefore it appears? https://turbo.hotwired.dev/handbook/drive#pausing-rendering
Related
Reacted by Kid
Metadata
Metadata
Assignees
Labels
Please! ♥︎Particularly useful features that everyone would love!acceptedbugmetaRelated to Refined GitHub itselfunder discussion


Activity
fregante commentedon Sep 20, 2022
Potential solution
turbo:before-renderI thought about using the new selector observer but I think that would not fire when going back.