Skip to content

Commit

Permalink
Add drag/drop image
Browse files Browse the repository at this point in the history
  • Loading branch information
tidy-dev committed Mar 8, 2021
1 parent 2c465fd commit 0eb155a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/src/ui/history/commit-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { List } from '../lib/list'
import { arrayEquals } from '../../lib/equality'
import { Popover, PopoverCaretPosition } from '../lib/popover'
import { Button } from '../lib/button'
import { enableCherryPicking } from '../../lib/feature-flag'
import { encodePathAsUrl } from '../../lib/path'

const RowHeight = 50

Expand Down Expand Up @@ -191,12 +193,18 @@ export class CommitList extends React.Component<ICommitListProps, {}> {
}

private renderCherryPickIntroPopover() {
if (this.props.hasShownCherryPickIntro) {
if (this.props.hasShownCherryPickIntro || !enableCherryPicking()) {
return null
}

const cherryPickIntro = encodePathAsUrl(
__dirname,
'static/cherry-pick-intro.png'
)

return (
<Popover caretPosition={PopoverCaretPosition.LeftTop}>
<img src={cherryPickIntro} className="cherry-pick-intro" />
<h3>
Drag and drop to cherry pick!
<span className="call-to-action-bubble">New</span>
Expand Down
Binary file added app/static/common/cherry-pick-intro.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/styles/ui/history/_commit-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
border-radius: var(--border-radius);
margin-left: var(--spacing-third);
}
img {
width: 100%;
}
}

.commit {
Expand Down

0 comments on commit 0eb155a

Please sign in to comment.