Skip to content

feat: implement habit detail view with participant activity#153

Merged
owengretzinger merged 1 commit intomainfrom
01-11-feat_view_habit_page_ability_to_view_everyone_s_entries
Jan 27, 2025
Merged

feat: implement habit detail view with participant activity#153
owengretzinger merged 1 commit intomainfrom
01-11-feat_view_habit_page_ability_to_view_everyone_s_entries

Conversation

@owengretzinger
Copy link
Collaborator

@owengretzinger owengretzinger commented Jan 11, 2025

TL;DR

Added a detailed habit view screen showing all participants' completions and activity history.

Screen.Recording.2025-01-11.at.2.20.58.PM-1.mov

What changed?

  • Created a new habit view screen with participant activity feed
  • Added support for viewing historical habit completions across all dates
  • Implemented day navigation to browse through completion history
  • Added ability to modify entries, add notes, and view images
  • Created new hooks for fetching all users' habit completions
  • Added UI components for displaying user entries and completion status

How to test?

  1. Navigate to a habit from the habits list
  2. Verify the habit details and participant list are displayed
  3. Use day navigation to browse through different dates
  4. Test modifying your own entries using the modify button
  5. Verify other participants' entries and completion status are shown
  6. Check that the nudge button appears for incomplete entries on the current day

@owengretzinger owengretzinger changed the title feat: view habit page; ability to view everyone's entries feat: implement habit detail view with participant activity Jan 11, 2025
@owengretzinger owengretzinger force-pushed the 01-11-feat_view_habit_page_ability_to_view_everyone_s_entries branch from 361b840 to 6a8ce4d Compare January 11, 2025 19:15
@owengretzinger owengretzinger marked this pull request as ready for review January 11, 2025 19:22
@graphite-app graphite-app bot requested a review from AnkushSarkar10 January 11, 2025 19:22
@graphite-app
Copy link

graphite-app bot commented Jan 11, 2025

Graphite Automations

"Request reviewers once CI passes" took an action on this PR • (01/11/25)

1 reviewer was added to this PR based on Owen Gretzinger's automation.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 9 changed files in this pull request and generated no comments.

Files not reviewed (4)
  • src/components/habit-card.tsx: Evaluated as low risk
  • src/app/habits/view-habit.tsx: Evaluated as low risk
  • src/components/modify-habit-entry/index.tsx: Evaluated as low risk
  • src/components/user-card.tsx: Evaluated as low risk
Comments suppressed due to low confidence (2)

src/api/habits/use-habit-completions.tsx:80

  • Mutating the currentDate variable within the loop can lead to unexpected behavior if the function is called multiple times in quick succession. Consider creating a new Date object for each iteration.
currentDate.setDate(currentDate.getDate() + 1);

src/api/habits/use-habit-completions.tsx:66

  • [nitpick] The error message 'Participant not found' could be more descriptive. Consider including the participant ID in the message for better debugging.
throw new Error('Participant not found');

@owengretzinger owengretzinger force-pushed the 01-11-feat_view_habit_page_ability_to_view_everyone_s_entries branch from 6a8ce4d to e6ff703 Compare January 11, 2025 21:26
@owengretzinger owengretzinger changed the base branch from 01-11-refactor_rename_mostrecentcompletiondate_to_lastactivity to graphite-base/153 January 27, 2025 07:45
@owengretzinger owengretzinger force-pushed the 01-11-feat_view_habit_page_ability_to_view_everyone_s_entries branch from e6ff703 to 800623e Compare January 27, 2025 07:45
@owengretzinger owengretzinger changed the base branch from graphite-base/153 to main January 27, 2025 07:46
@owengretzinger owengretzinger force-pushed the 01-11-feat_view_habit_page_ability_to_view_everyone_s_entries branch from 800623e to fbc39f4 Compare January 27, 2025 07:46
@owengretzinger owengretzinger merged commit d5bbc80 into main Jan 27, 2025
2 checks passed
Copy link
Collaborator Author

Merge activity

  • Jan 27, 2:53 AM EST: A user merged this pull request with Graphite.

@owengretzinger owengretzinger deleted the 01-11-feat_view_habit_page_ability_to_view_everyone_s_entries branch January 27, 2025 07:53
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.

3 participants