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

Remove offset based on text length #1037

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Remove offset based on text length #1037

merged 1 commit into from
Nov 26, 2024

Conversation

aaronchongth
Copy link
Member

What's new

Resolves #1034

  • removes an offset for labels based on text length, it will be more intuitive that the text is left-justified at the center of the rendering

Before

Screenshot_20241125_171228
Screenshot_20241125_171250

After

Screenshot_20241125_171149
Screenshot_20241125_171320

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

Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 40.60%. Comparing base (dd4d953) to head (9fdd0ba).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...hboard-framework/src/components/map/text-maker.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1037   +/-   ##
=======================================
  Coverage   40.60%   40.60%           
=======================================
  Files         334      334           
  Lines       17212    17211    -1     
  Branches      680      680           
=======================================
  Hits         6989     6989           
+ Misses      10119    10118    -1     
  Partials      104      104           
Flag Coverage Δ
rmf-dashboard-framework 32.11% <0.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@koonpeng koonpeng left a comment

Choose a reason for hiding this comment

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

I recall there used to be an arrow pointing to the target, which is why there is an X offset. It appears there is a regression which removes the arrow? Or was it never ported over to the threejs map?

@aaronchongth
Copy link
Member Author

It was never ported to threejs, and we added the layer filters and hover feature to enlarge the labels too, so the arrow was kind of redundant

@aaronchongth aaronchongth merged commit 4c56455 into main Nov 26, 2024
2 checks passed
@aaronchongth aaronchongth deleted the fix/1034 branch November 26, 2024 04:16
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.

[Other issue]: Waypoints labels are not properly align with waypoint.
2 participants