@@ -24,6 +24,7 @@ import { EditButton, DeleteButton } from '../../ui/buttons'; | |||
import CommentDeletePopup from '../popups/CommentDeletePopup'; | |||
import CommentPopup from '../popups/CommentPopup'; | |||
import DateFromNow from '../../intl/DateFromNow'; | |||
import { PopupPlacement } from '../../ui/popups'; | |||
interface Props { | |||
comment: T.IssueComment; | |||
@@ -104,6 +105,7 @@ export default class IssueCommentLine extends React.PureComponent<Props, State> | |||
comment={comment} | |||
onComment={this.handleEdit} | |||
placeholder="" | |||
placement={PopupPlacement.BottomRight} | |||
toggleComment={this.toggleEditPopup} | |||
/> | |||
}> |
@@ -67,6 +67,7 @@ exports[`should open the right popups when the buttons are clicked 3`] = ` | |||
} | |||
onComment={[Function]} | |||
placeholder="" | |||
placement="bottom-right" | |||
toggleComment={[Function]} | |||
/> | |||
} | |||
@@ -191,6 +192,7 @@ exports[`should render correctly a comment that is updatable 1`] = ` | |||
} | |||
onComment={[Function]} | |||
placeholder="" | |||
placement="bottom-right" | |||
toggleComment={[Function]} | |||
/> | |||
} |
@@ -24,6 +24,7 @@ import Avatar from '../../ui/Avatar'; | |||
import DateTimeFormatter from '../../intl/DateTimeFormatter'; | |||
import IssueChangelogDiff, { ChangelogDiff } from '../components/IssueChangelogDiff'; | |||
import { DropdownOverlay } from '../../controls/Dropdown'; | |||
import { PopupPlacement } from '../../ui/popups'; | |||
interface Changelog { | |||
avatar?: string; | |||
@@ -71,7 +72,7 @@ export default class ChangelogPopup extends React.PureComponent<Props, State> { | |||
const { issue } = this.props; | |||
const { author } = issue; | |||
return ( | |||
<DropdownOverlay> | |||
<DropdownOverlay placement={PopupPlacement.BottomRight}> | |||
<div className="menu is-container issue-changelog"> | |||
<table className="spaced"> | |||
<tbody> |
@@ -21,6 +21,7 @@ import * as React from 'react'; | |||
import { Button } from '../../ui/buttons'; | |||
import { translate } from '../../../helpers/l10n'; | |||
import { DropdownOverlay } from '../../controls/Dropdown'; | |||
import { PopupPlacement } from '../../ui/popups'; | |||
interface Props { | |||
onDelete: () => void; | |||
@@ -28,7 +29,7 @@ interface Props { | |||
export default function CommentDeletePopup({ onDelete }: Props) { | |||
return ( | |||
<DropdownOverlay> | |||
<DropdownOverlay placement={PopupPlacement.BottomRight}> | |||
<div className="menu is-container"> | |||
<div className="spacer-bottom">{translate('issue.comment.delete_confirm_message')}</div> | |||
<Button className="button-red" onClick={onDelete}> |
@@ -22,13 +22,14 @@ import MarkdownTips from '../../common/MarkdownTips'; | |||
import { Button, ResetButtonLink } from '../../ui/buttons'; | |||
import { translate } from '../../../helpers/l10n'; | |||
import { DropdownOverlay } from '../../controls/Dropdown'; | |||
import { PopupPlacement } from '../../ui/popups'; | |||
interface Props { | |||
comment?: Pick<T.IssueComment, 'markdown'>; | |||
onComment: (text: string) => void; | |||
toggleComment: (visible: boolean) => void; | |||
placeholder: string; | |||
popupPosition?: {}; | |||
placement?: PopupPlacement; | |||
} | |||
interface State { | |||
@@ -70,7 +71,7 @@ export default class CommentPopup extends React.PureComponent<Props, State> { | |||
render() { | |||
const { comment } = this.props; | |||
return ( | |||
<DropdownOverlay> | |||
<DropdownOverlay placement={this.props.placement}> | |||
<div className="issue-comment-bubble-popup"> | |||
<div className="issue-comment-form-text"> | |||
<textarea |
@@ -1,7 +1,9 @@ | |||
// Jest Snapshot v1, https://goo.gl/fbAQLP | |||
exports[`should render the changelog popup correctly 1`] = ` | |||
<DropdownOverlay> | |||
<DropdownOverlay | |||
placement="bottom-right" | |||
> | |||
<div | |||
className="menu is-container issue-changelog" | |||
> |
@@ -1,7 +1,9 @@ | |||
// Jest Snapshot v1, https://goo.gl/fbAQLP | |||
exports[`should render the comment delete popup correctly 1`] = ` | |||
<DropdownOverlay> | |||
<DropdownOverlay | |||
placement="bottom-right" | |||
> | |||
<div | |||
className="menu is-container" | |||
> |