-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Refactor list-prs-for-file
#5312
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also dropped global `path`
kidonng
changed the title
Improvement: use more specific path selector
Refactor Jan 16, 2022
list-prs-for-file
fregante
approved these changes
Jan 17, 2022
fregante
requested changes
Jan 18, 2022
yakov116
reviewed
Jan 18, 2022
kidonng
commented
Jan 20, 2022
getPrsByFile(), | ||
]); | ||
let prs = prsByFile[path]; | ||
let prs = await getPrsForCurrentPath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path
is used in other places of initEditing
so this can not be made into a standalone getPrsForCurrentPath
function.
This is not duplicating a lot of code so I think it's fine to keep it as is.
Reverting last two commits.
fregante
approved these changes
Jan 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
You are suggested to review each individual commit.
"Improvement: use more specific path selector": the
clipboard-copy
selector is too generic"Fix: don't add PJAX buttons on
isEditingFile
": or else you may get duplicate editors:"Improvement: only append Text Fragment on
isEditingFile
and Chrome": only Chrome supports it now, and it doesn't work with PJAX which resets hash. Also solve Link to exact file in PR inlist-prs-for-file
(Chrome only) #4739 (comment)Refactor commits: separate different logic on
isSingleFile
andisEditingFile
"Fix: add back
.BtnGroup-item
class": this is initially broken by Fix every instance ofunicorn/no-array-callback-reference
#4619 then some PRs from me 😅"Improvement: add hovercards": see Enable hovercards for more links #5052
Test URLs
https://github.com/refined-github/refined-github/edit/lint/source/features/index.tsx
Screenshot
For "Fix: add back .BtnGroup-item class":