FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Handle 'pixel' size mode for shape labels by camdecoster · Pull Request #7790 · plotly/plotly.js · GitHub

fix: Handle 'pixel' size mode for shape labels - #7790

Merged
camdecoster merged 9 commits into
masterfrom
cam/7749/shape-text-position-pixel-size-mode
May 8, 2026
Merged

fix: Handle 'pixel' size mode for shape labels#7790
camdecoster merged 9 commits into
masterfrom
cam/7749/shape-text-position-pixel-size-mode

Conversation

camdecoster commented May 1, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Description

Update shape label positioning logic to handle pixel size mode.

Closes #7749.

Changes

  • Update position calculations
  • Export helper to aid in calculations
  • Add tests
  • Add mock with baseline image

Screenshots

Before After

Testing

  • Be on master
  • Run devtools
  • Add new mock temporarily on branch
  • Load the mock
  • Note that the labels are missing
  • Switch to this branch
  • Load the mock again
  • Notes that the labels are positioned correctly

camdecoster self-assigned this May 1, 2026

Copy link
Copy Markdown
Contributor Author

The initial mock validation failed because one of the shape types was listed as "rectangle", which isn't valid. "rect" is what should have been listed. I didn't notice this because the default shape used when an invalid type is passed in is... "rect". Thanks CI, for keeping us honest.

camdecoster marked this pull request as ready for review May 1, 2026 22:16
camdecoster assigned emilykl and unassigned camdecoster May 5, 2026
emilykl previously approved these changes May 7, 2026

emilykl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@camdecoster Looks good as-is, left a couple comments with suggestions

emilykl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

🎉

camdecoster merged commit 4ce088e into master May 8, 2026
84 checks passed
camdecoster deleted the cam/7749/shape-text-position-pixel-size-mode branch May 8, 2026 17:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

[BUG]: Text in circle and rectangle shapes is positioned incorrectly

2 participants


Back | FazBrowse Home | New Git URL