Skip to content

Conversation

@chmurson
Copy link
Collaborator

@chmurson chmurson commented Nov 16, 2025

What?

Edit button moved to the same line as lables

Before
Screenshot 2025-11-16 at 17 57 38

After
Screenshot 2025-11-16 at 17 56 56

Summary by CodeRabbit

  • Style
    • Improved layout alignment and responsive behavior in the note editing interface, enhancing the arrangement of editing controls and labels for better visual consistency.

@chmurson chmurson marked this pull request as ready for review November 16, 2025 16:58
@netlify
Copy link

netlify bot commented Nov 16, 2025

Deploy Preview for graypaper-reader ready!

Name Link
🔨 Latest commit 7ddbb04
🔍 Latest deploy log https://app.netlify.com/projects/graypaper-reader/deploys/691a02c207c6110008e295ed
😎 Deploy Preview https://deploy-preview-340--graypaper-reader.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link

coderabbitai bot commented Nov 16, 2025

Walkthrough

The active note editing view layout has been refactored to wrap the Labels component and edit button together in a flex container with justified spacing and alignment constraints. Additionally, the NoteLabels component received a min-w-0 class to refine flex item sizing behavior.

Changes

Cohort / File(s) Change Summary
Active Note Layout Refactoring
src/components/NoteManager/components/Note.tsx
Wrapped Labels and edit button in a single flex container with justify-between, items-end, and max-w-[100%] constraints; edit button remains conditionally rendered within the new wrapper
NoteLabels Flex Sizing
src/components/NoteManager/components/NoteLabels.tsx
Added min-w-0 class to the outer div to refine flex item sizing and overflow behavior

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Changes are cosmetic and CSS-focused (Tailwind class adjustments)
  • No business logic or data flow modifications
  • Straightforward JSX restructuring within a single component
  • Both files are closely related and follow a consistent pattern

Possibly related PRs

  • PR #336: Modifies the same Note UI components—repositioning the edit button and adjusting layout in Note.tsx and NoteLabels.tsx.
  • PR #338: Changes Note labels UI with layout and label-rendering behavior updates in the same component files.
  • PR #331: Reworks the active-note rendering structure that this PR's layout changes affect, including edit-button and header rendering positioning.

Poem

🐰 With labels and buttons aligned just right,
A flex container brings visual delight,
Min-width-zero for overflow grace,
Each note finds its perfect place! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The pull request title accurately describes the main change: moving the edit button to the same line as labels, which aligns with the file-level summaries and PR objectives.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch move-edit-button-together-with-lables

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

Visual Regression Test Report ✅ Passed

Github run id: 19408963018

🔗 Artifacts: Download

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/components/NoteManager/components/Note.tsx (1)

162-174: Layout achieves objective; prefer standard Tailwind utility.

The flex container successfully places the Edit button on the same line as labels. The nested wrapper with flex-1 ensures the button stays at the far right regardless of label count.

Consider using the standard Tailwind utility instead of arbitrary value syntax:

-<div className="flex justify-between items-end max-w-[100%]">
+<div className="flex justify-between items-end max-w-full">

Based on learnings

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5768830 and 7ddbb04.

⛔ Files ignored due to path filters (22)
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/homepage-outline-dark-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/homepage-outline-light-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-after-note-edit-dark-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/notes-tab-after-note-edit-light-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/search-initial-dark-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/search-initial-light-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/search-with-query-dark-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/search-with-query-light-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/search-with-results-dark-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/search-with-results-light-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/topbar-github-expanded-dark-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/topbar-github-expanded-light-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/topbar-github-option-hover-dark-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/topbar-github-option-hover-light-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/topbar-more-clicked-dark-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/topbar-more-clicked-light-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/topbar-notes-dropdown-dark-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/topbar-notes-dropdown-light-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/topbar-notes-selected-off-dark-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/topbar-notes-selected-off-light-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/topbar-notes-selected-on-dark-mode-linux.png is excluded by !**/*.png
  • tools/snapshot-tests/tests/basic-snapshots.spec.ts-snapshots/topbar-notes-selected-on-light-mode-linux.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • src/components/NoteManager/components/Note.tsx (1 hunks)
  • src/components/NoteManager/components/NoteLabels.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{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/Note.tsx
  • src/components/NoteManager/components/NoteLabels.tsx
🧠 Learnings (3)
📚 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/Note.tsx
  • src/components/NoteManager/components/NoteLabels.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/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: Tailwind CSS v4 is used; avoid non-default width utilities like border-b-1 unless configured. Prefer border-b (1px) or border-b-[1px]. File context: src/components/Outline/OutlineLink.tsx.

Applied to files:

  • src/components/NoteManager/components/NoteLabels.tsx
🧬 Code graph analysis (1)
src/components/NoteManager/components/Note.tsx (2)
src/components/NoteManager/components/NoteLayout.tsx (1)
  • NoteLayout (65-71)
src/components/NoteManager/components/SiimpleComponents/TinyIconButton.tsx (1)
  • TinyIconButton (4-25)
⏰ 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
🔇 Additional comments (1)
src/components/NoteManager/components/NoteLabels.tsx (1)

17-17: LGTM! Essential for flex overflow behavior.

The min-w-0 addition allows this flex item to shrink below its content size, preventing overflow when the parent container uses justify-between (as seen in Note.tsx). This is a necessary adjustment for the new layout.

@chmurson chmurson changed the title fix: snapshot feat: note - move edit button to the line with labels Nov 16, 2025
@chmurson chmurson merged commit e87b1ae into main Nov 16, 2025
9 checks passed
@chmurson chmurson deleted the move-edit-button-together-with-lables branch November 16, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant