-
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
[Pending] feat(app) App feat add get robotName #10871
Conversation
This PR is to add a function to get a robotName from API instead of using rename function's return.
Codecov Report
@@ Coverage Diff @@
## release_6.0.0 #10871 +/- ##
=================================================
- Coverage 73.83% 73.80% -0.04%
=================================================
Files 2158 2161 +3
Lines 58349 58659 +310
Branches 5963 6067 +104
=================================================
+ Hits 43084 43291 +207
- Misses 13991 14052 +61
- Partials 1274 1316 +42
Flags with carried forward coverage won't be shown. Click here to find out more.
|
export interface CurrentRobotName { | ||
name: string | ||
} | ||
|
||
export interface UpdatedRobotName { | ||
name: 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.
[Question to reviewers]
Should I combine these two interfaces into one like RobotName
?
RobotName
might be vague? In addition, we use robotName
in many components so maybe a different name would be better?
Overview
This PR is for the robot rename function and this PR will be used by #10723 to retrieve the new robot name.
This PR uses the API
/server/name
GET methodChangelog
api-client
react-api-client
Review requests
This PR is similar to
runs
andprotocols
withGET
so the key is that the changes follow the existing coding style and usage ofreact-query
Would like to get reviewers' thought on interface that I commented
This function only works with an OT-2 (not work with robot-server)
I checked
useRobotName()
worked in RenameSlideout component.Risk assessment