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

feat(ui): Make release bubble padding configurable #86841

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented Mar 11, 2025

We may need to configure different bubble styles when on different charts. This PR makes the padding configurable if needed. It also removes left padding from first bubble and right padding from last padding and fixes the vertical alignment of the bubble as well.

ref #85775

We will need to configure different bubble styles when on different charts. This PR makes the padding configurable if needed. It also removes left padding from first bubble and right padding from last padding.
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 11, 2025
@billyvg billyvg force-pushed the ref-ui-configurable-release-bubble-padding branch from bfb5f1d to 0241175 Compare March 11, 2025 21:24
@billyvg billyvg changed the title ref(ui): Forward ref for <BarChart> feat(ui): Make release bubble padding configurable Mar 11, 2025
Comment on lines 226 to 234
// bubbleStartX bubbleEndX
// | |
// v v
// ---------------- ----------------
// | | | |
// ---------------- ----------------
// ^ ^
// |--|
// bubblePadding.x
Copy link
Member Author

Choose a reason for hiding this comment

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

note my artisanal ascii art

@@ -1,10 +1,8 @@
export const BUBBLE_SERIES_ID = '__release_bubble__';
export const BUBBLE_AREA_SERIES_ID = '__release_bubble_area__';
export const DEFAULT_BUBBLE_SIZE = 12;
export const DEFAULT_BUBBLE_SIZE = 4;
Copy link
Member Author

Choose a reason for hiding this comment

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

Previously, the bubble size was the entire height including whitespace around it. This was because I started w/ the chart configuration and calculated everything else based on that.

I inverted this so that we define the actual bubble pixel height and calculate the chart offsets based on that + padding.


// "padding" around the bubbles as it is drawn on canvas vs CSS, this may need
// to move into `renderReleaseBubble` if it needs to be customizable
export const RELEASE_BUBBLE_Y_PADDING = 8;
export const RELEASE_BUBBLE_Y_HALF_PADDING = RELEASE_BUBBLE_Y_PADDING / 2;
Copy link
Member Author

Choose a reason for hiding this comment

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

calculate this since padding is now configurable.

@billyvg billyvg marked this pull request as ready for review March 11, 2025 22:39
@billyvg billyvg requested a review from a team as a code owner March 11, 2025 22:39
@billyvg billyvg requested a review from a team March 11, 2025 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant