New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Features are de-inited too late on ajax navigation #6437
Comments
Ajax events can be tracked with: ['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',
].map(x => document.addEventListener(x, e => console.log(x, document.querySelector('[data-hovercard-type="pull_request"]') ? '✅PR' : '❌noPR', location.pathname))) Use:
The expectation is that there will be a PR on the page only on Then with the browser buttons:
This works correctly, and it would allow to use |
This was referenced Apr 25, 2023
I might have found a related issue: Easy repro:
|
fregante
added a commit
to refined-github/yolo
that referenced
this issue
May 21, 2023
fregante
added a commit
to refined-github/yolo
that referenced
this issue
May 21, 2023
This was referenced Dec 4, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Context:
file-age-color
also runs on issues and PR tab #6366 (comment)In short, the
turbo:render
event is triggered when the new content is already on the page andobserveSelector
might have already found it.The abort controller should be aborted before the new content is added to the page, without reintroducing the issues that #6267 fixed.
How to fix this issue
Properly detect the change of page, for example by using MutationObserver on
turbo-frame
instead of theturbo:render
event:refined-github/source/feature-manager.tsx
Line 302 in aeb7d63
How to replicate the issue + URL
Hopefully this isn't visible at the moment, but it can be reproed. Paste this into a feature like
quick-new-issue
Then:
Expected log
Current log:
Extension version
23.3.2
Browser(s) used
Chrome
The text was updated successfully, but these errors were encountered: