Fix parameters retention/Stale customizer params #512

Merged
hrgdavor merged 1 commits from fix-customizer-refresh into main 2021-09-24 09:58:59 +02:00
hrgdavor commented 2021-09-14 19:51:23 +02:00 (Migrated from github.com)

@Irev-Dev I fixed jscad part and added 2 console.log ...

from what I am seing issue is in state management. The worker now send new parameter definitions, but when the definitions are empty it is not cleared in customizer, so that is why customizer for another model that has none stay populated...

image

this can easiliy be tested in jscad IDE by just removin one letter in the initial source

// emtpy params def
function main({//@jscad-param
//many params in def
function main({//@jscad-params

feel free to commit changes directly if it makes sense to do so

@Irev-Dev I fixed jscad part and added 2 console.log ... from what I am seing issue is in state management. The worker now send new parameter definitions, but when the definitions are empty it is not cleared in customizer, so that is why customizer for another model that has none stay populated... ![image](https://user-images.githubusercontent.com/2480762/133308271-29aef8dc-5f29-435d-a110-6a95b15b7634.png) this can easiliy be tested in jscad IDE by just removin one letter in the initial source ```js // emtpy params def function main({//@jscad-param //many params in def function main({//@jscad-params ``` feel free to commit changes directly if it makes sense to do so
Irev-Dev commented 2021-09-23 23:10:43 +02:00 (Migrated from github.com)

I think I've got a fix, works for OpenSCAD too, let me know if you're happy with this @hrgdavor.

You'll probably have to delete you're local branch and pull this branch again as I rebased on main without thinking sorry.

One other note, if you could describe the problem a little more thoroughly next time that would be appreciated. I had been putting this off because I didn't know what you were talking about. The reproduction steps were useful though for figuring it out, thanks for that.

I think I've got a fix, works for OpenSCAD too, let me know if you're happy with this @hrgdavor. You'll probably have to delete you're local branch and pull this branch again as I rebased on main without thinking sorry. One other note, if you could describe the problem a little more thoroughly next time that would be appreciated. I had been putting this off because I didn't know what you were talking about. The reproduction steps were useful though for figuring it out, thanks for that.
hrgdavor commented 2021-09-23 23:41:30 +02:00 (Migrated from github.com)

One other note, if you could describe the problem a little more thoroughly next time that would be appreciated.

sry, I am bit fast and furious like that :D ... just ask when unclear, I will try to explain better next time :) but no guarantees :D

> One other note, if you could describe the problem a little more thoroughly next time that would be appreciated. sry, I am bit fast and furious like that :D ... just ask when unclear, I will try to explain better next time :) but no guarantees :D
hrgdavor (Migrated from github.com) reviewed 2021-09-24 00:00:24 +02:00
hrgdavor (Migrated from github.com) left a comment

nice fix, I just was not able to pinpoint where the retention was for empty params

nice fix, I just was not able to pinpoint where the retention was for empty params
Irev-Dev commented 2021-09-24 22:36:15 +02:00 (Migrated from github.com)

Live now.

Live now.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#512