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/member persistance #32

Closed JavidSumra closed 6 months ago

JavidSumra commented 6 months ago

Title and Issue number

Title : While Refresh The Page Participants Left Room

Issue No. : #31

Close #31

Video/Screenshots (mandatory)

https://github.com/sd012gfhkhhvh/Slate.AI/assets/112365664/579203f1-7461-48d5-9716-a5120296be5e

Checklist:

Additional context (Mandatory ) I am Using LocalStorage for User Persistence While Refresh the Page

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

vercel[bot] commented 6 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 Feb 8, 2024 1:03pm
JavidSumra commented 6 months ago

Hey @sd012gfhkhhvh Sir Please Have a Look at My PR and Don't Forgot to add Labels.🤝

sd012gfhkhhvh commented 6 months ago

the issue is still there. after refrashing the socket connection got disconneted and a new socket connection got established and a new user joined as an undefined user with a undefined room ID. And also the undefined user gets all the data emitted by the room(This is the same bug as the chatbox issue, all the data of drawing elements are emmited to the users of other room. Would you like to fix that issue ?).

Screenshot 2024-01-27 142909

carefully observe the logs in the server.js, specially the last 3 lines.

I am upgrading the issue with the level hard. try to debug these issues.

Suggested approach - make the user leave the room and redirect them in the join room page rather that joining an undefined user to the undefined room. and if possible give them a popup of rejoin with the same room credentials(room id and name) as they are in before.(not mendatory but appreciable if you do so)

JavidSumra commented 6 months ago

Yes sir i am interested to work on it @sd012gfhkhhvh Sir

JavidSumra commented 6 months ago

Hey @sd012gfhkhhvh Sir Done With Changes Now it Persist With Same Credentials and Chatbox is Fixed Now Please Check Once and Don't Forgot to Change Level.

sd012gfhkhhvh commented 6 months ago

@JavidSumra you have changed a lot more things which has no need. just handle the onDisconnect event correctly and redirect them to join room page with their credentials for rejoin. Dont make unnessary changes. Even you dont need useParms here as you can get all the data related to a particular disconnected userthrougn "user" state in the Room page.

try not to make it complicated and messy using extra things that we donnt need at all

sd012gfhkhhvh commented 6 months ago

Did you test it properly in your local system? I have still noticed some inconsistencies. firstly after rejoin the user is only able to recieve data from the others in the room but cant emit data to others in the room. secondly there is an inconsistency of removing data from localstorage, after closing the modal the data does not get removed from the browser, thus when I try to create new room it pops up again

JavidSumra commented 6 months ago

Hey @sd012gfhkhhvh Sir it's Working for me but I will check ✅

JavidSumra commented 6 months ago

@sd012gfhkhhvh Sir, please review the PR. I've implemented the changes as per your instructions.

sd012gfhkhhvh commented 6 months ago

Did you test it properly in your local system? I have still noticed some inconsistencies. firstly after rejoin the user is only able to recieve data from the others in the room but cant emit data to others in the room. secondly there is an inconsistency of removing data from localstorage, after closing the modal the data does not get removed from the browser, thus when I try to create new room it pops up again

@JavidSumra the first point is stll not been resolved yet.

JavidSumra commented 6 months ago

Hey @sd012gfhkhhvh Sir Changes Done

sd012gfhkhhvh commented 6 months ago

Hey @sd012gfhkhhvh Sir Changes Done

The eraser tool after rejoin is not working properly.

Bro u are not testing the app properly before making a pr. It has been 3rd or 4th time i am saying this to you. when you are fixing any bug make sure to test properly before making aggressive pr. Its been very difficult for an open source project mentainer to invest their time again an again to a same pr for the same issue with repeated bugs.

JavidSumra commented 6 months ago

Hey @sd012gfhkhhvh Sir Currently I am busy with some college related stuff so sorry for this behaviour.

sd012gfhkhhvh commented 6 months ago

Hey @sd012gfhkhhvh Sir Currently I am busy with some college related stuff so sorry for this behaviour.

Did both the participant's eraser tool works properly after one rejoins in your system? Send me a screen recording whenever you are free.

sd012gfhkhhvh commented 6 months ago

issue #31 has been resolved and has been merged under pr #32