Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C-4075] Harmony qa round 2 #7951

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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