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: Billable metrics rounding #1847

Merged
merged 9 commits into from
Nov 5, 2024
Merged

Conversation

stephenlago99
Copy link
Collaborator

@stephenlago99 stephenlago99 commented Nov 2, 2024

Context

Offer users the possibility to round the output of billable metrics aggregation.

Description

👉 ComboBox

  • Added the possibility to pass a containerClassName. Also took into account the recent discussion we had in the frontend team (to adapt the component structure to enable styling without an additional classname), but this functionality was at the core of many others and the impact would have been too big (80+ instances of "ComboBox")

👉 CreateBillableMetric

  • Following the discussion we had when implementing Custom expressions, decided to use the formik state to handle showing / hiding the field. Used undefined and null to keep track of different states that the field can be in.

👉 Object.values(RoundingFunctionEnum)

  • Just an interesting thought. Used this to create the values for the dropdown. But also thought about an edge case: if the backend adds a new type to this, the dropdown will show the value, but the translations would be missing => added a guard for that.

@stephenlago99 stephenlago99 self-assigned this Nov 2, 2024
@stephenlago99 stephenlago99 force-pushed the feat-billable-metrics-rounding branch from e0716a8 to 57ed367 Compare November 2, 2024 19:11
@stephenlago99 stephenlago99 force-pushed the feat-billable-metrics-rounding branch from fc4eaa4 to ef9b444 Compare November 4, 2024 10:00
@stephenlago99 stephenlago99 force-pushed the feat-billable-metrics-rounding branch from ef9b444 to 606a712 Compare November 5, 2024 14:18
@stephenlago99 stephenlago99 merged commit b2b86ec into main Nov 5, 2024
6 checks passed
@stephenlago99 stephenlago99 deleted the feat-billable-metrics-rounding branch November 5, 2024 17:33
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.

2 participants