Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 2, 2025

Adds ability to pin notes for quick access. Pinned notes appear in a dedicated page accessible from the main menu and link back to their original day.

Changes

Data Model

  • Added IsPinned boolean to DataPoint with EF Core migration
  • Pin state persists via existing page lifecycle hooks (navigation, deactivation, disposal)

UI Components

  • Pin button in note view (color indicates pin state)
  • PinnedNotesPage lists all pinned notes, ordered by date then creation time
  • "Pinned notes" menu item in main dots menu
  • Clicking pinned note navigates to origin day with scroll-to-note via query param

Implementation Notes

  • SQLite DateTimeOffset ordering done client-side to avoid query translation issues
  • Follows existing patterns: UI changes saved via page SaveState() lifecycle
  • 3 new tests covering pin/unpin, display, and empty state
// Pin button in DataPointView.razor
<MudIconButton Icon="@Icons.Material.Rounded.PushPin"
               Color="@(Point.IsPinned ? Color.Primary : Color.Default)"
               OnClick="TogglePin" />

// Navigation from pinned note
NavigationManager.NavigateTo($"/{date:yyyyMMdd}?scrollToNote={note.Guid}");
Original prompt

This section details on the original issue you should resolve

<issue_title>Pinned notes</issue_title>
<issue_description>Show a pin icon button next to the edit button. Clicking that will mark it as pinned.

Pinned notes will show up in a separate "Pinned notes" page found in the dots menu.
Clicking a note in there will take you back to that day and scroll to that note.

Pins are saved between launches.
Pins are ordered by the date of the note itself.</issue_description>

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


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add pin feature for notes with separate page Add pinned notes feature Nov 2, 2025
Copilot AI requested a review from danielchalmers November 2, 2025 06:33
Copilot finished work on behalf of danielchalmers November 2, 2025 06:33
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.

Pinned notes

2 participants