From a7990e5babed8be93116d0968aa881caeb93b92a Mon Sep 17 00:00:00 2001 From: SleepingFox Date: Fri, 3 Apr 2020 19:29:39 -0400 Subject: [PATCH] Messy PoC state jittering still seems to be an issue on rare occasion even though the button hitbox is no longer changing size. --- ui/component/button/view.jsx | 36 +++++++++++++++++++-------- ui/component/subscribeButton/view.jsx | 10 +++++++- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/ui/component/button/view.jsx b/ui/component/button/view.jsx index d621f446d..a114c755d 100644 --- a/ui/component/button/view.jsx +++ b/ui/component/button/view.jsx @@ -91,17 +91,33 @@ const Button = forwardRef((props: Props, ref: any) => { const size = iconSize || (!label && !children) ? 18 : undefined; // Fall back to default const content = ( - - {icon && } +
+ {/* style={{ border: `1px solid white` }} */} +
+ {icon && } +
{ -

- {largestLabel} - {label && ( - - {label} - - )} -

+
+ + {largestLabel || label} + {label && ( + //
+
+ + {label} + +
+ )} + +
} {children && children} {iconRight && } diff --git a/ui/component/subscribeButton/view.jsx b/ui/component/subscribeButton/view.jsx index 331c634a9..fc6cf60df 100644 --- a/ui/component/subscribeButton/view.jsx +++ b/ui/component/subscribeButton/view.jsx @@ -46,11 +46,19 @@ export default function SubscribeButton(props: Props) { const unfollowOverride = isSubscribed && isHovering && __('Unfollow'); const label = isMobile && shrinkOnMobile ? '' : unfollowOverride || subscriptionLabel; + let longestStr = __('Following'); + + if (__('Following').length < __('Unfollow').length) { + longestStr = __('Unfollow'); + } + + longestStr = longestStr + '-'; + return permanentUrl ? (