Skip to content
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

Add markdown preview to Submit Review Textarea #24672

Merged
8 changes: 5 additions & 3 deletions templates/repo/diff/new_review.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
<form class="ui form" action="{{.Link}}/reviews/submit" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="commit_id" value="{{.AfterCommitID}}">
<div class="header gt-df gt-ac gt-pb-3">
<div class="field gt-df gt-ac">
<div class="gt-f1">{{$.locale.Tr "repo.diff.review.header"}}</div>
<a class="muted close gt-px-3">{{svg "octicon-x" 16}}</a>
<a class="muted close">{{svg "octicon-x" 16}}</a>
</div>
<div class="ui field">
<div class="field">
{{template "shared/combomarkdowneditor" (dict
"locale" $.locale
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
"MarkdownPreviewContext" .RepoLink
"TextareaName" "content"
"TextareaPlaceholder" ($.locale.Tr "repo.diff.review.placeholder")
"DropzoneParentContainer" "form"
Expand Down
1 change: 1 addition & 0 deletions web_src/css/code/linebutton.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

.code-line-menu {
width: auto !important;
border: none !important; /* the border is provided by tippy, not using the `.ui.menu` border */
}

.code-line-button {
Expand Down
4 changes: 0 additions & 4 deletions web_src/css/modules/tippy.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
color: var(--color-tooltip-text);
}

.tippy-box[data-theme="menu"] .ui.menu {
border: none;
}

.tippy-content {
position: relative;
padding: 1rem;
Expand Down