You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
highlight-deleted-and-added-files-in-diffs broken on single commits #6678
refined-github.js:8317 Uncaught TypeError: Cannot read properties of undefined (reading 'cloneNode')
at highlightFilename (refined-github.js:8317:27)
at signal.signal (refined-github.js:8343:5)
at refined-github.js:20154:3
Also welcome changes:
rename to new-or-deleted-file
use API instead of relying on the UI
My guess is that the feature was never intended to run on commits, but just PR commits. I'm also open to just disabling the feature on commits.
Using the api would be huge on big prs. Would also be multiple calls sine we done have all the commits on the page. Plus a pr can have more than 100 files if you wanted to load on pr files tab.
Would require an uncashed call sone the files status could have changed by the tile you loaded the files tab again.
I think you're confusing this with some other feature, we don't rely on commits.
Depending on what's available on the v4 API, this might be as easy as "query current PR, get list of files, check if they're new or deleted", in a single query.
If this isn't as easy as I described I agree it's best to not use the API though.
Would require an uncached call
That's what happens with the current view we're triggering anyway. The only advantage is that it now comes preloaded when/if the user actually opens the dropdown… but we still have to wait for it anyway, every time.
Activity
yakov116 commentedon May 21, 2023
Using the api would be huge on big prs. Would also be multiple calls sine we done have all the commits on the page. Plus a pr can have more than 100 files if you wanted to load on pr files tab.
Would require an uncashed call sone the files status could have changed by the tile you loaded the files tab again.
fregante commentedon May 21, 2023
I think you're confusing this with some other feature, we don't rely on commits.Depending on what's available on the v4 API, this might be as easy as "query current PR, get list of files, check if they're new or deleted", in a single query.
If this isn't as easy as I described I agree it's best to not use the API though.
That's what happens with the current view we're triggering anyway. The only advantage is that it now comes preloaded when/if the user actually opens the dropdown… but we still have to wait for it anyway, every time.
yakov116 commentedon May 21, 2023
Sorry I ment to say files not commits.