Repository navigation
Conversation
The global URL object from `init` is being passed and mutated in `linkify` which would mislead the linking logic in the subsequent run of the loop for the `disabledPagination` buttons.
|
heh I tried reverting those 3 changes but I found another bug: Can you rebase this PR or exclude those changes? If too difficult it's best to just open a new PR from |
|
Thanks @yakov116 |
since `url.filePath` is the only component that is being consumed by linkify reference : refined-github#4677 (review)
follow-file-renames to work simultaneouslyfollow-file-renames
fregante
left a comment
There was a problem hiding this comment.
Looks good!
Unrelated to this PR: One thing I'm not seeing is that we should probably skip the feature when we are on folder commit list. Folders can't be renamed and don't appear in commits so I think the feature will never work there.
I agree. However, I could not find a detection that is specific for files ( or folders ). I created refined-github/github-url-detection#89 for it. |
Co-authored-by: yakov116 <[email protected]>
follow-file-renames follow-file-renames
|
@fregante merged since it is blocking another PR |
| route: 'commits', | ||
| filePath: file[toKey], | ||
| // Clear the search from the URL | ||
| // Clear the search from the url, so it does not get passed to the rename link |
|
Tested and it works 🎉 thanks Shiiiine |
When a file is renamed too often and there are not many commits in between, both buttons for
follow-file-renamesis supposed to be active, ideally.However, in the current implementation, the global URL object from
initis being passed and mutated inlinkifywhich would mislead the linking logic in the subsequent runs of the loop for thedisabledPaginationbuttons.This change modifies
linkifyto add a newGitHubURLobject withinlinkifycontext which is used to linkify thedisabledPaginationbuttons. The global URL object is retained since it carries the URL / name of the current file which is required to match the file in comparison.Test URLs
The following URLs point to the life-cycle of a single file called
site.rbin https://github.com/ForkAwesome/Fork-Awesome.The first URL should have only the Older button linkified, the second and third URLs should have both buttons linkified and the last URL should have only the Newer button linkified.