sd012gfhkhhvh / Slate.AI

A Real Time Whiteboard for doodling with multiple peoples
https://slate-ai.vercel.app
MIT License
11 stars 16 forks source link

Feature/eraser feature #11

Closed JavidSumra closed 7 months ago

JavidSumra commented 7 months ago

Title and Issue number

Title : Implement an Eraser Tool in the Toolbar

Issue No. : #6

Close #6

Video/Screenshots (mandatory)

https://github.com/sd012gfhkhhvh/Slate.AI/assets/112365664/22a5fb1a-2359-4362-ba16-c7ead7d5bbe4

Checklist:

Additional context (Mandatory ) Overview: This enhancement introduces a dynamic eraser size feature to the toolbar, providing users with greater flexibility and control over their eraser tool in the application. The initial implementation sets the eraser size to a fixed value of 20.

Details: The current state of the application's toolbar lacks the ability to adjust the eraser size, making the eraser tool less versatile for users with specific precision requirements. This enhancement addresses this limitation by incorporating a dynamic eraser size feature.

Key Changes:

  1. Default Eraser Size:

    • The initial default eraser size is set to 20 for consistency with the previous version.
  2. Backend Implementation:

    • The backend logic is updated to handle Erase.

Note: The fixed initial eraser size of 20 is subject to change based on community feedback and consensus.

Are you contributing under any Open-source programme? I am Contributing Under JWOC 2024

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
slate-ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 18, 2024 4:44pm
sd012gfhkhhvh commented 7 months ago

@JavidSumra saw your changes. It's a pretty good one. But there is 2 small issues-

  1. the eraser only works onMouseUp event, I need to click the mouse to erase which is not an ideal thing to do.
  2. The changes are not propageting to the other room members board. can you do something about them?
JavidSumra commented 7 months ago

Hey @sd012gfhkhhvh can you please provide me with a Preview Approval.

JavidSumra commented 7 months ago

Hello @sd012gfhkhhvh, the modifications are now spreading to the boards of other members in the room. Additionally, you can now erase content by dragging the cursor.

https://github.com/sd012gfhkhhvh/Slate.AI/assets/112365664/81b00fc4-f432-4fed-8d2c-8ffed7f8084a

sd012gfhkhhvh commented 7 months ago

@JavidSumra Bro you are going great, But the changes are still not propageting to the other members. I am giving u a clue - There is a small mistake made inside the whiteboard component, Its a one liner mistake. Let me know if You got it.

JavidSumra commented 7 months ago

Hey @sd012gfhkhhvh for me on the local server it works fine so can you please share with me a video so I can understand the exact issue.

JavidSumra commented 7 months ago

Hey @sd012gfhkhhvh please Add JWOC and Hard Tag To This PR Please Mentor.

sd012gfhkhhvh commented 7 months ago

Hey @sd012gfhkhhvh please Add JWOC and Hard Tag To This PR Please Mentor.

Dont worry I will.

sd012gfhkhhvh commented 7 months ago

Hey @sd012gfhkhhvh for me on the local server it works fine so can you please share with me a video so I can understand the exact issue.

I tested your changes locally, it worked fine there but in the production the eraser is not propagated to other room members.

I would suggest you to not use getelementbyId("canvas") at the top under use effect, instade use canvas = canvasref.current.

Try it once and let me know.

JavidSumra commented 7 months ago

Hey @sd012gfhkhhvh I'll let you know by tonight.

JavidSumra commented 7 months ago

Hey @sd012gfhkhhvh Now I Made Some Necessary Changes Please Checkout My PR.

sd012gfhkhhvh commented 7 months ago

Hey @sd012gfhkhhvh Now I Made Some Necessary Changes Please Checkout My PR.

saw your changes but it's sitll not working in the production. For now do one thing just remove the comment at line 68 in the whiteboard component. I will marge your pr after the issue#1 get resolved because You just need to change the classnames of your eraser componets. I will let you know after it get resolved. Till then try to deploy your code and let me know if you have got any fixes in the production.

JavidSumra commented 7 months ago

Hey @sd012gfhkhhvh Sir Can You Please Share Any Video of the Deployment Issue or Access to the Deployment App?

JavidSumra commented 7 months ago

Hey @sd012gfhkhhvh It seems like you may need to update the backend service on Render. I recommend redeploying the backend service, as this should resolve the issue.

sd012gfhkhhvh commented 7 months ago

Hey @sd012gfhkhhvh It seems like you may need to update the backend service on Render. I recommend redeploying the backend service, as this should resolve the issue.

Yeah, i also think so. Vercel autoupdates the changes in a pr but render does not.

JavidSumra commented 7 months ago

Hey @sd012gfhkhhvh so what should I need to do now?

sd012gfhkhhvh commented 7 months ago

Hey @sd012gfhkhhvh so what should I need to do now?

Wait untill issue#1 get resolved. You jist need to marge the changes and implement taiwind classes instade of bootstrap in your eraser div.

sd012gfhkhhvh commented 7 months ago

issue #6 resolved and sucsessfully merged into dev