Commit 644ae7e
authored
fix(theme): case-insensitive theme matching for streak and wrapped pages (JhaSourav07#2180)
## Description
Fixes JhaSourav07#2032
This PR implements **Case-Insensitive Theme Preset Matching** across the
CommitPulse schema validators and API routes.
## Pillar
- [ ] 🎨 Pillar 1 — New Theme Design
- [ ] 📐 Pillar 2 — Geometric SVG Improvement
- [ ] 🕐 Pillar 3 — Timezone Logic Optimization
- [x ] 🛠️ Other (Bug fix, refactoring, docs)
## Visual Preview
Querying `?theme=NEON` or other capitalized variants now successfully
maps to the gorgeous neon theme rather than failing registry lookup and
falling back to default.
<img width="1172" height="875" alt="image"
src="https://github.com/user-attachments/assets/27bfa584-3de8-43ea-8c4f-7ed86bbf77b4"
/>
## Checklist before requesting a review:
- [x] I have read the `CONTRIBUTING.md` file.
- [x] I have tested these changes locally
(`localhost:3000/api/streak?user=YOUR_USERNAME`).
- [x] I have run `npm run format` and `npm run lint` locally and
resolved all errors (CI will fail otherwise).
- [x] My commits follow the Conventional Commits format (e.g.,
`feat(themes): ...`, `fix(calculate): ...`).
- [ ] I have updated `README.md` if I added a new theme or URL
parameter.
- [x] I have started the repo.
- [x] I have made sure that i have only one commit to merge in this PR.
- [x] The SVG output matches the CommitPulse "premium quality" aesthetic
standard (no raw elements, smooth animations, correct fonts).
- [ ] (Recommended) I joined the CommitPulse Discord community for
contributor discussions, mentorship, and faster PR support.4 files changed
Lines changed: 54 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
840 | 856 | | |
841 | 857 | | |
842 | 858 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1082 | 1082 | | |
1083 | 1083 | | |
1084 | 1084 | | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
| 1085 | + | |
| 1086 | + | |
1091 | 1087 | | |
1092 | 1088 | | |
1093 | | - | |
| 1089 | + | |
1094 | 1090 | | |
1095 | | - | |
1096 | | - | |
1097 | | - | |
1098 | | - | |
1099 | | - | |
1100 | | - | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
1104 | | - | |
1105 | | - | |
1106 | | - | |
1107 | | - | |
1108 | | - | |
1109 | | - | |
1110 | | - | |
1111 | | - | |
1112 | | - | |
1113 | | - | |
1114 | | - | |
1115 | | - | |
1116 | | - | |
1117 | | - | |
1118 | 1091 | | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
1119 | 1095 | | |
1120 | 1096 | | |
1121 | | - | |
| 1097 | + | |
1122 | 1098 | | |
1123 | 1099 | | |
1124 | | - | |
| 1100 | + | |
1125 | 1101 | | |
1126 | | - | |
1127 | 1102 | | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
1128 | 1107 | | |
1129 | 1108 | | |
1130 | | - | |
| 1109 | + | |
1131 | 1110 | | |
1132 | 1111 | | |
1133 | | - | |
| 1112 | + | |
1134 | 1113 | | |
1135 | | - | |
1136 | 1114 | | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
1137 | 1118 | | |
1138 | 1119 | | |
1139 | | - | |
| 1120 | + | |
1140 | 1121 | | |
1141 | 1122 | | |
| 1123 | + | |
1142 | 1124 | | |
1143 | | - | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
1147 | | - | |
| 1125 | + | |
1148 | 1126 | | |
1149 | 1127 | | |
1150 | 1128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
| |||
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
115 | 130 | | |
116 | 131 | | |
117 | | - | |
118 | 132 | | |
119 | 133 | | |
120 | 134 | | |
| |||
446 | 460 | | |
447 | 461 | | |
448 | 462 | | |
449 | | - | |
| 463 | + | |
450 | 464 | | |
451 | 465 | | |
452 | 466 | | |
| |||
0 commit comments