Skip to content

Commit 6834f3b

Browse files
Merge pull request #5042 from OneCommunityGlobal/vinay_k_radar_chart
Vinay K Radar Chart
2 parents 7370b66 + ab7d128 commit 6834f3b

8 files changed

Lines changed: 177 additions & 16 deletions

File tree

src/components/HGNSkillsDashboard/SkillsProfilePage/components/RadarChart.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ function RadarChart({ profileData, compact = true, onSkillsDataReady }) {
310310
},
311311
weight: '500',
312312
},
313-
color: darkMode ? '#e6e6e6' : compact ? '#555' : '#333',
313+
color: darkMode ? '#e2e8f0' : compact ? '#555' : '#333',
314314
padding: compact ? 10 : 15,
315315
callback: function(value) {
316316
if (window.innerWidth < 600 && value.length > 15) {

src/components/HGNSkillsDashboard/SkillsProfilePage/styles/LeftSection.module.css

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
color: #1f2937 !important;
2525
text-shadow: none !important;
2626
filter: none !important;
27+
overflow-wrap: break-word;
28+
word-break: break-all;
29+
max-width: 100%;
30+
hyphens: auto;
2731
}
2832

2933
/* Job title */
@@ -38,9 +42,10 @@
3842
@media (width <= 768px) {
3943
.leftSection {
4044
width: 100%;
41-
padding: 16px 0 12px;
42-
flex-direction: row;
45+
padding: 16px 10px 12px;
46+
flex-flow: row wrap;
4347
gap: 20px;
48+
justify-content: center;
4449
}
4550

4651
.userName,
@@ -49,6 +54,27 @@
4954
}
5055
}
5156

57+
@media (width <= 480px) {
58+
.leftSection {
59+
flex-direction: column;
60+
padding: 12px 8px;
61+
gap: 10px;
62+
}
63+
64+
.userName {
65+
font-size: 1.2rem;
66+
}
67+
68+
.jobTitle {
69+
font-size: 0.9rem;
70+
}
71+
72+
.profilePic {
73+
width: 80px;
74+
height: 80px;
75+
}
76+
}
77+
5278
:global(.dark-mode) .leftSection {
5379
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
5480
border-color: #303030;

src/components/HGNSkillsDashboard/SkillsProfilePage/styles/RadarChart.module.css

Lines changed: 79 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44
flex-direction: column;
55
justify-content: center;
66
align-items: center;
7-
padding: 10px 0;
8-
margin: 0 auto;
9-
max-width: 720px;
10-
width: 100%;
7+
padding: 18px;
8+
background: linear-gradient(145deg, #fff 0%, #f8f9fa 100%);
9+
border-radius: 12px;
10+
box-shadow: 0 4px 20px rgb(0 0 0 / 8%);
11+
border: 1px solid rgb(62 160 203 / 10%);
12+
min-height: 420px;
13+
max-height: 500px;
14+
position: relative;
1115
}
1216

1317
.radarChart.compact {
@@ -43,7 +47,7 @@
4347

4448
.chartContainer {
4549
width: 100%;
46-
max-width: clamp(300px, 42vw, 520px); /* reduced overall footprint */
50+
max-width: clamp(280px, 38vw, 460px);
4751
aspect-ratio: 1 / 1;
4852
height: auto;
4953
position: relative;
@@ -132,8 +136,50 @@
132136
}
133137

134138
@media (width <= 480px) {
135-
.radarChart canvas {
136-
max-height: 380px;
139+
.radarChart {
140+
padding: 8px;
141+
min-height: 320px;
142+
width: 100%;
143+
box-sizing: border-box;
144+
}
145+
146+
.chartTitle h4 {
147+
font-size: 16px;
148+
}
149+
150+
.chartTitle p {
151+
font-size: 11px;
152+
}
153+
154+
.chartContainer {
155+
max-width: 100%;
156+
width: 100%;
157+
}
158+
159+
.chartLegend {
160+
flex-direction: column;
161+
gap: 8px;
162+
margin-top: 12px;
163+
}
164+
165+
.legendItem {
166+
font-size: 11px;
167+
}
168+
169+
.legendColor {
170+
width: 14px;
171+
height: 14px;
172+
}
173+
}
174+
175+
@media (width <= 360px) {
176+
.radarChart {
177+
padding: 5px;
178+
min-height: 280px;
179+
}
180+
181+
.chartTitle h4 {
182+
font-size: 14px;
137183
}
138184
}
139185

@@ -144,7 +190,7 @@
144190
}
145191
}
146192

147-
/* Dark theme support (optional) */
193+
/* Dark theme support */
148194
.dark {
149195
background: #1f1f1f;
150196
border-color: #2a2a2a;
@@ -168,3 +214,28 @@
168214
border-color: rgb(62 160 203 / 30%);
169215
box-shadow: 0 4px 20px rgb(0 0 0 / 30%);
170216
}
217+
218+
:global(.dark-mode) .chartTitle h4 {
219+
color: #63b3ed;
220+
}
221+
222+
:global(.dark-mode) .chartTitle p {
223+
color: #a0aec0;
224+
}
225+
226+
:global(.dark-mode) .legendItem {
227+
color: #e2e8f0;
228+
}
229+
230+
:global(.dark-mode) .loadingSpinner {
231+
border-color: rgb(62 160 203 / 30%);
232+
border-left-color: #63b3ed;
233+
}
234+
235+
:global(.dark-mode) .errorState h4 {
236+
color: #ff6b6b;
237+
}
238+
239+
:global(.dark-mode) .errorState p {
240+
color: #a0aec0;
241+
}

src/components/HGNSkillsDashboard/SkillsProfilePage/styles/RightSection.module.css

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,28 @@ h3 {
3232

3333
@media (width <= 768px) {
3434
.rightSection {
35-
padding: 0 0 10px;
35+
width: 100%;
36+
padding: 0;
37+
overflow-x: hidden;
38+
}
39+
40+
.skillsAndChart {
41+
flex-direction: column;
42+
gap: 16px;
43+
width: 100%;
3644
}
3745
.skillsAndChart > *:first-child { flex: 0 0 auto; }
46+
47+
.skillsAndChart > *:last-child {
48+
width: 100%;
49+
max-width: 100%;
50+
}
51+
}
52+
53+
@media (width <= 480px) {
54+
.skillsAndChart {
55+
gap: 12px;
56+
}
3857
}
3958

4059
:global(.dark-mode) h3 {

src/components/HGNSkillsDashboard/SkillsProfilePage/styles/Skills.module.css

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,33 @@
4848
@media (width <= 768px) {
4949
.skills {
5050
width: 100%;
51-
flex-direction: column;
51+
flex-flow: row wrap;
5252
align-items: center;
53+
justify-content: center;
54+
gap: 8px;
5355
}
5456

5557
.skills button {
56-
width: 100%;
57-
max-width: 80%;
58+
width: auto;
59+
max-width: none;
5860
font-size: 14px;
61+
padding: 8px 12px;
62+
}
63+
64+
.skills h3 {
65+
width: 100%;
66+
text-align: center;
67+
}
68+
}
69+
70+
@media (width <= 480px) {
71+
.skills {
72+
gap: 6px;
73+
}
74+
75+
.skills button {
76+
font-size: 13px;
77+
padding: 6px 10px;
5978
}
6079
}
6180

src/components/HGNSkillsDashboard/SkillsProfilePage/styles/UserSkillsProfile.module.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,23 @@
5454
display: flex;
5555
flex-direction: column;
5656
padding: 18px 16px;
57+
width: 100%;
58+
box-sizing: border-box;
59+
}
60+
61+
.userProfileHome {
62+
padding: 10px;
63+
overflow-x: hidden;
64+
}
65+
}
66+
67+
@media (width <= 480px) {
68+
.dashboardContainer {
69+
padding: 12px 10px;
70+
}
71+
72+
.userProfileHome {
73+
padding: 5px;
5774
}
5875
}
5976

vite.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,13 @@ export default defineConfig(({ mode }) => {
4141
}),
4242
],
4343
optimizeDeps: {
44-
include: ['react-popper', 'react-datepicker', 'react-tooltip', 'react-bootstrap'],
44+
include: [
45+
'react-popper',
46+
'react-datepicker',
47+
'react-tooltip',
48+
'react-bootstrap',
49+
'libphonenumber-js/max',
50+
],
4551
force: true, // force re-bundle after cache issues; set to false once deps load
4652
},
4753
};

vitest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@ export default defineConfig({
1818
environment: 'jsdom',
1919
globals: true,
2020
setupFiles: [resolve(__dirname, 'src/setupTests.js')],
21+
deps: {
22+
inline: ['libphonenumber-js'],
23+
},
2124
},
2225
});

0 commit comments

Comments
 (0)