fix: update masonry grid sizing logic and notebook list padding

This commit is contained in:
Sepehr Ramezani
2026-02-14 14:20:32 +01:00
parent a0ffc9043b
commit 8f9031f076
580 changed files with 9789 additions and 42619 deletions

View File

@@ -1,6 +1,6 @@
# Story 9.1: Add Favorites Section
Status: review
Status: done
## Story
@@ -316,3 +316,35 @@ Definition of Done: PASS
**If PASS:** Story is fully ready for code review and production consideration
## Senior Developer Review (AI)
**Review Date:** 2026-02-12
**Reviewer:** AI Code Review (BMAD)
**Status:** ✅ APPROVED with fixes applied
### Issues Found and Fixed
| Severity | Issue | Location | Fix Applied |
|----------|-------|----------|-------------|
| HIGH | Hardcoded French strings in toast messages | note-card.tsx:216-219 | ✅ Used i18n `t()` function |
| HIGH | Missing aria-label and keyboard support | favorites-section.tsx:24-43 | ✅ Added aria-label and onKeyDown handler |
| MEDIUM | Fragile test selectors | tests/*.spec.ts | ✅ Added `data-testid="pin-button"` |
| MEDIUM | Inefficient server-side filtering | notes.ts:779 | ✅ Added `notebookId` parameter to `getPinnedNotes()` |
| MEDIUM | Flaky waitForTimeout in tests | tests/*.spec.ts | ✅ Replaced with proper Playwright assertions |
| LOW | No loading state | favorites-section.tsx | ✅ Added skeleton loading state |
### Files Modified in Review
- `keep-notes/components/favorites-section.tsx` - Added loading state, keyboard accessibility, aria-label
- `keep-notes/components/note-card.tsx` - Fixed i18n, added data-testid
- `keep-notes/app/actions/notes.ts` - Added notebookId parameter to getPinnedNotes
- `keep-notes/app/(main)/page.tsx` - Use server-side filtering for pinned notes
- `keep-notes/tests/favorites-section.spec.ts` - Improved test reliability and added collapse test
### Acceptance Criteria Validation
1. ✅ Display a "Favorites" or "Pinned" section at the top - IMPLEMENTED
2. ✅ Show all pinned notes in this section - IMPLEMENTED with server-side filtering
3. ✅ Allow quick access to pinned notes - IMPLEMENTED via NoteCard click
4. ✅ Visually distinguish pinned notes - IMPLEMENTED with pin icon and section header