Merge branch 'bugfixes' into 'develop'
Fix pipeline, fix emoji selector position See merge request soapbox-pub/soapbox!2278
This commit is contained in:
commit
01952c8fad
|
@ -1,9 +1,8 @@
|
||||||
import { Portal } from '@reach/portal';
|
|
||||||
import React, { useState, useEffect, useRef } from 'react';
|
import React, { useState, useEffect, useRef } from 'react';
|
||||||
|
|
||||||
import { simpleEmojiReact } from 'soapbox/actions/emoji-reacts';
|
import { simpleEmojiReact } from 'soapbox/actions/emoji-reacts';
|
||||||
import { openModal } from 'soapbox/actions/modals';
|
import { openModal } from 'soapbox/actions/modals';
|
||||||
import { EmojiSelector } from 'soapbox/components/ui';
|
import { EmojiSelector, Portal } from 'soapbox/components/ui';
|
||||||
import { useAppDispatch, useAppSelector, useOwnAccount, useSoapboxConfig } from 'soapbox/hooks';
|
import { useAppDispatch, useAppSelector, useOwnAccount, useSoapboxConfig } from 'soapbox/hooks';
|
||||||
import { isUserTouching } from 'soapbox/is-mobile';
|
import { isUserTouching } from 'soapbox/is-mobile';
|
||||||
import { getReactForStatus } from 'soapbox/utils/emoji-reacts';
|
import { getReactForStatus } from 'soapbox/utils/emoji-reacts';
|
||||||
|
|
|
@ -43,6 +43,8 @@ interface IEmojiSelector {
|
||||||
placement?: Placement
|
placement?: Placement
|
||||||
/** Whether the selector should be visible. */
|
/** Whether the selector should be visible. */
|
||||||
visible?: boolean
|
visible?: boolean
|
||||||
|
/** X/Y offset of the floating picker. */
|
||||||
|
offset?: [number, number]
|
||||||
/** Whether to allow any emoji to be chosen. */
|
/** Whether to allow any emoji to be chosen. */
|
||||||
all?: boolean
|
all?: boolean
|
||||||
}
|
}
|
||||||
|
@ -54,6 +56,7 @@ const EmojiSelector: React.FC<IEmojiSelector> = ({
|
||||||
onReact,
|
onReact,
|
||||||
placement = 'top',
|
placement = 'top',
|
||||||
visible = false,
|
visible = false,
|
||||||
|
offset = [-10, 0],
|
||||||
all = true,
|
all = true,
|
||||||
}): JSX.Element => {
|
}): JSX.Element => {
|
||||||
const soapboxConfig = useSoapboxConfig();
|
const soapboxConfig = useSoapboxConfig();
|
||||||
|
@ -80,7 +83,7 @@ const EmojiSelector: React.FC<IEmojiSelector> = ({
|
||||||
{
|
{
|
||||||
name: 'offset',
|
name: 'offset',
|
||||||
options: {
|
options: {
|
||||||
offset: [-10, 12],
|
offset,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -41,6 +41,7 @@ function ChatMessageReactionWrapper(props: IChatMessageReactionWrapper) {
|
||||||
referenceElement={referenceElement}
|
referenceElement={referenceElement}
|
||||||
onReact={handleSelect}
|
onReact={handleSelect}
|
||||||
onClose={() => setIsOpen(false)}
|
onClose={() => setIsOpen(false)}
|
||||||
|
offset={[-10, 12]}
|
||||||
all={false}
|
all={false}
|
||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
|
Loading…
Reference in New Issue