-
Notifications
You must be signed in to change notification settings - Fork 6
Move edit button bottom right #336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for graypaper-reader ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Warning Rate limit exceeded@chmurson has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 45 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (4)
📒 Files selected for processing (3)
WalkthroughThis PR bumps a shared-ui dependency, refactors note UI by adding a NoteContext and extracting NoteLayout components, adjusts note-related CSS and global textarea styling, updates label handling, increases a snapshot test wait timeout, and adds README guidance about snapshot updates. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User
participant NoteComp as Note.tsx
participant NoteCtx as NoteContext Provider
participant Layout as NoteLayout (Root/Text/TextArea/SelectedText)
participant Store as Note State
User->>NoteComp: open or select note
NoteComp->>NoteCtx: consume context (useNoteContext)
NoteComp->>Layout: render appropriate view (Text / TextArea / SelectedText)
User->>Layout: type or press keys (Ctrl/Cmd+Enter, Escape)
Layout->>NoteCtx: handleNoteContentChange / handleSaveClick / handleCancelClick
NoteCtx->>Store: update noteDirty / isEditing / persist via onEditNote
Store-->>NoteComp: state changes cause re-render
NoteComp->>Layout: reflect updated note state
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (1 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Visual Regression Test Report ✅ PassedGithub run id: 19048904357 🔗 Artifacts: Download |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/components/NoteManager/components/NoteContext.tsx (1)
5-15: Consider using PascalCase for the context name.The context is named
noteContext(lowercase), but React contexts conventionally use PascalCase (NoteContext). This improves consistency with React ecosystem conventions and enhances code readability.Apply this diff to align with naming conventions:
-export const noteContext = createContext<{ +export const NoteContext = createContext<{ note: IDecoratedNote; isEditable: boolean; handleEditClick: () => void; handleSaveClick: () => void; handleCancelClick: () => void; handleNoteContentChange: (ev: ChangeEvent<HTMLTextAreaElement>) => void; noteDirty: { content: string }; onEditNote: INotesContext["handleUpdateNote"]; isEditing: boolean; } | null>(null);Then update the hook accordingly:
export const useNoteContext = () => { - const context = useContext(noteContext); + const context = useContext(NoteContext); if (!context) { throw new Error("useNoteContext must be used within a NoteContextProvider"); } return context; };
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (13)
package-lock.jsonis excluded by!**/package-lock.jsontools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-after-note-activation-dark-mode-darwin.pngis excluded by!**/*.pngtools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-after-note-activation-dark-mode-linux.pngis excluded by!**/*.pngtools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-after-note-activation-light-mode-darwin.pngis excluded by!**/*.pngtools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-after-note-activation-light-mode-linux.pngis excluded by!**/*.pngtools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-after-note-edit-dark-mode-darwin.pngis excluded by!**/*.pngtools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-after-note-edit-dark-mode-linux.pngis excluded by!**/*.pngtools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-after-note-edit-light-mode-darwin.pngis excluded by!**/*.pngtools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-after-note-edit-light-mode-linux.pngis excluded by!**/*.pngtools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-initial-dark-mode-darwin.pngis excluded by!**/*.pngtools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-initial-dark-mode-linux.pngis excluded by!**/*.pngtools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-initial-light-mode-darwin.pngis excluded by!**/*.pngtools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-initial-light-mode-linux.pngis excluded by!**/*.png
📒 Files selected for processing (7)
package.json(1 hunks)src/components/NoteManager/NoteManager.css(1 hunks)src/components/NoteManager/components/Note.tsx(5 hunks)src/components/NoteManager/components/NoteContext.tsx(1 hunks)src/components/NoteManager/components/NoteLayout.tsx(1 hunks)src/index.css(0 hunks)tools/snapshot-tests/tests/basic-snapshots.spec.ts(1 hunks)
💤 Files with no reviewable changes (1)
- src/index.css
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{js,jsx,ts,tsx}
⚙️ CodeRabbit configuration file
When reviewing Tailwind CSS classes, ensure they follow Tailwind 4.x conventions and suggest modern 4.x alternatives for deprecated patterns.
Files:
src/components/NoteManager/components/NoteContext.tsxsrc/components/NoteManager/components/NoteLayout.tsxsrc/components/NoteManager/components/Note.tsxtools/snapshot-tests/tests/basic-snapshots.spec.ts
**/*.css
⚙️ CodeRabbit configuration file
Review CSS code with focus on Tailwind CSS 4.x best practices and conventions. Ensure compatibility with Tailwind 4.x features and syntax.
Files:
src/components/NoteManager/NoteManager.css
🧠 Learnings (3)
📓 Common learnings
Learnt from: chmurson
Repo: FluffyLabs/graypaper-reader PR: 330
File: src/components/Outline/OutlineLink.tsx:17-21
Timestamp: 2025-10-22T20:36:10.440Z
Learning: This repo targets React 19+; prefer passing refs as a normal prop to function components and avoid React.forwardRef in new code. File context: src/components/Outline/OutlineLink.tsx.
Learnt from: chmurson
Repo: FluffyLabs/graypaper-reader PR: 330
File: src/components/Outline/OutlineLink.tsx:17-21
Timestamp: 2025-10-22T20:36:10.440Z
Learning: Project targets React 19+; prefer passing refs as a regular prop in function components and avoid React.forwardRef in new code. File: src/components/Outline/OutlineLink.tsx.
📚 Learning: 2025-10-22T20:36:10.440Z
Learnt from: chmurson
Repo: FluffyLabs/graypaper-reader PR: 330
File: src/components/Outline/OutlineLink.tsx:17-21
Timestamp: 2025-10-22T20:36:10.440Z
Learning: This repo targets React 19+; prefer passing refs as a normal prop to function components and avoid React.forwardRef in new code. File context: src/components/Outline/OutlineLink.tsx.
Applied to files:
src/components/NoteManager/components/NoteContext.tsxsrc/components/NoteManager/components/NoteLayout.tsxsrc/components/NoteManager/components/Note.tsx
📚 Learning: 2025-10-22T20:36:10.440Z
Learnt from: chmurson
Repo: FluffyLabs/graypaper-reader PR: 330
File: src/components/Outline/OutlineLink.tsx:17-21
Timestamp: 2025-10-22T20:36:10.440Z
Learning: Project targets React 19+; prefer passing refs as a regular prop in function components and avoid React.forwardRef in new code. File: src/components/Outline/OutlineLink.tsx.
Applied to files:
src/components/NoteManager/components/NoteLayout.tsxsrc/components/NoteManager/components/Note.tsx
🧬 Code graph analysis (3)
src/components/NoteManager/components/NoteContext.tsx (2)
src/components/NotesProvider/types/DecoratedNote.ts (1)
IDecoratedNote(4-19)src/components/NotesProvider/NotesProvider.tsx (1)
INotesContext(20-40)
src/components/NoteManager/components/NoteLayout.tsx (4)
src/components/NoteManager/components/NoteContext.tsx (2)
useNoteContext(17-23)noteContext(5-15)src/components/NoteContent/NoteContent.tsx (1)
NoteContent(10-19)src/components/SelectionProvider/SelectionProvider.tsx (2)
SelectionContext(35-35)ISelectionContext(21-29)src/components/NoteManager/components/NoteLink.tsx (1)
NoteLink(16-135)
src/components/NoteManager/components/Note.tsx (2)
src/components/NoteManager/components/NoteLabels.tsx (1)
NoteLabels(9-17)src/components/NoteManager/components/NoteLayout.tsx (1)
NoteLayout(65-70)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: visual-tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
README.md(1 hunks)tools/snapshot-tests/tests/basic-snapshots.spec.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- tools/snapshot-tests/tests/basic-snapshots.spec.ts
🧰 Additional context used
🪛 LanguageTool
README.md
[locale-violation] ~55-~55: In American English, ‘afterward’ is the preferred variant. ‘Afterwards’ is more commonly used in British English and other dialects.
Context: ...e all the snapshots. You can compare it afterwards in your local Git GUI or Github web int...
(AFTERWARDS_US)
Summary by CodeRabbit
New Features
Style
Chores
Documentation
Tests