Skip to content

Conversation

@kovsu
Copy link
Member

@kovsu kovsu commented Nov 3, 2024

@kovsu kovsu marked this pull request as ready for review November 3, 2024 11:17
@kovsu kovsu marked this pull request as draft November 3, 2024 11:22
@fregante fregante added the bug label Nov 3, 2024
@kovsu
Copy link
Member Author

kovsu commented Nov 4, 2024

Conversations Commit List Commit
Open PR (default branch) image image image
Open PR (non-default branch) image image image
Merged PR (same author) image image image
Merged PR (different author) image image image
Merged PR (different author + first published tag) image image image
Closed PR image image image

@kovsu
Copy link
Member Author

kovsu commented Nov 4, 2024

cross-deleted-pr-branches seems also need to fix.

@kovsu kovsu marked this pull request as ready for review November 4, 2024 01:47
}

const baseBranch = base.title.split(':')[1];
const baseBranchContent = base.textContent.split(':');
Copy link
Member

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)

Copy link
Member Author

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.

@fregante fregante changed the title clean-converstion-headers - Support new pr view clean-converstion-headers - Support new PR view Nov 4, 2024
@kovsu
Copy link
Member Author

kovsu commented Nov 4, 2024

BTW, it works well on sticky.
before:

image

after:

image

@kovsu
Copy link
Member Author

kovsu commented Nov 5, 2024

Screenshot updated!

Comment on lines +52 to +56
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;
Copy link
Member

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>);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No branch selector

Screenshot Screenshot 1

New view

Screenshot 2 Screenshot 3

With branch selector

Screenshot 4 Screenshot 5

New view

Screenshot 6 Screenshot 7

@fregante fregante merged commit 037cf99 into refined-github:main Nov 5, 2024
@kovsu kovsu deleted the clean-conversation-headers-pr branch November 5, 2024 08:04
@FloEdelmann FloEdelmann changed the title clean-converstion-headers - Support new PR view clean-conversation-headers - Support new PR view Nov 5, 2024
@fregante fregante linked an issue Nov 6, 2024 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

clean-conversation-headers missing from PR Commits tab

2 participants