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

Next Actions View #84

Merged
merged 19 commits into from
Dec 17, 2024
Merged

Next Actions View #84

merged 19 commits into from
Dec 17, 2024

Conversation

JasonWarrenUK
Copy link
Collaborator

@JasonWarrenUK JasonWarrenUK commented Dec 15, 2024

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

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

Description

Core Feature

  • Displays Next Actions for the selected Needs
  • Groups the needs into priorities:
    • sorted by need.priority.order
    • displaying need.priority.name
    • styled by appropriate colour
  • Selecting an action:
    • adds new Date() to selectedTimestamps
    • sets expiry to equal the parent need's expiry
  • Deselecting an action:
    • removes selected timestamp (as this only represents a change of mind, unlike the behaviour on needs)
    • resets the expiry

Additional Features

  • created changeCase() utility function
  • created getPriorityColour() utility function

Notes

  • I attempted to write tests, and have left the tsx file in the __tests__ folder as an .md file

Screenshots

Things We Do · 5 58pm · 12-16

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: will do it tomorrow
  • I need help with writing tests: I can't make them work without tweaking the mocks so much that I can't be sure whether it's even actually accurately testing anything

Delete branch after merge?

  • Yes
  • No

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

Copy link

netlify bot commented Dec 15, 2024

Deploy Preview for thingswedo ready!

Name Link
🔨 Latest commit 4da19c0
🔍 Latest deploy log https://app.netlify.com/sites/thingswedo/deploys/6761486c53047300085f8401
😎 Deploy Preview https://deploy-preview-84--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.

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.

Logic is solid, few comments based on what I think I understand just from code read, feel free to put me in my place if I'm missunderstanding xD

Thanks for persevering with this, I know it's been a bit of a pain!

@JasonWarrenUK JasonWarrenUK marked this pull request as ready for review December 16, 2024 18:06
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.

Great work thanks for persevering again, couple minor comments

src/lib/utils/getPriorityColour.ts Outdated Show resolved Hide resolved
__tests__/NextActions.test.tsx.md Outdated Show resolved Hide resolved
@maxitect maxitect merged commit ed1a15f into main Dec 17, 2024
5 checks passed
@maxitect maxitect deleted the feature/actions-view-sane-edition branch December 17, 2024 09:49
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