clean-conversation-headers - Fix base branch detection - #9957
clean-conversation-headers - Fix base branch detection #9957Sebastien-Ahkrin wants to merge 2 commits into
clean-conversation-headers - Fix base branch detection #9957Conversation
clean-conversation-headers): wait for both branch tags
|
Thank you! The selector should eventually just select the head branch, not use :has() due to performance concerns. Inside cleanPrHeader you can then use |
19cf792 to
6a088b0
Compare
|
Please avoid force-pushing to this PR. It makes it harder for reviewers to track what changed since the last review. Just push new commits on top of the branch instead — PRs are squashed on merge, so the commit history doesn't need to be clean. |
|
Do I have to do something before merging @fregante ? |
clean-conversation-headers): wait for both branch tagsclean-conversation-headers - Fix base branch detection
6a088b0 to
2145773
Compare
|
@fregante Sorry, I clicked the wrong button in my Github Interface and it rebased my branch on top of main with a force-push .. Let me know if something looks off ! |

Closes: #9952
This PR is here to solve the issues, that sometime the wrong ref is highlighted (posted by @fregante)
This bug happened when
Edit titlewas clicked before RGH has finished loading.I tested it on Chromium, Firefox and Safari.
What I did
We were picking the first element matching
[class^="PullRequestBranchName"]as the base branch, without checking if the head was also in the DOM. Now, we check in theobserveif both branches are in the DOM.Test URLs
Open PR (default branch): Open PR sandbox#4
Open PR (non-default branch): Fix typo Kenshin/simpread#698
Merged PR (same author): Fix bad linebreaks in
default-branch-buttonandlatest-tag-button#3402Merged PR (different author): fix for bundle-loader when using ESM parcel-bundler/parcel#78
Merged PR (different author + first published tag): Use
@primer/octicons-reacticons #3227Closed PR: Add
confirm-short-commentsfeature #4141Screenshot / GIF
GIF from my Chromium

Tell me if this looks correct for you.