Open aayushai opened 1 month ago
@aayushai assign to me please
I'll assign it, first work on the previous assigned issue.
@aayushai can you assign it to me?
Hello! And Greeting of the day Mr.@aayushai ! I was wondering if you could assign this task to me ?
Go ahead @Arihant-Singh-Rana
hey @aayushai i am facing an issue in resolving this issue can you please assign me some other issue.
@thevashuydv don't worry I'll do it
Hi! @aayushai, Greetings of the day! I have submitted the PR for this issue. Please review it and let me know if any changes are required!
Hi @Arihant-Singh-Rana , I reviewed the code, and while the language selection state is being saved correctly, I noticed that the input and output code states are not being preserved. To clarify, I expect both the input code and the output code, along with the language selections, to be saved as well. Please make the necessary adjustments to ensure all three states (input code, output code, and language selection) are persisted.
Oh ! Ok I'll make the necessary changes right away!
Hi! @aayushai, I have made the necessary changes butI also wanted to know that once when we have converted the code it will save the state of the language selection as well as input and out code, but when we change the input Lang selection do you want the default code of the Lang that we just selected to appear in the editor or not ? similarly if we change the output Lang selection do you want the editor to refresh(as in remove the previously converted code and empty the editor) or not ?
For now, let's keep it only for language selection, I have something in mind that will be implemented next for this website.
@aayushai so should I not save the input code and output code ?
No leave it, only save the language selector for now. Make a new PR with latest rebased fork. I'll merge it.
@aayushai By the I have already made it so the input and output code is also saved and when we change the input code the default code will replace the saved code ..... So should I just make a new PR with that code or not?
@aayushai By the I have already made it so the input and output code is also saved and when we change the input code the default code will replace the saved code ..... So should I just make a new PR with that code or not?
@aayushai which one should I submit the PR of? I have both the fix one where only the lang state is saved and other where both lang and code state is saved as well
Hi @Arihant-Singh-Rana , make PR of only language state save.
Hi @Arihant-Singh-Rana , make PR of only language state save.
Ok! I have already made the PR
Preserve State Between Sessions with LocalStorage
Description:
Allow users to preserve their selected languages and input/output code between sessions by saving the state in
localStorage
.Action Items:
inputLang
,outputLang
, andinputCode
tolocalStorage
whenever they are updated.Example Code:
Reference: