Repository navigation
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.
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.
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.
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>); |
clean-converstion-headers - Support new PR viewclean-conversation-headers - Support new PR view




























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