uselotus/lotus

Enhancements to Create Metric Screen

diego-escobedo opened this issue · 3 comments

Currently, the create a metric screen looks like this:

Screenshot 2023-02-18 at 10 17 10 PM

There's a few problems with it:

  1. there's too much going on. Counter Gauge and Custom are all together, even though those aren't the 3 categories of event we have. The templates take up too much space. The metric representing a cost is too prominent considering not too many people use it.
  2. There's no way to preview exactly what the events you're choosing for this metric are.
  3. It's unclear what the filters really mean/do.

To solve this, we want too enhance the metrics screen by doing the following:

  1. Make the 3 main types be Counter, Gauge, and Rate
  2. Move Custom to a toggle in the top right
  3. have filters explained better (is in vs is not in are for text fields and the rest are for numeric fields). Isin vs isnotin should be a multi-selector like in add features

Screenshot 2023-02-18 at 11 51 39 PM

4. Implement an endpoint in the backend for displaying the possible events (should match event_name, property_name if applicable, and filters) + show them
  1. implement an endpoint to get all event names + properties in this organization's events, so we can show them as a dropdown option in these options

Took care of 1. in #593. Also updated some of the fields in there + clarified how gauge pricing + proration works. @glamboyosa working on 3.

Updated Issue description (leaving old one up for posterity): (Also, axing #2 on this)

Currently, the create a metric screen looks like this:

Screenshot 2023-02-18 at 10 17 10 PM

There's no way to preview exactly what the events you're choosing for this metric are, which is a bit of a problem.

To solve this, we want too enhance the metrics screen by doing the following:

  1. Implement an endpoint in the backend for displaying the possible events (should match event_name, property_name if applicable, and filters) + show them, maybe a limit of 10 or something doesn't have to be anything crazy
  2. implement an endpoint to get all event names + properties in this organization's events, so we can show them as a dropdown option in these options