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

[react-components/dashboard] upgrade react-leaflet and fix map overlays #553

Closed
wants to merge 51 commits into from

Conversation

vallq
Copy link
Contributor

@vallq vallq commented Nov 24, 2021

What's new

fixes #532

  • The initial version of react-leaflet used was no longer supported and the API broke, hence upgrading was necessary.

  • Upgraded to use react-leaflet v3.1.0
    The reason for not using the latest v3.2.2 is because there is an existing incompatibility of v3.2.0 and above with Webpack 4 which create-react-app uses as outlined here. I wasn't able to resolve the issues with the temporary solutions provided hence next best move is to use v3.1.0

  • Clicking on the different levels rendered will now show the corresponding icons
    map-fix-2021-11-24_17 18 51

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

Others

  • Temporal removal of Trajectory Time Control; still trying to figure out how to create a custom control with the new react-leaflet bindings
  • Fix ui for panels

vallq and others added 30 commits October 11, 2021 15:21
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
* resolve cherry pick

Signed-off-by: ChawinTan <chawin15@gmail.com>

* zooming for door panel

Signed-off-by: ChawinTan <chawin15@gmail.com>

* onclick lift cell

Signed-off-by: ChawinTan <chawin15@gmail.com>

* add zomming for remaining components

Signed-off-by: ChawinTan <chawin15@gmail.com>

* add hover and fix story and test errors

Signed-off-by: ChawinTan <chawin15@gmail.com>

* clean up

Signed-off-by: ChawinTan <chawin15@gmail.com>

* add hover color

Signed-off-by: ChawinTan <chawin15@gmail.com>

* fix panning animation

Signed-off-by: ChawinTan <chawin15@gmail.com>
…re/infrastructure-tab

Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
…re/infrastructure-tab

Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
…ap-overlays

Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
@codecov
Copy link

codecov bot commented Nov 24, 2021

Codecov Report

Merging #553 (3d22d09) into main (44b296d) will decrease coverage by 0.55%.
The diff coverage is 63.79%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #553      +/-   ##
==========================================
- Coverage   80.28%   79.73%   -0.56%     
==========================================
  Files         255      253       -2     
  Lines        5367     5432      +65     
  Branches      602      611       +9     
==========================================
+ Hits         4309     4331      +22     
- Misses        871      905      +34     
- Partials      187      196       +9     
Flag Coverage Δ
dashboard 66.85% <43.24%> (-3.32%) ⬇️
react-components 77.36% <79.00%> (-0.08%) ⬇️
reporting 41.95% <ø> (ø)

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

Impacted Files Coverage Δ
packages/react-components/lib/lifts/lift-utils.ts 79.31% <0.00%> (-5.88%) ⬇️
...ackages/react-components/lib/map/doors-overlay.tsx 68.42% <0.00%> (-1.58%) ⬇️
packages/react-components/lib/map/label-marker.tsx 52.52% <ø> (-12.13%) ⬇️
...ackages/react-components/lib/map/lifts-overlay.tsx 65.78% <0.00%> (-0.88%) ⬇️
...ckages/react-components/lib/map/robots-overlay.tsx 75.00% <0.00%> (-1.20%) ⬇️
.../react-components/lib/map/trajectories-overlay.tsx 100.00% <ø> (ø)
...ges/react-components/lib/map/waypoints-overlay.tsx 90.90% <ø> (ø)
...ges/react-components/lib/map/workcells-overlay.tsx 73.33% <ø> (ø)
...ackages/react-components/lib/tasks/create-task.tsx 78.10% <0.00%> (ø)
packages/react-components/lib/workcells/utils.ts 71.42% <0.00%> (-28.58%) ⬇️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44b296d...3d22d09. Read the comment docs.

…rmf/rmf-web into fix/map-overlays

Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
@aaronchongth
Copy link
Member

Per VC, this should be targetting after #530 and #525 are merged, in order to use the new interactions and API.

vallq added 3 commits December 2, 2021 09:37
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
@aaronchongth
Copy link
Member

aaronchongth commented Dec 6, 2021

Per VC, there were breaking changes in the newer release of react-leaflet, which will break the click-centering behavior, #503. Ideally we would like to have preserve behaviors with each new incoming feature, hence we might want to update the click-centering feature to use the newer API.

This new ticket can be used to track that version update, #558.

vallq added 10 commits December 7, 2021 14:28
Signed-off-by: vallq <val@openrobotics.org>
…ap-overlays

Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
…ap-overlays

Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
Signed-off-by: vallq <val@openrobotics.org>
@vallq
Copy link
Contributor Author

vallq commented Dec 10, 2021

Update
Current Progress:

  • Updated the map to show the icons on respective levels
  • Added the state references for the doors and lifts on the robot page, otherwise, they would not have been receiving any updates
  • minor UI fixes to the paneled components (doors, lifts, workcells)

Fixes needed:

  • Custom control for Trajectory Time Control
  • Visibility of label markers on the map

Trajectory Time Control

Label Markers

  • I'm not sure where the problem lies with this, maybe broken referencing..?

@aaronchongth
Copy link
Member

closing with #644

@aaronchongth aaronchongth deleted the fix/map-overlays branch November 30, 2022 03:30
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.

Issue on dashboard map rendering when switching floors
2 participants