Repository navigation
Add more details to useful-not-found-page - #4646
Conversation
Be more explicit about what happened to the file: - The file you are looking for was deleted/moved by <username> <time ago> - You can find the last version of the file <here: link to file before deletion/move> - The branch you are viewing does not exist Todos: - Handle file renaming
… `useful-not-found-page`
useful-not-found-page](https://github.com/sindresorhus/refined-github/blob/main/source/features/useful-not-found-page.tsx) (#4617)useful-not-found-page (#4617)
fregante
left a comment
There was a problem hiding this comment.
Thank you for the PR! Once settled we should also find a less verbose way to show all of this content. For example just:
- the file was (deleted|renamed) by (commit) (relative-time) - See commit history
Note: It seems the GraphQL (v4) API does not allow us to retrieve a list of files that changed in a commit. See https://github.community/t/graphql-api-get-list-of-files-related-to-commit/14047/2.
|
Thanks a lot, this really helped! Changes madeI have incorporated all of the changes you suggested, along with some of my own refactoring:
Caveats/Problems
Screenshots`wasOnDefaultBranch` case (repo - https://github.com/gamemaker1/test)Also, sorry for combining so many changes into one commit. I should have split them, it would have been easier to review. |
I review the whole code at once, don't worry about splitting the commits. What I'm more concerned about is that 300 lines have been added and we'll have to rethink this to at least halve it. Also no need to list each detailed change, I can already see the code 😃 |
useful-not-found-page (#4617)useful-not-found-page
It's about 250 lines now (after incorporating your suggestions/changes), I'll try making it smaller.
That worked perfectly, I've replaced most of the |
Co-authored-by: Federico Brigante <[email protected]>
…showAlternateLink`
|
Added all the changes requested above (including the nitpicks as well as Thanks! |
|
Types can be improved but let’s get this in for now. |
|
I’m tagging PRs with “extra wishes” with the Please label, just in case we want to circle back to them in the near future 😬 |
|
Thanks @gamemaker1! |
Co-authored-by: Federico <[email protected]> Co-authored-by: Yakov <[email protected]>







What this PR adds
This PR adds a couple of things mentioned in #4617:
All of the above information is added as the API calls resolve.
Related issues
Closes #4617 (if merged).
Example URLs
Screenshots
Renamed file
Moved/deleted file
Non existent branch (and file does not exist)
Non existent branch (but file exists on default branch)
Please do let me know if there are any improvements that can be made to the changes made in this PR.
Thanks!