Skip to content

Consolidate Note and Link editing into NoteModal #37

Description

@ryota-murakami

Summary

Currently, the RepoCard has two separate entry points for editing project metadata:

  1. Note Button → Opens NoteModal (Note editing only)
  2. Overflow Menu → "Edit Project Info…" → Opens ProjectInfoModal (Note + Links)

Since ProjectInfoModal is essentially NoteModal with Links added, there's no need to maintain two separate modals. The "Edit Project Info" menu item is redundant.

Proposal

Consolidate all functionality into a single modal accessed via the Note Button:

Before

RepoCard
├── Note Button → NoteModal (Note only)
└── Overflow Menu
    └── Edit Project Info… → ProjectInfoModal (Note + Links)

After

RepoCard
├── Note Button → ProjectInfoModal (Note + Links)  ← Unified
└── Overflow Menu
    └── [Remove "Edit Project Info…"]

Changes Required

1. Update RepoCard.tsx

  • Change onNote callback to open ProjectInfoModal instead of NoteModal
  • Or rename/merge the modals appropriately

2. Update OverflowMenu.tsx

  • Remove the "Edit Project Info…" menu item
  • Remove onEdit prop if no longer needed

3. Update KanbanBoard.tsx

  • Remove onEditProjectInfo prop handling
  • Update onNote to use ProjectInfoModal

4. Update/Remove Modals

  • Option A: Rename ProjectInfoModal to NoteModal and delete old NoteModal
  • Option B: Keep naming, just change which modal opens

5. Update Tests & Stories

  • NoteModal.stories.tsx, NoteModal.test.tsx
  • ProjectInfoModal.stories.tsx
  • E2E tests: note-modal.spec.ts, project-info-links.spec.ts

Benefits

  • Simpler UX: One entry point for all project metadata editing
  • Less code: Remove duplicate modal logic
  • Consistent mental model: "Note button = edit project info"

Related Files

  • components/Board/RepoCard.tsx (Note button)
  • components/Board/OverflowMenu.tsx (Edit Project Info menu)
  • components/Modals/NoteModal.tsx
  • components/Modals/ProjectInfoModal.tsx
  • components/Board/KanbanBoard.tsx
  • hooks/board/useNoteModal.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions