Skip to content

Commit

Permalink
[C-4075] Harmony qa round 2 (#7951)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanjeffers authored Mar 26, 2024
1 parent 93b06c7 commit fb22032
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ export const FollowButton = forwardRef(
color ${motion.hover}
`,
'::before': {
zIndex: -1,
content: '""',
position: 'absolute',
top: 0,
Expand Down
22 changes: 20 additions & 2 deletions packages/harmony/src/components/button/IconButton/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,32 @@ export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(
...other
} = props
const { disabled } = other
const { color, cornerRadius, spacing } = useTheme()
const { color, cornerRadius, spacing, motion } = useTheme()

const buttonCss: CSSObject = {
background: 'transparent',
border: 'none',
borderRadius: '50%',
padding: spacing.xs,
overflow: 'unset'
overflow: 'unset',
svg: {
transition: `
transform ${motion.hover},
color ${motion.hover}
`
},
'&:hover': {
transform: 'scale(1.0)',
svg: {
transform: 'scale(1.1)'
}
},
'&:active': {
transform: 'scale(1.0)',
svg: {
transform: 'scale(0.98)'
}
}
}

const rippleCss: CSSObject = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const ImageSelectionButton = ({
<>
<Button
variant='tertiary'
size='small'
ref={anchorRefProp ? undefined : anchorRefInner}
className={cn(buttonClassName, {
[styles.hide]: showModal
Expand Down Expand Up @@ -111,6 +112,7 @@ const ImageSelectionButton = ({
>
<Button
variant='tertiary'
size='small'
className={cn(styles.noPopup, {
[styles.hide]: hasImage
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

.notificationDot {
position: absolute;
top: 0;
right: 0;
top: 2px;
right: 2px;
transform: translate(50%, -50%);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const ProfilePicture = ({
</div>
)}
</ImageElement>
{(editMode || showEdit) && (
{editMode || showEdit ? (
<ImageSelectionButton
wrapperClassName={styles.imageSelectionButtonWrapper}
buttonClassName={styles.imageSelectionButton}
Expand All @@ -118,7 +118,7 @@ const ProfilePicture = ({
hasImage={hasProfilePicture}
source='ProfilePicture'
/>
)}
) : null}
</div>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,27 +54,12 @@

.imageSelectionButtonWrapper {
position: absolute;
bottom: 48px;
bottom: var(--harmony-spacing-2xl);
right: 0;
left: 0;
z-index: 4;
}

.isMobile .imageSelectionButtonWrapper {
bottom: 32px;
}

.imageSelectionButton {
opacity: 0;
pointer-events: none;
}

.editMode .overlay,
.editMode .imageSelectionButton {
opacity: 1;
pointer-events: all;
}

.modalOpen .overlay,
.modalOpen .imageSelectionButton {
opacity: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,18 @@ export const ProfileBio = ({
render={isCollapsed ? renderCollapsedContent : renderExpandedContent}
duration={300}
/>
<PlainButton
iconRight={isCollapsed ? IconCaretDown : IconCaretUp}
onClick={handleToggleCollapse}
css={(theme) => ({
marginTop: theme.spacing.l,
paddingLeft: 0
})}
>
{isCollapsed ? messages.seeMore : messages.seeLess}
</PlainButton>
{isCollapsible ? (
<PlainButton
iconRight={isCollapsed ? IconCaretDown : IconCaretUp}
onClick={handleToggleCollapse}
css={(theme) => ({
marginTop: theme.spacing.l,
paddingLeft: 0
})}
>
{isCollapsed ? messages.seeMore : messages.seeLess}
</PlainButton>
) : null}
</div>
</div>
)
Expand Down

0 comments on commit fb22032

Please sign in to comment.