Skip to content

fix: fixed events on chart, chart modal, added datepicker to events#14

Merged
bigMackD merged 1 commit intomainfrom
fix/events-chart-improvments
Nov 9, 2025
Merged

fix: fixed events on chart, chart modal, added datepicker to events#14
bigMackD merged 1 commit intomainfrom
fix/events-chart-improvments

Conversation

@bigMackD
Copy link
Copy Markdown
Owner

@bigMackD bigMackD commented Nov 9, 2025

Dashboard: event creation time, chart overlays, and close behavior fixes

Summary

This PR improves event creation and dashboard usability:

  • Users can backfill events with a chosen date & time.
  • Chart overlays now have distinct legend entries/colors per event type with correct timestamps.
  • Add Event modal and Event Details drawer reliably close.
  • History and chart refresh after creating an event.

Changes

  • Add Event modal
    • Added Date & Time (datetime-local) to Food/Insulin/Exercise/Note forms (default: now, required).
    • On submit, converts the selected local time to ISO UTC and sends as eventTime.
    • Reset logic reinitializes eventTime on tab change/close.
  • Chart (CGM)
    • Grouped overlays into separate scatter datasets per event type (Food/Insulin/Exercise/Note).
    • Legend entries and colors aligned with History list.
    • Tooltip interaction switched to nearest (x-axis) and title now prefers hovered event’s timestamp (fixes incorrect event time on hover).
    • Click/selection and highlight work across multiple overlay datasets.
  • Close behaviors
    • Conditionally render Add Event modal only when open (prevents hidden selects intercepting clicks).
    • Fixed parent binding to (closeModal) for Add Event modal.
    • Fixed details drawer binding to (closeDrawer) so the close icon/backdrop actually dismiss the panel.
  • Data refresh
    • After event creation: refresh chart data and TIR.
    • History re-fetch triggered by nudging the filters signal (keeps current filters).

Why

  • Backfilling events is a core need; previously all events used “now”.
  • Hidden modal components interfered with chart interactions.
  • Event overlay tooltips showed incorrect timestamps due to index-based hover.
  • Consistent legend/colors improve readability and parity with History.

How to test

  1. Open Dashboard and create events of each type.
    • Choose a past Date & Time; submit; verify the event’s time in History and in the details drawer.
  2. Hover over event markers on the chart.
    • Tooltip shows the event’s actual time; legend shows a separate entry per type with correct color.
  3. Click event markers to open details; close via icon or backdrop.
  4. After creating an event, verify chart and TIR refresh, and History updates without losing filters.

@bigMackD bigMackD merged commit b808092 into main Nov 9, 2025
3 of 4 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 9, 2025

❌ PR Status Report

Code Quality

  • Backend Lint: success
  • Frontend Lint: failure

Unit Tests

  • Backend Tests (.NET): success
  • Frontend Tests (Jest): success

Coverage Reports

📊 Test coverage artifacts have been uploaded and are available in the workflow run.


Workflow run: 7

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