diff --git a/app/soapbox/components/display_name.js b/app/soapbox/components/display_name.js index 7ab8b9e60..7d848a902 100644 --- a/app/soapbox/components/display_name.js +++ b/app/soapbox/components/display_name.js @@ -4,6 +4,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import VerificationBadge from './verification_badge'; import { acctFull } from '../utils/accounts'; import { List as ImmutableList } from 'immutable'; +import HoverRefWrapper from 'soapbox/components/hover_ref_wrapper'; export default class DisplayName extends React.PureComponent { @@ -42,7 +43,9 @@ export default class DisplayName extends React.PureComponent { return ( - {displayName} + + {displayName} + {suffix} {children} diff --git a/app/soapbox/components/hover_ref_wrapper.js b/app/soapbox/components/hover_ref_wrapper.js index 64d62ba5c..fe6ac2bed 100644 --- a/app/soapbox/components/hover_ref_wrapper.js +++ b/app/soapbox/components/hover_ref_wrapper.js @@ -26,25 +26,31 @@ const handleMouseLeave = (dispatch) => { }; }; -export const HoverRefWrapper = ({ accountId, children }) => { +export const HoverRefWrapper = ({ accountId, children, inline }) => { const dispatch = useDispatch(); const ref = useRef(); + const Elem = inline ? 'span' : 'div'; return ( -
{children} -
+ ); }; HoverRefWrapper.propTypes = { accountId: PropTypes.string, children: PropTypes.node, + inline: PropTypes.bool, +}; + +HoverRefWrapper.defaultProps = { + inline: false, }; export default HoverRefWrapper; diff --git a/app/soapbox/components/profile_hover_card.js b/app/soapbox/components/profile_hover_card.js index b545b87bc..8d234aa4b 100644 --- a/app/soapbox/components/profile_hover_card.js +++ b/app/soapbox/components/profile_hover_card.js @@ -52,14 +52,7 @@ export const ProfileHoverCard = ({ visible }) => { if (accountId) dispatch(fetchRelationships([accountId])); }, [dispatch, accountId]); - const { styles, attributes } = usePopper(targetRef, popperElement, { - modifiers: [{ - name: 'offset', - options: { - offset: [-100, 0], - }, - }], - }); + const { styles, attributes } = usePopper(targetRef, popperElement); if (!account) return null; const accountBio = { __html: account.get('note_emojified') }; diff --git a/app/soapbox/components/status.js b/app/soapbox/components/status.js index e52dfdc5c..9e8a2d684 100644 --- a/app/soapbox/components/status.js +++ b/app/soapbox/components/status.js @@ -462,17 +462,18 @@ class Status extends ImmutablePureComponent { } - -
-
- - {statusAvatar} -
- - - +
+
+ + + {statusAvatar} + +
- + + + +
{!group && status.get('group') && ( diff --git a/app/soapbox/features/status/components/detailed_status.js b/app/soapbox/features/status/components/detailed_status.js index e323873a3..131de49ec 100644 --- a/app/soapbox/features/status/components/detailed_status.js +++ b/app/soapbox/features/status/components/detailed_status.js @@ -164,20 +164,22 @@ export default class DetailedStatus extends ImmutablePureComponent { return (
- -
-
- -
+
+
+ +
+ -
-
- - - -
+ +
+ + + + + +
- +
{status.get('group') && (
diff --git a/app/styles/components/profile_hover_card.scss b/app/styles/components/profile_hover_card.scss index e89998901..b3fb4fc31 100644 --- a/app/styles/components/profile_hover_card.scss +++ b/app/styles/components/profile_hover_card.scss @@ -113,18 +113,6 @@ } } -/* Prevent floating avatars from intercepting with current card */ -.status, -.detailed-status { - .floating-link { - display: none; - } - - &:hover .floating-link { - display: block; - } -} - /* Hide the popper when the reference is hidden */ #popper[data-popper-reference-hidden] { visibility: hidden;