Commit 2cbb3a7
authored
feat: Add enhanced pin/unpin task feature with improved UX (#384)
* feat: Add enhanced pin/unpin task feature with improved UX
- Add clickable pin icon directly in task row for one-click pin/unpin
- Pinned tasks displayed with amber-colored filled pin icon
- Unpinned tasks show subtle pin icon on hover
- Add Pin/Unpin toggle button in task dialog footer as secondary option
- Implement sorting to show pinned tasks at top of list (above overdue tasks)
- Pinned tasks work within all filtered views (projects, tags, status, search)
- Store pinned task UUIDs in localStorage per user (using hashed keys)
- Add responsive mobile layout with 2-row design:
* Row 1: ID, Description, Project
* Row 2: Tags, Status, Pin button
- Increase task row height on mobile for better touch interaction
- No backend changes required (frontend-only feature)
Addresses PR feedback:
- Quick pin/unpin access without opening dialog
- Mobile-optimized layout prevents horizontal scrolling
- Pin icon clickable with stopPropagation to avoid opening dialog
* TC Passed
* feat: add task pinning functionality with localStorage persistence
- One-click pin/unpin toggle in task rows
- Pinned tasks stay at top of list across filters
- Comprehensive test coverage (39 new tests)
- Privacy-preserving storage with hashed keys
* Tests Restored
* Delete .github/.cursorrules
* test: add pin functionality tests for Tasks component
* Typo Fixed1 parent 544534e commit 2cbb3a7
7 files changed
Lines changed: 733 additions & 62 deletions
File tree
- frontend/src/components
- HomeComponents/Tasks
- __tests__
- utils
Lines changed: 97 additions & 54 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| 75 | + | |
| 76 | + | |
73 | 77 | | |
74 | 78 | | |
75 | 79 | | |
| |||
199 | 203 | | |
200 | 204 | | |
201 | 205 | | |
202 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
203 | 210 | | |
204 | 211 | | |
205 | 212 | | |
| |||
211 | 218 | | |
212 | 219 | | |
213 | 220 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
267 | 292 | | |
268 | 293 | | |
269 | 294 | | |
| |||
1688 | 1713 | | |
1689 | 1714 | | |
1690 | 1715 | | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
1691 | 1734 | | |
1692 | 1735 | | |
1693 | 1736 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| 108 | + | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| |||
201 | 204 | | |
202 | 205 | | |
203 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
204 | 212 | | |
205 | 213 | | |
206 | 214 | | |
| |||
479 | 487 | | |
480 | 488 | | |
481 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
482 | 496 | | |
483 | 497 | | |
484 | 498 | | |
| |||
739 | 753 | | |
740 | 754 | | |
741 | 755 | | |
742 | | - | |
| 756 | + | |
743 | 757 | | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
744 | 765 | | |
745 | 766 | | |
746 | 767 | | |
| 768 | + | |
747 | 769 | | |
748 | 770 | | |
749 | 771 | | |
| |||
795 | 817 | | |
796 | 818 | | |
797 | 819 | | |
798 | | - | |
| 820 | + | |
799 | 821 | | |
800 | | - | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
801 | 830 | | |
802 | 831 | | |
803 | 832 | | |
| |||
1218 | 1247 | | |
1219 | 1248 | | |
1220 | 1249 | | |
| 1250 | + | |
| 1251 | + | |
1221 | 1252 | | |
1222 | 1253 | | |
1223 | 1254 | | |
| |||
0 commit comments