Skip to content

Redesign contact page with activity stream, avatar picker, and layout fixes#20

Merged
bashar-qassis merged 5 commits intomainfrom
feature/contact-page-redesign
Apr 4, 2026
Merged

Redesign contact page with activity stream, avatar picker, and layout fixes#20
bashar-qassis merged 5 commits intomainfrom
feature/contact-page-redesign

Conversation

@bashar-qassis
Copy link
Copy Markdown
Owner

@bashar-qassis bashar-qassis commented Apr 3, 2026

Summary

Redesigns the contact detail page with a modern layout and fixes several UX issues:

  • Hero banner with avatar, name, tags, upcoming reminders, and action buttons
  • Grouped sidebar — 4 core cards (Basic Info, Contact, Relationships, About) + collapsible "More" drawer (Reminders, Pets, Debts)
  • Unified activity stream replacing 8 separate tabs — chronological timeline with color-coded type badges, multi-select filtering, and modal CRUD
  • Mobile responsive — sidebar sections become horizontal scrollable tabs below lg breakpoint

What changed

New features

  • ActivityStream context with unified timeline queries across 8 entry types (notes, calls, life events, activities, tasks, gifts, conversations, photos)
  • ActivityStreamComponent — timeline UI with filtering, quick-add buttons, overflow menu, and modal forms for creating/editing entries
  • AboutComponent — inline editing for description + "How We Met" fields with searchable contact picker
  • RemindersComponent — full CRUD with inline sidebar form (create + delete)
  • Clickable avatar — hover overlay with camera icon opens a popover to upload a new photo or pick from existing photos

Layout & UX fixes

  • Widened desktop sidebar (300px → 340px) to reduce empty canvas space
  • Fixed mobile alignment — activity stream now matches contact info box width
  • Added proper spacing between sidebar labels and values (gap-4, text-end, truncate)
  • Replaced photo upload redirect with inline upload modal

Bug fixes

  • Phone import: removed US/Canada bias — bare 10-digit numbers are no longer assumed to be +1
  • Fixed edit page save crash caused by invalid audit log event name

Modified files

Area Files
Domain contacts/phone_formatter.ex, contacts/activity_stream.ex
LiveView contact_live/show.ex, show.html.heex, edit.ex
Components ActivityStreamComponent, AboutComponent, RemindersComponent, ContactFieldsComponent, RelationshipsComponent
Shared UI ui.ex — new helpers (simple_form, badge, button, empty_state)
Tests phone_formatter_test.exs, edit_test.exs, show page tests, activity stream tests

Test plan

  • mix test — 1041 tests, 0 failures
  • mix compile --warnings-as-errors — clean
  • mix format — clean
  • Visual check: desktop and mobile views with rich contact data
  • Playwright E2E for contact page navigation

- Fix edit page save crash: use :contact_updated atom instead of
  invalid "Contact updated" string for audit log event
- Replace photo upload redirect with inline upload form in timeline
  modal using LiveView file uploads
- Add full CRUD to RemindersComponent with inline form for creating
  and deleting reminders from the sidebar
- Add AboutComponent with inline editing for description and
  "how we met" fields, including searchable contact picker with avatars
- Fix dialyzer opaque type warning in photos_only? helper
- Add automated tests for edit save, birthday badge, reminders,
  and photo upload modal
- Add ActivityStream context for unified timeline queries across
  notes, calls, life events, activities, tasks, gifts, conversations,
  and photos
- Add UI component helpers (simple_form, badge, button, empty_state)
- Redesign ContactFieldsComponent with compact sidebar styling
- Redesign RelationshipsComponent with searchable contact picker
- Add ActivityStream context tests
Incorporate phone_format support from PR #18 (monica-api-import)
into the redesigned contact page layout. Keep redesigned UI as
the canonical version, add phone_format prop to ContactFieldsComponent
in both desktop and mobile views.
- Remove +1 country code assumption for bare 10-digit phone numbers
- Widen desktop sidebar (300→340px) to reduce empty space
- Fix mobile timeline/contact-info alignment with overflow control
- Add gap and truncation to sidebar label/value rows
- Add clickable avatar overlay with upload and photo picker popover
@bashar-qassis bashar-qassis changed the title feat: redesign contact page with unified activity stream Redesign contact page with activity stream, avatar picker, and layout fixes Apr 4, 2026
@bashar-qassis bashar-qassis merged commit 3afb34d into main Apr 4, 2026
4 checks passed
@bashar-qassis bashar-qassis deleted the feature/contact-page-redesign branch April 4, 2026 00:07
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