Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Insights Charts #74

Merged
merged 38 commits into from
Dec 12, 2024
Merged

New Insights Charts #74

merged 38 commits into from
Dec 12, 2024

Conversation

JasonWarrenUK
Copy link
Collaborator

@JasonWarrenUK JasonWarrenUK commented Dec 11, 2024

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimisation
  • Documentation Update
  • Styling
  • Build
  • Chore

Description

Insights

  • use dynamic date ranges rather than hardcoded date boundaries (examples below)
Filter Old New
day 6am-midnight previous 24 hours
month days in this month days since this date last month

Line Graph

  • year view now shows monthly averages rather than every record

    this makes the year view readable

  • plotted points now invisible, showing lines only
  • added dynamic padding to y-axis to prevent the line thickness resulting in visual clipping

New Stacked Area Chart

  • shows all recorded moods as a proportion of all records (i.e. this shows percentages, not numbers)
  • shows selected date range
  • state at start of date range reflects records from before the date range

New Stream Graph

  • shows evolution of your mood across a given time period
  • disregards records prior to date range
  • is technically a modified stacked area chart, as a true stream chart would need exponentially more data to actually show anything

Other

  • rationalised imports & default exports across insights & moods
  • updated imports & mocks in mood page tests to reflect rationalised default exports

Screenshots

Dynamic Ranges

Insights   Line   Day • Dynamic

Monthly Averages in Year View

Insights   Line   Year • Averaging

Clipping Reduction

Insights   Line   Month • Clipping

Area Chart

Insights   Area   Year

Stream Graph

Insights   Stream   Month

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Semantic HTML implemented?
  • Checked with axe DevTools and addressed Critical and Serious issues?
  • Color contrast tested?

Added/updated tests?

Please aim to keep the code coverage percentage at 80% and above.

  • Yes
  • No, and this is why: please replace this line with details on why tests
    have not been included
  • I need help with writing tests

CleanShot  2024-12-12  Thursday  at 12  16 38  Warp@2x

Delete branch after merge?

  • Yes, assuming the Design Museum doesn't want it
  • No

What gif best describes this PR or how it makes you feel?

Copy link

netlify bot commented Dec 11, 2024

Deploy Preview for thingswedo ready!

Name Link
🔨 Latest commit 404ed61
🔍 Latest deploy log https://app.netlify.com/sites/thingswedo/deploys/675ae207ed0e8a000816845e
😎 Deploy Preview https://deploy-preview-74--thingswedo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@JasonWarrenUK JasonWarrenUK marked this pull request as ready for review December 12, 2024 12:18
Copy link
Collaborator

@jackcasstlesjones jackcasstlesjones left a comment

Choose a reason for hiding this comment

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

pls refactor db manager and apply other changes (mainly deleting comments)

src/lib/db/DatabaseManager.ts Outdated Show resolved Hide resolved
src/lib/db/DatabaseManager.ts Outdated Show resolved Hide resolved
src/lib/db/DatabaseManager.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@maxitect maxitect left a comment

Choose a reason for hiding this comment

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

Just some comments on database manager to go back to using generic seed method and seperate seed data from database methods

src/lib/db/DatabaseManager.ts Outdated Show resolved Hide resolved
src/lib/db/DatabaseManager.ts Outdated Show resolved Hide resolved
src/lib/db/DatabaseManager.ts Outdated Show resolved Hide resolved
src/lib/db/DatabaseManager.ts Outdated Show resolved Hide resolved
src/lib/db/DatabaseManager.ts Outdated Show resolved Hide resolved
src/lib/db/DatabaseManager.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@maxitect maxitect left a comment

Choose a reason for hiding this comment

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

Looks great!!

@jackcasstlesjones jackcasstlesjones merged commit 23ef947 into main Dec 12, 2024
5 checks passed
@jackcasstlesjones jackcasstlesjones deleted the feature/insight-area-charts branch December 12, 2024 14:26
maxitect added a commit that referenced this pull request Dec 12, 2024
@maxitect maxitect mentioned this pull request Dec 13, 2024
16 tasks
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