From 0d2b14055244abff5769cfca22ad1ca3861bd176 Mon Sep 17 00:00:00 2001 From: David Lyon Date: Fri, 26 Apr 2024 15:07:01 -0700 Subject: [PATCH] Add hardcoded name list to README --- package.json | 2 +- src/features/collections/README.md | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8cd54391..26dd219b 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "lint": {}, "lint-list-item-indent": "mixed", "lint-maximum-line-length": 80, - "lint-no-missing-blank-lines": true, + "lint-no-missing-blank-lines": false, "lint-no-undefined-references": { "allow": [ "^1" diff --git a/src/features/collections/README.md b/src/features/collections/README.md index 20dab2e9..11919805 100644 --- a/src/features/collections/README.md +++ b/src/features/collections/README.md @@ -11,10 +11,27 @@ not be easily grokked from the code. Due to difficulties loading the GTDB collection, some functionality had to be special-cased to support its slightly different data schema. Once GTDB has been updated to match the schema of the other collections, these should be removed. -These instances are marked with comments staring with `// GTDB`. As of writing, +These instances are marked with comments staring with `GTDB`. As of writing, these include: - [// GTDB IDs are not (yet?) UPAs](https://github.com/kbase/ui/blob/abc33d5d357def6b3696aa2420cb500f17ea8d9f/src/features/collections/data_products/GenomeAttribs.tsx#L209) - [// GTDB has different column names (#1)](https://github.com/kbase/ui/blob/abc33d5d357def6b3696aa2420cb500f17ea8d9f/src/features/collections/data_products/GenomeAttribs.tsx#L294) - [// GTDB has different column names (#2)](https://github.com/kbase/ui/blob/abc33d5d357def6b3696aa2420cb500f17ea8d9f/src/features/collections/data_products/GenomeAttribs.tsx#L298-L300) - [// GTDB has different column names (#3)](https://github.com/kbase/ui/blob/c3494d03bc1b6da9d43bcaf8aee66962c73b241a/src/features/collections/data_products/GenomeAttribs.tsx#L320) + +### Other Hardcoded Column Values + +As of writing, some other collection column names have been hardcoded into the +codebase, these are marked with comments starting with `HARDCODED`. They +include: + +- [Special rendering for the `classification` column](https://github.com/kbase/ui/blob/3c89e2651710c92fed916d13cb98a5e47cd7c5e1/src/features/collections/data_products/GenomeAttribs.tsx#L220-L241) +- [using the `classification` filter as our default search filter](https://github.com/kbase/ui/blob/3c89e2651710c92fed916d13cb98a5e47cd7c5e1/src/features/collections/CollectionDetail.tsx#L174-L194) +- the field order parameter and the hidden fields parameter hardcode overrides + for which columns will appear and in what order + - [genomeAttribs](https://github.com/kbase/ui/blob/3c89e2651710c92fed916d13cb98a5e47cd7c5e1/src/features/collections/data_products/GenomeAttribs.tsx#L244-L246) + - [sampleAttribs](https://github.com/kbase/ui/blob/3c89e2651710c92fed916d13cb98a5e47cd7c5e1/src/features/collections/data_products/SampleAttribs.tsx#L287-L294) +- Plots are currently hardcoded for certain columns in the existing collections + schema + - [histogram](https://github.com/kbase/ui/blob/3c89e2651710c92fed916d13cb98a5e47cd7c5e1/src/features/collections/data_products/GenomeAttribs.tsx#L319-L325) + - [scatter](https://github.com/kbase/ui/blob/3c89e2651710c92fed916d13cb98a5e47cd7c5e1/src/features/collections/data_products/GenomeAttribs.tsx#L292-L304)