informatics-isi-edu / ermrestjs

ERMrest client library in JavaScript
Apache License 2.0
4 stars 3 forks source link

Change default display of byte count column of asset #984

Closed RFSH closed 1 year ago

RFSH commented 1 year ago

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 add column-display to each individual byte_count_column. Therefore, we are going to introduce new properties inside the column-defaults:

{
  "tag:isrd.isi.edu,2023:column-defaults": {
  "by_name": { ... },
  "by_type": { ... },
  "asset": {
    "url": { ... },
    "byte_count": { ... },
    "filename": { ... },
    "md5": { ... },
    "sha256": { ... }
  }
}

Details

The following is summary of what we discussed. I just copied these from my notes and will clean them up later.

RFSH commented 1 year ago

The changes described above has been merged with master. Some clarification about the questions above: