Skip to content
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

Using icon to display robot #809

Merged
merged 7 commits into from
Oct 30, 2023
Merged

Using icon to display robot #809

merged 7 commits into from
Oct 30, 2023

Conversation

Angatupyry
Copy link
Collaborator

What's new

  • Display robot icons as images in react three fiber.
  • Make waypoints square smaller.
  • Make waypoints transparent

Self-checks

  • I have prototyped this new feature (if necessary) on Figma
  • I'm familiar with and follow this Typescript guideline
  • I added unit-tests for new components
  • I tried testing edge cases
  • I tested the behavior of the components that interact with the backend, with an e2e test

Discussion

@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Merging #809 (65bd4a3) into main (59065b1) will decrease coverage by 0.13%.
The diff coverage is 2.94%.

❗ Current head 65bd4a3 differs from pull request most recent head fd5a1ac. Consider uploading reports for the commit fd5a1ac to get more accurate results

@@            Coverage Diff             @@
##             main     #809      +/-   ##
==========================================
- Coverage   50.89%   50.77%   -0.13%     
==========================================
  Files         281      281              
  Lines        7109     7128      +19     
  Branches      952      977      +25     
==========================================
+ Hits         3618     3619       +1     
- Misses       3348     3366      +18     
  Partials      143      143              
Flag Coverage Δ
dashboard 16.30% <0.00%> (-0.01%) ⬇️
react-components 47.65% <5.26%> (-0.41%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ents/lib/map/three-fiber/shape-three-rendering.tsx 8.33% <ø> (ø)
...eact-components/lib/map/three-fiber/text-maker.tsx 7.14% <0.00%> (-0.55%) ⬇️
...shboard/src/components/three-fiber/robot-three.tsx 0.00% <0.00%> (ø)
packages/dashboard/src/components/map-app.tsx 0.00% <0.00%> (ø)
...mponents/lib/map/three-fiber/robot-three-maker.tsx 8.57% <5.55%> (-2.54%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together, @Angatupyry! Unfortunately I don't see the scale reflected properly when I pull in assets from rmf_demos_dashboard_resources, it is currently scaling according to DEFAULT_ROBOT_SCALE.

I've been testing with the dashboard resources from open-rmf/rmf_demos#196, let me know if my json is malformed

Copy link
Member

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I found the issue!

edit: With the deployment issues we faced, could you help test in Microsoft Edge and without network connectivity too?

packages/dashboard/src/managers/resource-manager-robots.ts Outdated Show resolved Hide resolved
Copy link
Member

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing it! LGTM

@aaronchongth aaronchongth merged commit db60f9c into main Oct 30, 2023
4 checks passed
@aaronchongth aaronchongth deleted the feature/robot-image-maker branch October 30, 2023 21:53
aaronchongth pushed a commit that referenced this pull request Nov 2, 2023
* Render image if robot icon exists

Signed-off-by: angatupyry <[email protected]>

* Add scale to robot resource

Signed-off-by: angatupyry <[email protected]>

* Using scale if exists in resource

Signed-off-by: angatupyry <[email protected]>

* Make waypoints transparent

Signed-off-by: angatupyry <[email protected]>

* Adjust text according to its length

Signed-off-by: angatupyry <[email protected]>

* Remove hasOwn property control

Signed-off-by: angatupyry <[email protected]>

---------

Signed-off-by: angatupyry <[email protected]>
(cherry picked from commit db60f9c)
Signed-off-by: Aaron Chong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants