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
Use native style in update-pr-from-base-branch
#6537
Conversation
features.unload(import.meta.url); | ||
|
||
async function handler(event: DelegateEvent<MouseEvent, HTMLButtonElement>): Promise<void> { | ||
event.delegateTarget.disabled = true; |
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.
Not yet tested
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.
|
||
const selectorForPushablePRNotice = '.merge-pr > .color-fg-muted:first-child'; | ||
const canMerge = '.merge-pr > .color-fg-muted:first-child'; |
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 not seeing it in our own repo though 🤷♂️
mergeabilityRow.prepend( | ||
|
||
<div | ||
className="branch-action-btn float-right js-immediate-updates js-needs-timeline-marker-header" |
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 don't know if these last 2 classes are useful, I just copied the native row and dropped every class and element I understood.
icon: <CheckIcon/>, | ||
iconClass: 'completeness-indicator-success', | ||
heading: 'This branch has no conflicts with the base branch', | ||
meta: 'Merging can be performed automatically.', |
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 added this meta line because without it it's a little misaligned, but I'm not totally sure it's a always true statement exactly as GitHub defines it.
Eventually this line will likely contain:
update-pr-from-base-branch
update-pr-from-base-branch
@@ -279,7 +279,7 @@ Thanks for contributing! 🦋🙌 | |||
### Editing pull requests | |||
|
|||
- [](# "sync-pr-commit-title") 🔥 [Uses the PR’s title as the default squash commit title](https://github.com/refined-github/refined-github/issues/276) and [updates the PR’s title to match the commit title, if changed.](https://user-images.githubusercontent.com/1402241/51669708-9a712400-1ff7-11e9-913a-ac1ea1050975.png) | |||
- [](# "update-pr-from-base-branch") [Adds a button to update a PR from the base branch to ensure it builds correctly before merging the PR itself.](https://user-images.githubusercontent.com/1402241/106494023-816d9a00-647f-11eb-8cb1-7c97aa8a5546.png) GitHub only adds it when the base branch is "protected". | |||
- [](# "update-pr-from-base-branch") [Adds an "Update branch" button to every PR.](https://user-images.githubusercontent.com/1402241/234483592-4867cb2e-21cb-436d-9ea0-aedadf834f19.png) GitHub has the same feature, but it must be manually configured with protected branches. |
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.
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.
The tooltip was added to clarify that this is a RGH feature, because it blends in way too well otherwise.
update-pr-from-base-branch
#6127TODO:
PR without conflicts
refined-github/sandbox#60
Draft PR without conflicts
refined-github/sandbox#61
Native "Update branch" button
#6531
(or pick a conflict-free PR from https://github.com/refined-github/refined-github/pulls?q=is%3Apr+is%3Aopen+sort%3Acreated-asc)
Native "Resolve conflicts" button
refined-github/sandbox#9