Skip to content

Σ 2️⃣ Footer calculation v0.2 - add frontend GUI

In this MR you'll see the brand new grid column footer for each field that allow to define an aggregation for this field. Only 4 aggregations are available now:

  • Empty count / percentage
  • Filled count / percentage

The aggregation values should be updated on row and filter modifications (also for real time collaboration). For now all aggregations are recomputed even if only one should be updated for some reason.

An aggregation must be registered in the dedicated registry prior to use it.

Aggregation has to types:

  • The raw type (or backend type) which is the real aggregation computed on the backend.
  • The type (or frontend type) which is the aggregation that is going to be displayed to the user

Why this distinction? Imagine two aggregation types:

  • The sum aggregation that compute the sum of all values. For this aggregation the type is sum and the raw_type is sum.
  • The average aggregation. To compute average aggregation you need the sum of all values that you divide by the value count. For this aggregation the type is average and the raw_type is sum.

The type is only useful on the frontend to compute the final value and the raw_type is the type actually used by the backend to compute the pre-value.

The same applies for percentage aggregation type. The percentage is computed based on the original value count converted to a percentage thanks to the row count.

This way it will be easier to add different aggregation based on same backend aggregation and to compute new aggregation values based on previous on the frontend side only (for perfomance optimisation).

You'll NOT see in this MR:

  • aggregation specifics to one type of field (even though this MR already include some code to handle that case)
  • Performant update

Spoiler alert -> next steps:

  • Add more aggregation types, some are specific to certain type of field.
  • Improve performances
  • Real time update of aggregation footer

In one image:

image

Merge Request Checklist

  • changelog.md has been updated if required
  • New/updated Premium features are separated correctly in the premium folder
  • The latest Chrome and Firefox have been used to test any new frontend features
  • Documentation has been updated
  • Quality Standards are met
  • Performance: tables are still fast with 100k+ rows, 100+ field tables
  • The redoc API pages have been updated for any REST API changes
  • Our custom API docs are updated for changes to endpoints accessed via api tokens
  • The UI/UX has been updated following UI Style Guide

Related to #735 (closed)

Edited by Jérémie Pardou

Merge request reports