-
Notifications
You must be signed in to change notification settings - Fork 59
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
🚀[Feat]: Add Default Code for each Language #52
Conversation
@jainaayush01 is attempting to deploy a commit to a Personal Account owned by @kothariji on Vercel. @kothariji first needs to authorize it. |
Should I make a new PR and close this one Because I didn't saw the Contributing guidelines and haven't added a heading and description of commits in a proper way btw its self explanatory not much explanation is there but still let me know if there is something I need to do. Thanks for waiting! |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/kothariji/syntaxmeets/4bJG8CXxxbK2QVhHUF8wy4U4NCMY |
It would be better if you can implement the logic that will change the code in the editor when you select the diff language. This would be totally fine too if you end up here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jainaayush01 thanks for creating the PR.
But there is a minor change, consider the scenario below.
Scenario - Consider there are two users working in C++, and suddenly one of them changes a language to JAVA, then the entire code is changed(i.e. default code of JAVA is displayed) affecting both the user. So this should not happen right.
Solution (I am able to think of) - once a user starts coding, even if he changes language, the current code should not wipe off, as it will affect another users right!.
Also currently whenever a new user joins, the entire code is replaced with the default code. So this is a bug we need to fix.
Thanks! 🚩
We gotta implement cache layer sooner or later @kothariji |
I swear, localStorage will be soon our best friend 😆 @Vishv07 |
Also when a user is already in the room if the Language is changed in one Room it is not reflected in the other. The solution I am thinking of is: Keeping the code for each particular language in storage(or database) and if the user wants to come back to that particular language same code is visible. and when a new user joins a room the same settings of that room are displayed and not when we create a new room and also if the language is changed it also changes in another room (similar to code). Thanks for highlighting all the bugs 🚩 |
I missed that scenario @kothariji. |
Yes, that too! 🙌 |
Error while executing java code. Kindly check |
Merge pull request kothariji#92 from krishna-y2000/75-issue
Merge pull request kothariji#94 from Priyankcoder/emoji-picker
Merge pull request kothariji#95 from Lavcodes/RoomIdMessage
…1/SyntaxMeets into jainaayush01-patch-1
i don't understand what you are saying. |
and also if anyone can help me how to solve this issue will be a great help (above comments). |
Hi @jainaayush01, as REDUX is implemented in our code, now we can think over this PR. Please let me know your thought on this |
Yeah, I was thinking of this PR yesterday. However, if we need to make this type of change, we can go like adding a button to add default language code for that particular language. |
By the way, Redux's work is done amazingly. |
@jainaayush01, yeah I do agree with your point. But I can smell a bug in this implementation. What's your take on this !! |
It will be a mess because if we are working on a team we ain't gonna change the language frequently. And we should let the each member decide which language they want to run and not change it if one of member changes the language. In Short letting members decide what they want to do. |
Yes and only the user which has changed the language lastly will only be applicable to restore that code as CtRl +Z works for that person only |
Correct, so I think we should keep this PR on hold, and then If we get and good solution to this issue, we'll work on it. 🙌 Anyways, thank you so much working on this 🚀 |
Yes, honestly @Vishv07 did tremendous work.🙌🚀 |
Yup couldn't agree more! |
Issue #16