-
Notifications
You must be signed in to change notification settings - Fork 2
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
Optimize variable edition and use of Monaco editor in raw mode #191
Conversation
b4a6a26
to
85da0b4
Compare
Force pushed after rebase on master. |
Hi, ✔️ When you modify in Raw mode, the state is updated in View mode |
Overall, the raw view seems to be fixed now and the sync between view / raw is working. View mode has some problems but those are hard to solve without any JSON schema. The default mode is now the raw one. I'll add a mention on the view page that this is still a work in progress.
Yes that normal. Renaming a variable is not possible. Hence, it is the same as deleting/creating a new one.
It seems to be fixed now. The problem now appear on visual mode.
It seems to be fixed now.
I'm not sure to understand this one.
Arrays are causing some troubles. I decided to treat them as object until we make use of the json schemas. |
1ce0501
to
23095df
Compare
I found a bug. To reproduce
It happens also on "Spark3" (http://localhost:3000/services/spark3) and nowhere else. ReasonThe reason is it defines SolutionFirst we have to determine if |
Thanks @sergkudinov! I fixed it on my last commit. |
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.
Looks good to me, except this is not improved.
True, it doesn't seem to be any settings for this with Monaco. |
TODO :
|
3b20f98
to
759fb6a
Compare
e76b4a4
to
9c0e3a3
Compare
I fixed the bug that I mentioned previously. Forced pushed to squash commits. |
I tested the add/remove of a variable :
|
I did it on purpose. I understood from @rpignolet that deleted variables should be set as |
Does the server support variable deletion by setting it to |
In my understanding, it is not possible to delete a variable using a
It's a bit weird to prevent deleting in a raw mode. I can either:
|
Use |
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.
I ran and tested the edditor, it seams it works without issues descussed above. However, I see different errors in the browser console. I propose to merge to master as is, because existing errors must disappear after my refactoring to RTK Query this week.
@rpignolet I was mistaken, there is no What should I do for this PR then? Leaving the deleted variable as Thanks for your test and your input @sergkudinov! I agree, some of the errors are coming from the server answer / toast which aren't directly related to this PR. |
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.
test of the editore : OK
@PaulFarault Currently the server does not support variable deletion, setting a variable to When the server will officially support it we can do the implementation on the UI side. The UI must use existing features of the server and not seek to circumvent non-existent features of the server. |
This PR should fix the PUT behavior to allow deletion : TOSIT-IO/tdp-server#122 I'll switch from PATCH to PUT in the next commit to handle variables deletion. |
It is fine from my side. |
Which issue(s) this PR fixes
Fixes #96
Fixes #149
Fixes #164
Additional comments
react-hook-form
to optimize state and to simplify theuserInput
slice. The slice now only contains dirty variables across a single service and is emptied when switching service.Agreements