-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Initialize SimpleMDE when making a code comment #11749
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
Initialize SimpleMDE when making a code comment #11749
Conversation
Fix go-gitea#11704 Signed-off-by: Andrew Thornton <[email protected]>
|
||
// Give new write/preview data-tab name to distinguish from others | ||
const $simplemde = setCommentSimpleMDE($textarea); | ||
$textarea.focus(); |
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.
What's this focus for?
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.
it's copying the same code as the $('.edit-content').on('click', async function (event) {...}
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.
Seems like a noop to me unless the textarea focus triggers something, but whatever.
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 agree it's likely a no-op - but's it's present elsewhere and so I think it's prudent to put it there in case it's there for a reason. I don't want to introduce a new heisenbug.
Still broken for reply |
Needs styling fixes now as currently it has been styled to match textarea only Index: web_src/less/_review.less
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web_src/less/_review.less (revision 0814066a3e59714ab5d4790ceefe3477c7178c72)
+++ web_src/less/_review.less (date 1591292279994)
@@ -54,15 +54,14 @@
border: 0;
padding: 0;
margin: 0;
-
- &.markdown {
- padding: 1em;
- min-height: 168px;
- }
}
&.header {
padding: .1rem 1rem;
+
+ .text {
+ margin: 0;
+ }
}
}
@@ -76,18 +75,16 @@
}
.ui.active.tab {
- border: 1px solid #d4d4d5;
padding: .5em;
- border-radius: 0 .28571429rem .28571429rem;
- }
- .ui.active.markdown.tab {
- border-top-left-radius: .28571429rem;
+ &.markdown {
+ padding: 1em;
+ min-height: 168px;
+ }
}
.ui.tabular.menu {
- margin-bottom: 0;
- border-bottom: 0;
+ margin: .5em;
}
.comment-list { |
Co-Authored-By: Cirno the Strongest <[email protected]> Signed-off-by: Andrew Thornton <[email protected]>
…thub.com:zeripath/gitea into fix-11704-initialize-simplemde-for-code-comments
…e-simplemde-for-code-comments
I wasn't aware that was broken at all... |
Markdown bar is shown now on edit and creation, so it makes sense that it would be shown for replies too. |
Signed-off-by: Andrew Thornton <[email protected]>
done |
Backport go-gitea#11749 Fix go-gitea#11704 Signed-off-by: Andrew Thornton <[email protected]> Co-Authored-By: Cirno the Strongest <[email protected]>
Backport #11749 Fix #11704 Signed-off-by: Andrew Thornton <[email protected]> Co-Authored-By: Cirno the Strongest <[email protected]> Co-authored-by: Cirno the Strongest <[email protected]> Co-authored-by: techknowlogick <[email protected]>
Need label backport/done |
Fix go-gitea#11704 Signed-off-by: Andrew Thornton <[email protected]> Co-Authored-By: Cirno the Strongest <[email protected]>
Fix #11704
Signed-off-by: Andrew Thornton [email protected]