Closed RFSH closed 1 year ago
The changes described above has been merged with master. Some clarification about the questions above:
column-defaults
logic we decided to go with a simple priority list. asset related properties will be honored first, then by_name
, and then by_type
.humanizeBytes
handlebars function which can be called directly, so data-modelers can easily access it.
Summary
In #903, we discussed allowing data-modelers to format a byte count column to show human-readable values. While the issue talks about two methods of doing this, we've only implemented the handlebars function for now. Now we would like to explore showing the human readable value by default for the
byte_count_column
of asset annotation (similar to how we're showing a download button by default for the asset column).Given that not all deployments might agree about using
si
by default, we also need to allow them to systematically change this default without the need to addcolumn-display
to each individualbyte_count_column
. Therefore, we are going to introduce new properties inside thecolumn-defaults
:Details
The following is summary of what we discussed. I just copied these from my notes and will clean them up later.
The current implementation of
column-defaults
is very simple. It starts with an empty object and adds the annotation underby_type
and thenby_name
. But for asset columns, we need to introduce a more complicated logic. We should not use thecolumn-display
s defined under theby_type
for any asset properties Does this make sense?.We're currently not checking whether a column is used in two different
asset
annotations. So technically, a column could be bothbyte_count
andfilename
. While we won't try to solve this now, we should ensure we're deterministically categorizing columns. So, in this case, the column should always be markedbyte_count
orfilename
, and the order of columns or definitions shouldn't matter.For
url
for bytes
The byte count value should be either a
Is there a way that data modelers can access the default display we wrote?