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: Custom expressions for billing metrics #1825

Merged
merged 29 commits into from
Nov 5, 2024

Conversation

stephenlago99
Copy link
Collaborator

@stephenlago99 stephenlago99 commented Oct 24, 2024

Context

This pull request contains the implementations for:

  • A new drawer for editing Custom expressions for Billable metrics.
  • A new section inside billable metrics that allows you to switch between Unique field / Custom expression

The changes were done based on the frontend dive-in: [FE] [Dive-in] Billable metric expressions.

Description

👉 CustomExpressionDrawer:

  • Has two editors, enables the user to type & verify & save an expression
  • The expression verification uses a new lago-expression package

👉 JsonEditor:

  • Refactored to support passing new text modes (this is useful for not validating expressions as JSON). The thought process behind this change can be found in the dive-in.
  • Refactored to support some new properties (custom errors, custom validate)

👉 Drawer:

  • Refactored to support passing a classname to the StickyBottomBar (in order to be able to pass a z-index, as the editors had a z-index of 4)

👉 lago-expression:

  • Currently it is embedded in our application, since the npm release process seemed trickier for a wasm package. When it will be released, we will swap it and remove it from our project.

@stephenlago99 stephenlago99 self-assigned this Oct 24, 2024
src/pages/CreateBillableMetric.tsx Outdated Show resolved Hide resolved
src/pages/CreateBillableMetric.tsx Outdated Show resolved Hide resolved
@stephenlago99 stephenlago99 force-pushed the feat-billing-metrics-custom-expressions branch from 330c1ca to f6bfd0c Compare October 31, 2024 14:54
@stephenlago99 stephenlago99 changed the title WIP: Feat billing metrics custom expressions feat: Custom expressions for billing metrics Nov 1, 2024
@stephenlago99 stephenlago99 merged commit 0967bb3 into main Nov 5, 2024
6 checks passed
@stephenlago99 stephenlago99 deleted the feat-billing-metrics-custom-expressions branch November 5, 2024 13:57
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