Skip to content

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

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

Merged
merged 7 commits into from
Mar 14, 2025

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

@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
Comment on lines -3 to -10
export const DEFAULT_BUBBLE_SIZE = 12;

// "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;
export const RELEASE_BUBBLE_X_PADDING = 1;
export const RELEASE_BUBBLE_X_HALF_PADDING = RELEASE_BUBBLE_X_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.

moved these as default args in the hook

billyvg added 7 commits March 12, 2025 13:19
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.
Copy link
Member

@ryan953 ryan953 left a comment

Choose a reason for hiding this comment

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

maths!

@billyvg billyvg merged commit 61e23a8 into master Mar 14, 2025
41 checks passed
@billyvg billyvg deleted the ref-ui-configurable-release-bubble-padding branch March 14, 2025 17:16
billyvg added a commit that referenced this pull request Mar 27, 2025
Adds new release bubbles to the issue details graph


![image](https://github.com/user-attachments/assets/2eee7aa2-4971-43af-8031-892aa38d7efe)


ref #86946

depends on
- #86841
- #86840

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
andrewshie-sentry pushed a commit that referenced this pull request Mar 27, 2025
Adds new release bubbles to the issue details graph


![image](https://github.com/user-attachments/assets/2eee7aa2-4971-43af-8031-892aa38d7efe)


ref #86946

depends on
- #86841
- #86840

---------

Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants