Skip to content

Add avoid-accidental-submissions feature - #4252

Merged
fregante merged 20 commits into
refined-github:mainfrom
darkred:remap-enter-key-on-issue-pr-commit-title-fields
Apr 24, 2021
Merged

fregante merged 20 commits into
refined-github:mainfrom
darkred:remap-enter-key-on-issue-pr-commit-title-fields

Conversation

@fregante fregante changed the title Add remap-enter-key-on-issue-pr-commit-title-fields feature Add avoid-accidental-submissions feature Apr 18, 2021
@darkred
darkred marked this pull request as ready for review April 18, 2021 14:36
Comment thread readme.md Resolved
@fregante

Copy link
Copy Markdown
Member

Thank you for the PR and for following the template! I fixed some mistakes but I'm not sure it passes lint/types.

@yakov116

Copy link
Copy Markdown
Member

Can't we onConversationHeader something like that. We use it in one-key-formatting

@fregante

Copy link
Copy Markdown
Member

Can't we onConversationHeader something like that. We use it in one-key-formatting

To be honest I don't really like that file. Here specifically it can be solved by just adding a check for .suggester

@darkred

darkred commented Apr 19, 2021

Copy link
Copy Markdown
Contributor Author

Thank you for the PR and for following the template! I fixed some mistakes but I'm not sure it passes lint/types.

@fregante Always glad to be of help!
Thanks for your commit. I just added a needed type assertion + a missing bracket because it failed lint/types.

@yakov116

Copy link
Copy Markdown
Member

Blocked by refined-github/github-url-detection#68

@refined-github refined-github deleted a comment from steel9209 Apr 22, 2021
@yakov116
yakov116 marked this pull request as ready for review April 22, 2021 04:05

@yakov116 yakov116 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great!

@darkred

darkred commented Apr 22, 2021 •

Copy link
Copy Markdown
Contributor Author

I made a change with ad2c394 13762ac
in order isNewFile and isEditingFile to focus the optional description textarea #commit-description-textarea
(previously they didn't focus anything):

@fregante

Copy link
Copy Markdown
Member

previously they didn't focus anything

That's impossible. #commit-description-textarea is also a textarea and the selector is looking in the same form. If #commit-description-textarea matches then textarea should too

@fregante

Copy link
Copy Markdown
Member

Ah I see what's going on. In the same form there's another textarea for the file’s content, hidden by CodeMirror.

Comment thread readme.md Resolved
Co-authored-by: Federico Brigante <[email protected]>
(also renamed onKeyDownEnter() to onKeyDown() )
@fregante
fregante merged commit 71890b7 into refined-github:main Apr 24, 2021
@fregante

fregante commented Apr 24, 2021 •

Copy link
Copy Markdown
Member

Thanks Kostas!

@darkred

darkred commented Apr 24, 2021

Copy link
Copy Markdown
Contributor Author

I'm glad I could help!
And, thank you, Federico, and @yakov116 for the guidance 👍


function addQuickSubmit(): void {
select('input#commit-summary-input')!.classList.add('js-quick-submit');
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not sure why we added this here. Doesn't this allow submission via ctrl-enter? It should be extracted to its own feature (and the shortcut should mention cmd on Mac )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Avoid accidental form submissions

3 participants