e-picsa / picsa-apps

Monorepo for building tools to support E-PICSA Apps
https://picsa.app
GNU General Public License v3.0
5 stars 1 forks source link

feat(budget-tool): custom card drawing input #270

Closed FaithDaka closed 4 weeks ago

FaithDaka commented 1 month ago

Description

Adds new drawing input component and integrates with budget tool custom cards

closes #230

Preview

Link to app preview if relevant

Screenshots / Videos

Screenity video - Jun 5, 2024.webm

chrismclarke commented 1 month ago

@FaithDaka - thanks for sharing the draft PR, it took a bit of working out but I think I finally figured out what the issue is and have opened PR #271 targeting this branch to fix the issue. Feel free to merge it in if it makes sense to you.

In terms of next steps I think the main task will be to support multiple paths, so that when the user releases their pointer the path is finalised and the user can start a new path on next mouse down. The svg element will then need to use an @for loop to render each of the paths on the page. We will also want to replace the button component I've added with some sort of div/svg that renders the current svg, and when clicked opens up the svg editor.

If you think that is better for a follow-up PR I think you could just comment out the element on the current budget testing page and we should be able to merge this in as a base component and build on in follow-up issue.

We may also want to consider some stretch goals like an undo/redo button for drawn paths, as well as a clear button to start new. Further features like colour picker, eraser would probably be much lower priority.

FaithDaka commented 1 month ago

https://github.com/e-picsa/picsa-apps/assets/53012890/3578c860-bd6e-45fd-9cf7-41ae9a731732

FaithDaka commented 1 month ago

Fixed the svg path bug. Pending bug: undo and redo functionality

https://github.com/e-picsa/picsa-apps/assets/53012890/31caeca9-8c57-48e3-9ca6-5fc98f501f84