diff --git a/app/javascript/gabsocial/actions/popover.js b/app/javascript/gabsocial/actions/popover.js index 5863e08c..39d5ae2f 100644 --- a/app/javascript/gabsocial/actions/popover.js +++ b/app/javascript/gabsocial/actions/popover.js @@ -1,12 +1,11 @@ export const POPOVER_OPEN = 'POPOVER_OPEN' export const POPOVER_CLOSE = 'POPOVER_CLOSE' -export function openPopover(type, keyboard = false, placement = 'top') { +export function openPopover(type, props) { return { - keyboard, - placement, type: POPOVER_OPEN, popoverType: type, + popoverProps: props, } } diff --git a/app/javascript/gabsocial/components/account.js b/app/javascript/gabsocial/components/account.js index ad6a622f..83b5207f 100644 --- a/app/javascript/gabsocial/components/account.js +++ b/app/javascript/gabsocial/components/account.js @@ -114,7 +114,7 @@ class Account extends ImmutablePureComponent { onClick: requested ? this.handleUnrequest : this.handleBlock, color: 'primary', backgroundColor: 'tertiary', - className: _s.marginTop5PX, + className: _s.mt5, } } else if (!account.get('moved') || following) { buttonOptions = { @@ -122,7 +122,7 @@ class Account extends ImmutablePureComponent { outline: !following, color: !following ? 'brand' : 'white', backgroundColor: !following ? 'none' : 'brand', - className: _s.marginTop5PX, + className: _s.mt5, onClick: this.handleFollow, } buttonText = intl.formatMessage(following ? messages.unfollow : messages.follow) @@ -141,7 +141,7 @@ class Account extends ImmutablePureComponent { narrow circle backgroundColor='none' - className={_s.paddingHorizontal5PX} + className={_s.px5} onClick={dismissAction} icon='close' iconWidth='8px' @@ -151,7 +151,7 @@ class Account extends ImmutablePureComponent { ) return ( -
+
{!compact && button} diff --git a/app/javascript/gabsocial/components/autosuggest_textbox/autosuggest_textbox.js b/app/javascript/gabsocial/components/autosuggest_textbox/autosuggest_textbox.js index 9175aacb..d1e6daa4 100644 --- a/app/javascript/gabsocial/components/autosuggest_textbox/autosuggest_textbox.js +++ b/app/javascript/gabsocial/components/autosuggest_textbox/autosuggest_textbox.js @@ -222,11 +222,11 @@ export default class AutosuggestTextbox extends ImmutablePureComponent { outlineNone: 1, backgroundColorPrimary: !small, backgroundSubtle: small, - paddingVertical15PX: !small, - paddingVertical10PX: small, + py15: !small, + py10: small, fontSize16PX: !small, fontSize14PX: small, - marginRight5PX: small, + mr5: small, }) //
-
+
{children} diff --git a/app/javascript/gabsocial/components/button.js b/app/javascript/gabsocial/components/button.js index 27b83ccc..abfdaa1f 100644 --- a/app/javascript/gabsocial/components/button.js +++ b/app/javascript/gabsocial/components/button.js @@ -116,9 +116,9 @@ export default class Button extends PureComponent { circle: !text, radiusSmall: radiusSmall, - paddingVertical5PX: narrow, - paddingVertical10PX: !text && !narrow, - paddingHorizontal15PX: !text, + py5: narrow, + py10: !text && !narrow, + px15: !text, width100PC: block, diff --git a/app/javascript/gabsocial/components/column_header.js b/app/javascript/gabsocial/components/column_header.js index 4d222497..6c1cd90d 100644 --- a/app/javascript/gabsocial/components/column_header.js +++ b/app/javascript/gabsocial/components/column_header.js @@ -41,16 +41,16 @@ export default class ColumnHeader extends PureComponent { showBackBtn && + + + + + +
+
+
+ +
+
+ ) + } + +} diff --git a/app/javascript/gabsocial/components/display_name.js b/app/javascript/gabsocial/components/display_name.js index ed7a3bd3..9e8328d2 100644 --- a/app/javascript/gabsocial/components/display_name.js +++ b/app/javascript/gabsocial/components/display_name.js @@ -9,8 +9,8 @@ import Icon from './icon' const cx = classNames.bind(_s) const mapDispatchToProps = dispatch => ({ - openUserInfoPopover() { - dispatch(openPopover('USER_INFO')) + openUserInfoPopover(props) { + dispatch(openPopover('USER_INFO', props)) }, closeUserInfoPopover() { dispatch(closePopover()) @@ -33,13 +33,21 @@ class DisplayName extends ImmutablePureComponent { } handleMouseEnter = debounce(() => { - // console.log("SHOW - USER POPOVER") - // this.props.openUserInfoPopover() - }, 50, { leading: true }) + console.log("SHOW - USER POPOVER") + this.props.openUserInfoPopover({ + targetRef: this.node, + position: 'top', + account: this.props.account, + }) + }, 1000, { leading: true }) - handleMouseLeave = () => { - // console.log("HIDE - USER POPOVER") - // this.props.closeUserInfoPopover() + handleMouseLeave = debounce(() => { + console.log("HIDE - USER POPOVER") + this.props.closeUserInfoPopover() + }, 1000, { leading: true }) + + setRef = (n) => { + this.node = n; } render() { @@ -72,7 +80,7 @@ class DisplayName extends ImmutablePureComponent { whiteSpaceNoWrap: 1, fontWeightBold: 1, colorPrimary: 1, - marginRight2PX: 1, + mr2: 1, lineHeight125: !small, fontSize14PX: small, fontSize15PX: !large, @@ -90,7 +98,7 @@ class DisplayName extends ImmutablePureComponent { fontWeightNormal: 1, lineHeight15: multiline, lineHeight125: !multiline, - marginLeft5PX: !multiline, + ml5: !multiline, fontSize14PX: small, fontSize15PX: !large, fontSize16PX: large && !small, @@ -102,7 +110,7 @@ class DisplayName extends ImmutablePureComponent { // : todo : return ( - +
· + · ) } diff --git a/app/javascript/gabsocial/components/file_input.js b/app/javascript/gabsocial/components/file_input.js index 19221807..9a6ef3fd 100644 --- a/app/javascript/gabsocial/components/file_input.js +++ b/app/javascript/gabsocial/components/file_input.js @@ -45,8 +45,8 @@ export default class FileInput extends PureComponent { borderDashed: 1, borderColorSecondary: 1, backgroundColorPrimary: 1, - paddingHorizontal10PX: 1, - paddingVertical10PX: 1, + px10: 1, + py10: 1, radiusSmall: 1, cursorPointer: 1, }) @@ -55,7 +55,7 @@ export default class FileInput extends PureComponent {
{ !!title && -
+
{title} diff --git a/app/javascript/gabsocial/components/group_collection_item.js b/app/javascript/gabsocial/components/group_collection_item.js index bcdd01af..4ff7aa1b 100644 --- a/app/javascript/gabsocial/components/group_collection_item.js +++ b/app/javascript/gabsocial/components/group_collection_item.js @@ -64,9 +64,9 @@ class GroupCollectionItem extends ImmutablePureComponent { borderColorSecondary: 1, radiusSmall: 1, border1PX: 1, - marginBottom10PX: 1, - marginLeft5PX: 1, - marginRight5PX: 1, + mb10: 1, + ml5: 1, + mr5: 1, backgroundColorPrimary: 1, backgroundSubtle_onHover: isMember, }) @@ -83,19 +83,19 @@ class GroupCollectionItem extends ImmutablePureComponent { height={imageHeight} /> -
+
{group.get('title')} -
+
{shortNumberFormat(group.get('member_count'))}   {intl.formatMessage(messages.members)} - + {subtitle}
@@ -103,7 +103,7 @@ class GroupCollectionItem extends ImmutablePureComponent { { !isMember && -
+
- {secondary !== undefined && ( -
+ + {title} + + +
+ + {message} + + +
+ + + { /** + : todo : + */ + secondary !== undefined && ( + +
+ +
+ +
+
+
) } diff --git a/app/javascript/gabsocial/components/modal/modal_layout.js b/app/javascript/gabsocial/components/modal/modal_layout.js index 70fe194f..19f59702 100644 --- a/app/javascript/gabsocial/components/modal/modal_layout.js +++ b/app/javascript/gabsocial/components/modal/modal_layout.js @@ -27,7 +27,7 @@ class ModalLayout extends PureComponent { return (
-
+
{title} @@ -41,7 +41,7 @@ class ModalLayout extends PureComponent { iconWidth='10px' />
-
+
{children}
diff --git a/app/javascript/gabsocial/components/modal/pro_upgrade_modal.js b/app/javascript/gabsocial/components/modal/pro_upgrade_modal.js index 4af8785f..e6b43def 100644 --- a/app/javascript/gabsocial/components/modal/pro_upgrade_modal.js +++ b/app/javascript/gabsocial/components/modal/pro_upgrade_modal.js @@ -23,38 +23,34 @@ class ProUpgradeModal extends ImmutablePureComponent { return ( -
- - {intl.formatMessage(messages.text)} - - - {intl.formatMessage(messages.benefits)} - + + {intl.formatMessage(messages.text)} + + + {intl.formatMessage(messages.benefits)} + + +
+ • Schedule Posts + • Get Verified + • Create Groups + • Larger Video and Image Uploads + • Receive the PRO Badge + • Remove in-feed promotions
-
    -
  • - Schedule Posts -
  • -
  • - Get Verified -
  • -
  • - Create Groups -
  • -
  • - Larger Video and Image Uploads -
  • -
  • - Receive the PRO Badge -
  • -
  • - Remove in-feed promotions -
  • -
- - diff --git a/app/javascript/gabsocial/components/modal/unauthorized_modal.js b/app/javascript/gabsocial/components/modal/unauthorized_modal.js index fcc0a5ec..d818640f 100644 --- a/app/javascript/gabsocial/components/modal/unauthorized_modal.js +++ b/app/javascript/gabsocial/components/modal/unauthorized_modal.js @@ -26,15 +26,15 @@ class UnauthorizedModal extends ImmutablePureComponent { return ( -
- +
+ {intl.formatMessage(messages.text)}
-
+
{ intl.formatMessage(messages.login, { diff --git a/app/javascript/gabsocial/components/panel/group_info_panel.js b/app/javascript/gabsocial/components/panel/group_info_panel.js index d3cfab49..65cd96d3 100644 --- a/app/javascript/gabsocial/components/panel/group_info_panel.js +++ b/app/javascript/gabsocial/components/panel/group_info_panel.js @@ -42,7 +42,7 @@ class GroupInfoPanel extends ImmutablePureComponent {
- + {intl.formatMessage(messages.members)}
diff --git a/app/javascript/gabsocial/components/panel/media_gallery_panel.js b/app/javascript/gabsocial/components/panel/media_gallery_panel.js index 74673604..429a6c03 100644 --- a/app/javascript/gabsocial/components/panel/media_gallery_panel.js +++ b/app/javascript/gabsocial/components/panel/media_gallery_panel.js @@ -66,7 +66,7 @@ class MediaGalleryPanel extends ImmutablePureComponent { headerButtonTitle={intl.formatMessage(messages.show_all)} headerButtonTo={`/${account.get('acct')}/media`} > -
+
{ attachments.slice(0, 16).map((attachment) => ( +