-
Notifications
You must be signed in to change notification settings - Fork 179
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): Add and implement module selectors in calibration #1895
Conversation
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.
Got some tweaks we can make to RefreshWrapper
but the stuff I mentioned isn't being used so it's not big deal at the moment
🌌
|
||
type Props = { | ||
watch?: string, | ||
refreshing?: 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.
Prop not used
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.
not used... yet?
import * as React from 'react' | ||
|
||
type Props = { | ||
watch?: string, |
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.
Adding watch
to RefreshCard
was a mistake on my part. React's built-in key
prop was what I should've used (and what we should use here)
this.props.refresh() | ||
} | ||
|
||
componentDidUpdate (prevProps: Props) { |
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.
Can remove this, provided we use key
instead of watch
@@ -78,15 +76,3 @@ function mapStateToProps (state: State, ownProps: OP): SP { | |||
|
|||
return {...NAV_ITEM_BY_NAME[name], _robot} | |||
} | |||
|
|||
function mergeProps (stateProps: SP, dispatchProps: DP, ownProps: OP): Props { |
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.
👍
overview
This PR addresses #1737 by adding and implementing module selectors and actions in
Calibrate/Labware
. It also introduces a RefreshWrapper for pages which is implemented on page mount in order tofetchPipettes
andfetchModules
from the api.changelog
RefreshWrapper
component and implement on calibration pagesreview requests
If you'd like to see a populated
modulesBySlot
comment out line343
and uncomment lines345-351
inapp/src/robot/api-client/client.js
. *Please note tests wont pass with this uncommented.calibrate/pipettes
calibrate/labware
api[RobotName].api.modules
exists andresponse = { modules: [ ] }