[BUG FIX] [MER-4131] | Dig into chem labs simulations #5369
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey @bsparks, could you please look at this PR? Thanks
I have updated the condition (
to make sure that the partId variable is used in _PREVIEW MODE ONLY & NOT SENT TO SERVER_
) to resolve the earlier issue where this was causing the part responses not to be saved on server hence resume mode and review mode was not working.I have tested it with the preview mode / Resume mode / Review Mode and part responses are getting saved and are pre-filled in review mode.
Comment from the original PR where the changes were made (just for reference)-> #5282
Previously, we did not save the variable type received during the handshake with the CAPI component. As a result, in the Inspector preview tool, the variable type was auto-detected based on its value. This approach caused issues with variables of type ENUM, as ENUMs require a dropdown with allowed values to be displayed. Instead, the current implementation incorrectly shows a text input because it was thinking ENUM values as string.
To address this specifically for the preview mode (Inspector tool), I have introduced a new variable, stage.${partId}.variables.Type, in the scripting (PREVIEW MODE ONLY & NOT SENT TO SERVER). This variable stores all variables along with their types and allowed values, ensuring correct representation in the preview tool.