Creating and Editing Factorial Experiment through stepper#687
Conversation
…into new-design-tab-UI
…ieLearningWeb/UpGrade into new-design-tab-UI
|
I pushed a change to remove strict validation of context metadata in this branch. https://carnegielearning.slack.com/archives/CTD5UG8R2/p1674241667763139 |
| const existingPartitions = experimentInfo.partitions; | ||
|
|
||
| const levelOrder = {}; | ||
| existingPartitions.forEach((partition) => { |
There was a problem hiding this comment.
I'm not sure this sort strategy will always work? Levels will always "tie" with the other levels in a factor, right? so what guarantees the order of levels within a factor?
We're sending the index as order to the backend for factors, "partitions", and conditions, so can we just add an order property in for levelCombinationsElements and conditionAliases so we don't have to do a workaround like this?
There was a problem hiding this comment.
The levelCombinationElements determines the order of the factors, not the levels. Therefore, in a condition table, all levels will be sorted according to their respective factors. Initially, we considered adding an order for levelCombinationElements, but since the order would be a derived value from the factors and levels, we decided not to include it.
There was a problem hiding this comment.
ok, maybe I've got it a little confused then what was showing up out of order exactly, it seems like there still should be a good way to save the order when submitting to backend instead of doing this work in UI. same for conditionAliases table in simple experiment.
There was a problem hiding this comment.
We will look into it.
| levels: [tableDataRow.levels], | ||
| alias: [tableDataRow.alias], | ||
| weight: [this.experimentDesignStepperService.formatDisplayWeight(tableDataRow.weight)], | ||
| weight: [this.experimentDesignStepperService.formatDisplayWeight(tableDataRow.weight),Validators.min(0)], |
There was a problem hiding this comment.
If we're not hooking into Angular form validation techniques for showing the message, this isn't adding anything to what is already there, it can be taken out.
| return tableData; | ||
| } | ||
|
|
||
| convertToPartitionData(factorialExperimentDesignFormData: ExperimentFactorialDesignData) { |
There was a problem hiding this comment.
please change this to something that does not use the word partition.
| existingDecisionPoint.site === decisionPoint.site && existingDecisionPoint.target === decisionPoint.target | ||
| )?.factors.push(currentFactors) | ||
| ) { | ||
| const partitionData = { |
There was a problem hiding this comment.
please change this, it still says partition
No description provided.