Skip to content

Commit 369c496

Browse files
author
iitzIrFan
committed
Add date-fns dependency and implement activity feed styles in Floating Contributors component
1 parent 944a36e commit 369c496

File tree

3 files changed

+485
-190
lines changed

3 files changed

+485
-190
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"canvas-confetti": "^1.9.3",
3737
"class-variance-authority": "^0.7.1",
3838
"clsx": "^2.1.1",
39+
"date-fns": "^4.1.0",
3940
"dotenv": "^16.5.0",
4041
"embla-carousel-autoplay": "^8.6.0",
4142
"embla-carousel-react": "^8.6.0",

src/components/FloatingContributors/FloatingContributors.css

Lines changed: 96 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,100 @@
4343
min-width: 400px;
4444
}
4545

46+
/* New activity feed styles */
47+
.contributors-activities {
48+
display: flex;
49+
flex-direction: column;
50+
gap: 8px;
51+
margin-top: 12px;
52+
max-height: 240px;
53+
overflow-y: auto;
54+
scrollbar-width: thin;
55+
scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
56+
}
57+
58+
.contributors-activities::-webkit-scrollbar {
59+
width: 4px;
60+
}
61+
62+
.contributors-activities::-webkit-scrollbar-track {
63+
background: transparent;
64+
}
65+
66+
.contributors-activities::-webkit-scrollbar-thumb {
67+
background-color: rgba(255, 255, 255, 0.2);
68+
border-radius: 4px;
69+
}
70+
71+
.contributor-activity-item {
72+
display: flex;
73+
align-items: center;
74+
padding: 8px 10px;
75+
border-radius: 10px;
76+
background-color: rgba(255, 255, 255, 0.08);
77+
transition: background-color 0.2s ease;
78+
}
79+
80+
.contributor-activity-item:hover {
81+
background-color: rgba(255, 255, 255, 0.12);
82+
}
83+
84+
.activity-item-avatar {
85+
margin-right: 12px;
86+
position: relative;
87+
}
88+
89+
.activity-item-img {
90+
width: 32px;
91+
height: 32px;
92+
border-radius: 50%;
93+
border: 2px solid rgba(255, 255, 255, 0.2);
94+
}
95+
96+
.activity-item-content {
97+
flex: 1;
98+
min-width: 0;
99+
}
100+
101+
.activity-item-user {
102+
display: flex;
103+
justify-content: space-between;
104+
align-items: center;
105+
}
106+
107+
.activity-item-username {
108+
font-weight: 600;
109+
font-size: 0.9rem;
110+
white-space: nowrap;
111+
overflow: hidden;
112+
text-overflow: ellipsis;
113+
color: rgba(255, 255, 255, 0.95);
114+
}
115+
116+
.activity-item-badge {
117+
background-color: rgba(59, 130, 246, 0.2);
118+
padding: 2px 6px;
119+
border-radius: 12px;
120+
font-size: 0.8rem;
121+
color: rgba(255, 255, 255, 0.9);
122+
}
123+
124+
.activity-item-action {
125+
font-size: 0.8rem;
126+
color: rgba(255, 255, 255, 0.7);
127+
margin-top: 2px;
128+
}
129+
130+
.activities-more {
131+
text-align: center;
132+
padding: 8px;
133+
font-size: 0.85rem;
134+
color: rgba(255, 255, 255, 0.7);
135+
background-color: rgba(255, 255, 255, 0.05);
136+
border-radius: 8px;
137+
margin-top: 4px;
138+
}
139+
46140
/* Header embedded version - larger size */
47141
.floating-contributors-container.header-embedded .floating-contributors-card {
48142
min-width: 450px;
@@ -414,7 +508,8 @@
414508
transform: translateX(-50%) translateY(-8px);
415509
}
416510

417-
.tooltip-name {
511+
.tooltip-name,
512+
.tooltip-username {
418513
font-weight: 600;
419514
margin-bottom: 2px;
420515
}

0 commit comments

Comments
 (0)