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
one-click-pr-or-gist
: In PR compare pages the "Create pull request" button is always enabled, even with empty title
#4565
Comments
If we can fix this, it has to somehow hook into GitHub’s code so that GitHub changes the state of these buttons autonomously |
one-click-pr-or-gist
causes the "Create pull request" button to be initially enabled, even with empty titleone-click-pr-or-gist
: In PR compare pages the "Create pull request" button is always enabled, even with empty title
Note regarding Gist pages: The In other words, the fact that the button is always enabled in Gists, could be considered a GitHub 'annoyance'. |
I'd treat that as an enhancement more than a bug fix since the behavior is not there to begin with, whereas PRs do show a disabled button by default. |
|
Thanks for the research! The hook should be In this case, it should be as easy as adding the attribute <button
className={classList.join(' ')}
aria-label={description}
type="submit"
name={radioButton.name}
value={radioButton.value}
+ data-disable-invalid
>
{title}
</button>, or maybe + data-disable-invalid={true} |
Thank you! I see that having Therefore, the only option is having the former in the start: 👍 <button
+ data-disable-invalid
className={classList.join(' ')}
aria-label={description}
type="submit"
name={radioButton.name}
value={radioButton.value}
>
{title}
</button>, Regarding my suggested enhancement in Gists, I see that not only the 'filename' field must not be empty, but the body as well (i.e. creating empty gists is not allowed), otherwise you get the "Contents can't be empty" message error. I tried a lot but can't make a complete working PR for this (regarding empty body). So, maybe it would be better to just make a PR for the |
|
Please ensure:
Describe the problem and how to replicate it
Continuing #4556 (comment)
In PR branch compare pages, e.g.
https://github.com/darkred/test/compare/main...t2?expand=1
, the "Create pull request" button is always enabled, even with empty title - (the expected behavior is to be disabled when the title is empty).Disabling the
one-click-pr-or-gist
feature fixes the problem.See:
one-click-pr-or-gist
feature disabled.Screenshots/video/gif showing the issue, if it’s visual
Console errors, if any
No response
Example URL
https://github.com/darkred/test/compare/main...t2?expand=1
Browser(s) used
Chrome 91, Firefox 90
The text was updated successfully, but these errors were encountered: