Clean up max-category front-end limit (#2347)

* remove topN category truncation from component rendering layer

* clean up category item limit implementation

* name change for clarity

* fix snapshot

* comments
This commit is contained in:
Bruce Martin
2021-07-29 16:05:10 -07:00
committed by GitHub
parent 27575b8d86
commit 8136387127
11 changed files with 215 additions and 167 deletions
+15 -3
View File
@@ -2,14 +2,14 @@ import { Colors } from "@blueprintjs/core";
import { dispatchNetworkErrorMessageToUser } from "./util/actionHelpers";
import ENV_DEFAULT from "../../environment.default.json";
/* if a categorical metadata field has more options than this, truncate */
export const maxCategoricalOptionsToDisplay = 200;
/* overflow category values are created using this string */
export const overflowCategoryLabel = ": all other labels";
/* default "unassigned" value for user-created categorical metadata */
export const unassignedCategoryLabel = "unassigned";
/*
these are default values for configuration the CLI may supply.
these are default values for configuration the CLI may supply.
See the REST API and CLI specs for more info.
*/
export const configDefaults = {
@@ -22,6 +22,18 @@ export const configDefaults = {
links: {},
};
/*
Most configuration is stored in the reducer. A handful of values
are global and stored here. They are typically set by the config
action handler, which pull the information from the backend/CLI.
All should be set here to their default value.
*/
export const globalConfig = {
/* if a categorical metadata field has more options than this, truncate */
maxCategoricalOptionsToDisplay: 200,
};
/* colors */
export const blue = Colors.BLUE3;
export const linkBlue = Colors.BLUE5;