Skip to content

Add Notes feature#39

Merged
JoeProgrammer88 merged 3 commits intomainfrom
copilot/add-note-feature
Mar 5, 2026
Merged

Add Notes feature#39
JoeProgrammer88 merged 3 commits intomainfrom
copilot/add-note-feature

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 5, 2026

Users need a way to create, view, edit, and delete multiple freeform notes within the app.

Storage (src/storage.ts)

  • New Note interface: id, title, content, createdDate, updatedDate?
  • notes: Note[] added to AppData (initialized empty)
  • CRUD methods: addNote, updateNote, deleteNote, getNotes — notes sorted by most recently updated

UI (index.html)

  • "📝 Notes" nav tab
  • Card-grid notes list with + Add Note button
  • Modal with title input + textarea for content; supports add/edit/delete

App logic (src/app.ts)

  • currentEditingNoteId state, event listeners wired to new buttons
  • renderNotes, renderNoteItem, openNoteModal, closeNoteModal, saveNote, deleteNote
  • HTML in rendered note titles and previews escaped via existing escapeHtml to prevent XSS

Styles (css/styles.css)

  • Responsive card-grid layout for note cards with hover effects

Tests (tests/storage.test.ts)

  • 7 unit tests covering CRUD, default values, sort order, and updatedDate stamping
Original prompt

This section details on the original issue you should resolve

<issue_title>Add note feature</issue_title>
<issue_description>Users would like a new feature in the app to type notes. Multiple notes should be supported and the user can delete individual notes when needed</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits March 5, 2026 01:54
Co-authored-by: JoeProgrammer88 <7156063+JoeProgrammer88@users.noreply.github.com>
Co-authored-by: JoeProgrammer88 <7156063+JoeProgrammer88@users.noreply.github.com>
Copilot AI changed the title [WIP] Add note feature to support multiple notes Add Notes feature Mar 5, 2026
@JoeProgrammer88 JoeProgrammer88 marked this pull request as ready for review March 5, 2026 02:01
@JoeProgrammer88 JoeProgrammer88 merged commit af1f861 into main Mar 5, 2026
1 check passed
@JoeProgrammer88 JoeProgrammer88 deleted the copilot/add-note-feature branch March 5, 2026 02:03
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.

Add note feature

2 participants