-
Notifications
You must be signed in to change notification settings - Fork 178
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
feat(app, shared-data): create odd boolean and choice selection screen #14775
Conversation
app/src/organisms/ProtocolSetupParameters/__tests__/ChooseEnum.test.tsx
Outdated
Show resolved
Hide resolved
app/src/organisms/ProtocolSetupParameters/__tests__/ChooseEnum.test.tsx
Outdated
Show resolved
Hide resolved
<StyledText | ||
as="h4" | ||
textAlign={TYPOGRAPHY.textAlignLeft} | ||
marginBottom={SPACING.spacing16} | ||
> | ||
{parameter.description} | ||
</StyledText> |
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.
if Sue requests us to keep the space size, we may need to add style.
https://www.figma.com/file/aS5owa8kwmA0uzqzkP1BLJ?type=design&node-id=3312-62720&mode=dev#755884946
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 we can work on char limit in a following PR because at this moment we don't have any long case design.
e81f386
to
f6507cc
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## edge #14775 +/- ##
=======================================
Coverage 67.19% 67.19%
=======================================
Files 2495 2495
Lines 71387 71387
Branches 8983 8983
=======================================
Hits 47972 47972
Misses 21301 21301
Partials 2114 2114
Flags with carried forward coverage won't be shown. Click here to find out more. |
f6507cc
to
701d579
Compare
buttonType="tertiaryLowLight" | ||
buttonText={t('restore_default')} | ||
onClickButton={() => { | ||
setParameter(parameter.default, parameter.variableName) |
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 we want to check here whether the default equals the current value. If we actually are resetting the value, we don't show the snackbar. From figma:
Reset default value is disabled when the default value is displayed and enabled once its been changed
If the user taps on the ‘Reset default value’ button when disabled, a snack bar appears informing the user the value has not been edited
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.
wow omg thanks so much for pointing this out!
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.
works well! nice.
closes AUTH-123
Overview
Creates the screen for boolean and choice params on the odd
Test Plan
upload a protocol with a boolean and choice param and send it the odd. Or upload the attached protocol and change line 187 of
app/src/organisms/ProtocolSetupParameters/index.tsx
to return the mockData const at the top of the file.Click on a boolean param on the setup parameters page. Observe the screen. Try to change the values and reset to default.
Now do the same thing with the choice param and make sure it works as expected.
Changelog
ChooseEnum
component and testProtocolSetupParameters
formatRunTimeParameterValue
toformatRunTimeParameterDefaultValue
and create a newformatRunTimeParameterValue
that returns the value updates.Review requests
see test plan
Risk assessment
low