Skip to content
Snippets Groups Projects
Unverified Commit 3305c815 authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

Previous period comparison shortcut in notebook mode (#43220)

* Sort functions

* Add boilerplate for aggregateOffset and tests

* Simplify assertion

* Make basic case work

* Handle name generation

* Do not require "lib/uuid" attribute to be present since MLv2 will normalize it under the hood anyway

* Fix typing

* Group tests

* Refactor offsetClause to return a new clause instead of a new query
- Move offsetClause to expressions.ts
- Add assertion

* Revert "Sort functions"

This reverts commit ab9ce2b24ea6bdad5ff7e9bed8ef38d4b5923f00.

* Move tests

* Handle names dynamically

* Shorten a test

* Update comment

* Add TODO

* Update expression types

* Add diffOffsetClause & percentDiffOffsetClause

* Add a test for diffOffsetClause

* Add TODOs

* Add tests for diffOffsetClause and percentDiffOffsetClause

* Unwrap tests

* Add skeleton for new tests

* Refactor first offsetClause tests

* Add tests for names

* Fix case of non-datetime columns

* Handle a case with offset < 1 and no breakouts

* Handle a case with offset < 1 and breakouts on non-datetime column

* Handle a case with offset < 1 and breakouts binned datetime column

* Handle a case with offset < 1 and breakout on non-binned datetime column

* Refactor

* Refactor

* Remove TODO

* Add tests for diffOffsetClause

* Add tests for percentDiffOffsetClause

* Move offset stuff to offset.ts and offset.unit.spec.ts

* Use template string for prefixes

* Use breakoutColumn + isDate to check column type

* Refactor

* Fix error message

* Add boilerplate for CompareAggregations

* Fix title

* Render aggregations list

* Style AccordionList

* Sort props

* Fix bucket name

* Use displayName instead shortName

* Support parseValue prop in NumberInput

* Add period input accepting integers only

* Accept non-negative values only

* Do not accept zeros

* Add state

* Add submit button

* Export offset functions via Lib

* Make it possible to skip rightSection

* Add column picker

* Map offset user input to api input (negative value)

* Add label

* Fix crash

* Extract shouldCreate

* Make onSelect in AggregationPicker support multiple values

* Extract ReferenceAggregationPicker

* Extract ColumnPicker

* Extract getAggregations

* Rename

* Add custom items

* Refactor item component

* Extract OffsetInput

* Remove unused data-testid

* Style OffsetInput

* Generate titles according to specs

* Generate label

* Generate help

* Extract utils

* Use different width for the 1st step

* Format code

* Use MultiSelect directly

* Avoid custom parseValue

* Revert MultiaAutocomplete changes

* Improve typing in describeTemporalInterval and
 describeRelativeDatetime

* Use describeTemporalUnit to pluralize

* Use interface

* Avoid setting value as DOM attribute

* Fix test

* Add onAdd prop to AggregationPicker and revert the change to have onSelect pass multiple aggregations

* Reduce number of props

* Render checkboxes in custom items

* Introduce and use --mb-color-brand-lighter

* Avoid !important

* Remove redundant prop

* Fix warning about isSelected being used as DOM attribute

* Fix positioning in case dir attribute is not present in any parent component

* Add type attribute to all ListItems
parent 2f0bc497
No related branches found
No related tags found
No related merge requests found
Showing
with 506 additions and 21 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment