-
Notifications
You must be signed in to change notification settings - Fork 0
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
mrc-4522 Allow user-specified parameter values in Sensitivity #176
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #176 +/- ##
=======================================
Coverage 99.97% 99.97%
=======================================
Files 148 148
Lines 3412 3436 +24
Branches 482 491 +9
=======================================
+ Hits 3411 3435 +24
Misses 1 1
☔ View full report in Codecov by Sentry. |
"Custom" perhaps? |
Yeah, that's probably the word I was looking for! Will change to that! |
OK, that should be working now, ready to review. |
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.
This works
tags: Array as PropType<Tag[] | null> | ||
tags: Array as PropType<Tag[] | null>, | ||
numericOnly: { | ||
type: Boolean, |
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.
is there a difference between Boolean and bool? Or am I getting confused with different languages?
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.
It's how Vue defines the types of its props, not quite the same as the Typescript types
@@ -5,18 +5,25 @@ | |||
<button class="btn btn-primary mb-4 float-end" @click="toggleEdit(true)">Edit</button> | |||
<ul> | |||
<li><strong>Parameter:</strong> {{settings.parameterToVary}}</li> | |||
<li><strong>Scale Type:</strong> {{ settings.scaleType }}</li> | |||
<li v-if="settings.variationType !== 'Custom'"><strong>Scale Type:</strong> {{ settings.scaleType }}</li> |
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 feel this should now move below the variation type because then the dependency among the options is easier to work with
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.
Ok, so scale type below variation type, as it isn't relevant for custom variation type.
<li><strong>From:</strong> {{ settings.rangeFrom }}</li> | ||
<li><strong>To:</strong> {{ settings.rangeTo }}</li> | ||
</template> | ||
<li><strong>Number of runs:</strong> {{ settings.numberOfRuns}}</li> | ||
<li v-if="settings.variationType === 'Custom'"> | ||
<strong>Values:</strong> |
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 was looking for some hint as to what my central value was. Do we want to encourage the users to bracket it?
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.
Yeah, I wondered about that. Do we want to enforce or just encourage?
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.
encourage seems enough - just knowing where it is would be nice
return batchParsResult.value?.error; | ||
}); | ||
const updateUserValues = (newValues: number[]) => { | ||
// sort and remove duplicates |
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.
when I entered a duplciate it ended up with a red underline and was not included but no error displayed
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 also wonder about deferring sort until save? it's a bit alarming atm
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.
The red underline seems to be a bit of a feature of the third party tags input, I think it can happen in the advanced settings too, I'll see if I can get rid of it, and defer sorting
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 think the code looks good, youre in the middle of changes, should be good once all those are implemented, you can try handling duplicate values with the on-error
event from the tags component, however the red underline will still show up, the class you probably want to modify is
v3ti-new-tag v3ti-new-tag--error
, you can change behaviour with this!
You can also wipe their duplicate value and stuff using a v-model on the tags input and setting that to empty string on the on-error
event, once the red underline styling is gone, we can control a tooltip!
|
This branch adds a new sensitivity parameter settings variation type, "User", to the existing types ("Percentage" and "Range"). This allows the user to manually specify the parameter values to use in the sensitivity run.
On reflection, "User" maybe isn't a great term to surface to the, err, user. What would be better? "Values"? "Specific"?
This isn't doing any validation that the parameter's central value is between the lowest and highest values specified - should it?
Key changes:
userValues
number array added to the settings type to hold these valuesEditParamSettings
dialog updated to support editing these values using theTagInput
, plus read-only display in the options tab. The green alert showing generated values is not displayed for user values (as would be showing the same values twice) - I guess we could just show this in the read-only tab view but it feels better to have the user values displayed like the other user settings, and keep the green box for generated values.