WIP emoji reacts

This commit is contained in:
Alex Gleason 2022-03-29 15:17:39 -05:00
parent 7f57f58b98
commit b1d2681115
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 11 additions and 9 deletions

View file

@ -102,7 +102,7 @@ class EmojiSelector extends ImmutablePureComponent {
className='emoji-react-selector-container' className='emoji-react-selector-container'
> >
<div <div
className={classNames('emoji-react-selector', { 'emoji-react-selector--visible': visible, 'emoji-react-selector--focused': focused })} className={classNames('emoji-react-selector w-max', { 'emoji-react-selector--visible': visible, 'emoji-react-selector--focused': focused })}
onBlur={this.handleBlur} onBlur={this.handleBlur}
ref={this.setRef} ref={this.setRef}
> >

View file

@ -9,6 +9,7 @@ import { connect } from 'react-redux';
import { Link, withRouter } from 'react-router-dom'; import { Link, withRouter } from 'react-router-dom';
import { simpleEmojiReact } from 'soapbox/actions/emoji_reacts'; import { simpleEmojiReact } from 'soapbox/actions/emoji_reacts';
import EmojiSelector from 'soapbox/components/emoji_selector';
import DropdownMenuContainer from 'soapbox/containers/dropdown_menu_container'; import DropdownMenuContainer from 'soapbox/containers/dropdown_menu_container';
import { isUserTouching } from 'soapbox/is_mobile'; import { isUserTouching } from 'soapbox/is_mobile';
import { isStaff, isAdmin } from 'soapbox/utils/accounts'; import { isStaff, isAdmin } from 'soapbox/utils/accounts';
@ -541,7 +542,8 @@ class StatusActionBar extends ImmutablePureComponent {
} }
render() { render() {
const { status, intl, allowedEmoji, features, me } = this.props; const { status, intl, allowedEmoji, emojiSelectorFocused, handleEmojiSelectorUnfocus, features, me } = this.props;
const { emojiSelectorVisible } = this.state;
const publicStatus = ['public', 'unlisted'].includes(status.get('visibility')); const publicStatus = ['public', 'unlisted'].includes(status.get('visibility'));
@ -660,16 +662,16 @@ class StatusActionBar extends ImmutablePureComponent {
<div <div
ref={this.setRef} ref={this.setRef}
className='flex items-center space-x-0.5 p-1 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500' className='flex relative items-center space-x-0.5 p-1 rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500'
// onMouseEnter={this.handleLikeButtonHover} onMouseEnter={this.handleLikeButtonHover}
// onMouseLeave={this.handleLikeButtonLeave} onMouseLeave={this.handleLikeButtonLeave}
> >
{/* <EmojiSelector <EmojiSelector
onReact={this.handleReactClick} onReact={this.handleReactClick}
visible={features.emojiReacts && emojiSelectorVisible} visible={features.emojiReacts && emojiSelectorVisible}
focused={emojiSelectorFocused} focused={emojiSelectorFocused}
onUnfocus={handleEmojiSelectorUnfocus} onUnfocus={handleEmojiSelectorUnfocus}
/> */} />
<IconButton <IconButton
className={classNames({ className={classNames({
'text-gray-400 hover:text-gray-600 dark:hover:text-white': !meEmojiReact, 'text-gray-400 hover:text-gray-600 dark:hover:text-white': !meEmojiReact,

View file

@ -125,8 +125,8 @@
background: transparent; background: transparent;
img { img {
width: 30px; width: 36px;
height: 30px; height: 36px;
padding: 3px; padding: 3px;
transition: 0.1s; transition: 0.1s;
} }