-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(explore-attr-breakdowns): Cosolidating code #104194
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
Conversation
|
|
||
| return [ | ||
| '<div', | ||
| ' data-explore-chart-selection-region', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Shared tooltip adds unintended attribute to distribution chart
The shared tooltipActionsHtmlRenderer now applies data-explore-chart-selection-region to all tooltip actions. This changes the attributeDistributionChart's behavior, as it previously didn't have this attribute. Clicking its tooltip actions now prevents chart selections from clearing, which wasn't the case before.
| const roundsToWhole = rounded.endsWith('.0') || !rounded.includes('.'); | ||
|
|
||
| const decimals = roundsToWhole ? 0 : 1; | ||
| return `${percentage.toFixed(decimals)}%`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Percentage formatter logic changes output for some values
The percentageFormatter logic was changed in a way that produces different output for some values. The original used percentage % 1 === 0 to determine if a number is a whole number, which only matched exact whole numbers. The new logic checks if toFixed(1) ends with ".0", which matches any value that rounds to a whole number. For example, 50.04 previously displayed as "50.0%" but now displays as "50%". This contradicts the PR's claim of "No change in functionality".
Note: No change in functionality! just some minor style changes
Added shared components to
styles.tsxAdded shared constants to
constants.tsx