Skip to content

Commit cf5fba8

Browse files
authored
Merge branch 'develop' into feature/#88
2 parents e6b26bd + 24f6d2f commit cf5fba8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1006
-309
lines changed

.github/workflows/sync.yaml renamed to .github/workflows/sync-develop.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Synchronize to forked repo
1+
name: Synchronize the develop branch to forked repo
22
on:
33
push:
44
branches:

.github/workflows/sync-main.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Synchronize the main branch to forked repo
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
sync:
8+
name: Sync forked repo
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout main
13+
uses: actions/checkout@v4
14+
with:
15+
token: ${{ secrets.AUTO_ACTIONS }}
16+
fetch-depth: 0
17+
ref: main
18+
19+
- name: Add remote-url
20+
run: |
21+
git remote add forked-repo https://cskime:${{ secrets.AUTO_ACTIONS }}@github.com/cskime/rolling
22+
git config user.name cskime
23+
git config user.email ${{ secrets.EMAIL }}
24+
25+
- name: Push changes to forked-repo
26+
run: |
27+
git push -f forked-repo main
28+
29+
- name: Clean up
30+
run: |
31+
git remote remove forked-repo

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="ko">
33
<head>
44
<meta charset="UTF-8" />

src/assets/ld-emoji.png

28.4 KB
Loading

src/assets/ld-img01.png

18.5 KB
Loading

src/assets/ld-img02.png

17.3 KB
Loading

src/assets/ld-img03.png

12.1 KB
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { css } from "styled-components";
2+
3+
function mountAnimation({ isOpen, open, close }) {
4+
return css`
5+
animation: ${isOpen ? open : close} 300ms both;
6+
`;
7+
}
8+
9+
export { mountAnimation };

src/components/avatar/avatar.jsx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { useState } from "react";
12
import styled, { css } from "styled-components";
23
import defaultAvatarImage from "../../assets/ic-person.svg";
34
import Colors from "../color/colors";
5+
import SkeletonLoading from "../loading/skeleton-loading";
46
import AVATAR_SIZE from "./avatar-size";
57

68
const borderWidth = {
@@ -19,8 +21,8 @@ const avatarStyle = css`
1921

2022
const StyledAvatar = styled.div`
2123
${avatarStyle}
22-
border: ${({ $size }) => borderWidth[`${$size}`]}px solid ${({ $color }) =>
23-
$color};
24+
border: ${({ $size }) => borderWidth[`${$size}`]}px solid
25+
${({ $color }) => $color};
2426
2527
img {
2628
width: 100%;
@@ -46,10 +48,22 @@ function Avatar({
4648
size = AVATAR_SIZE.medium,
4749
color = Colors.gray(200),
4850
}) {
49-
const img = <img src={source ?? defaultAvatarImage} alt="사용자 사진" />;
51+
const [isLoading, setLoading] = useState(source ?? false);
52+
const handleImageLoad = () => {
53+
setLoading(false);
54+
};
55+
56+
const img = (
57+
<img
58+
src={source ?? defaultAvatarImage}
59+
alt="사용자 사진"
60+
onLoad={handleImageLoad}
61+
/>
62+
);
63+
5064
return source ? (
5165
<StyledAvatar $size={size} $color={color}>
52-
{img}
66+
<SkeletonLoading isLoading={isLoading}>{img}</SkeletonLoading>
5367
</StyledAvatar>
5468
) : (
5569
<StyledDefaultAvatar $size={size}>{img}</StyledDefaultAvatar>

src/components/badge/emoji-badge.jsx

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,43 @@ const Content = styled.div`
1919
font-weight: 400;
2020
line-height: 20px;
2121
22+
${({ $hidesCount }) =>
23+
$hidesCount
24+
? `
25+
&:hover {
26+
& > span:first-child {
27+
display: none;
28+
}
29+
30+
& > span:last-child {
31+
display: inline;
32+
}
33+
}
34+
35+
& > span:last-child {
36+
display: none;
37+
}
38+
`
39+
: ""};
40+
2241
${media.mobile} {
2342
gap: 6px;
2443
font-size: 14px;
2544
line-height: 20px;
2645
}
2746
`;
2847

29-
function EmojiBadge({ emoji, count }) {
48+
function EmojiBadge({ emoji, count, maxDigits }) {
49+
let hidesCount;
50+
if (maxDigits) {
51+
hidesCount = String(count).length > maxDigits;
52+
} else {
53+
hidesCount = false;
54+
}
55+
3056
return (
3157
<StyledEmojiBadge>
32-
<Content>
58+
<Content $hidesCount={hidesCount}>
3359
<span>{emoji}</span>
3460
<span>{count}</span>
3561
</Content>

0 commit comments

Comments
 (0)