-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
clean-conversation-headers - Support new PR view
#8001
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
clean-conversation-headers - Support new PR view
#8001
Conversation
|
|
| } | ||
|
|
||
| const baseBranch = base.title.split(':')[1]; | ||
| const baseBranchContent = base.textContent.split(':'); |
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.
This change needs to be reviewed because this part of the UI is rather tricky, especially when introducing long names, escaping, cross-repo PRs, etc. However we already have a function that gets the base and head branch information, so we should probably use that one (as well as ensure that it works as expected on this new view, so that all remaining features benefit from it)
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.
I'm using parseReferenceRaw. It works well.
clean-converstion-headers - Support new pr viewclean-converstion-headers - Support new PR view
|
Screenshot updated! |
| let baseBranch; | ||
| if (base.title) { | ||
| baseBranch = parseReferenceRaw(base.title, base.textContent).branch; | ||
| } else { | ||
| base.nextElementSibling!.replaceChildren(arrowIcon); | ||
| baseBranch = parseReferenceRaw(base.nextElementSibling!.textContent!, base.textContent).branch; |
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.
All of this should just be part of getBranches and be used here. getBranches is used in a handful more features and it's currently broken on PRs.
| = $optional('.commit-ref-dropdown', byline)?.nextSibling // TODO: Drop old PR layout support | ||
| ?? base.nextSibling?.nextSibling; | ||
| assertNodeContent(anchor, 'from'); | ||
| anchor!.after(<span><ArrowLeftIcon className="v-align-middle mx-1" /></span>); |
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.
clean-converstion-headers - Support new PR viewclean-conversation-headers - Support new PR view




























Part of #7988
Test URLs
32352f7(#7981)Screenshot