mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-21 19:08:11 +08:00
* icons, partway * redux for values * onChange * cancel * annotations lifecycle for category names * copy categorical * edit category * add Dataframe.withColsFrom * render user annotations; default add/delete annotation category * add label name to actions * category name edit * error checking improvements * change schema field isUserAnnotation to writable * always have an unassigned label; implement delete label * implement add new label and edit label name * label current cell selection * fix select exact bug in crossfilter * clean up categorical reducer * fix tests * remove debugging printf * implement subset/reset for user annotations * undo redo support for user annotations * remove duplicate button from categories * add modal * remove obsolete duplicate annotation reducers * remove old debugging printf * connect modal to annotation create and dup * initial full-stack wiring * finish up end-to-end wiring * fix existing unit tests * fix pytests to match new schema API * remove debugging printfs * add label file rotation * remove obsolete comment * add fbs encode/decode tests * add tests for writable annotations * simplify code * fix hashing bug with FBS encoding * lint * fix smoke tests * improve error checking in Dataframe.withColsFrom * add unit test for Dataframe.withColsFrom * add unit test for Dataframe.columns and Dataframe.renameCol * fix bug in FBS encode, add better error checks, refactor * add FBS encode/decode test * add clarifying comment * clean up action type names; fix state inconsistency in crossfilter update * change autosave timer to 2.5sec * sort categorical metadata render order so it remains consistent * add temporary autogenerated label for add-new-label operation * fix hover-over label menu interference with cell highlighting * remove debugging code * add missing reducer cases & fix typo * make dataframe memoize more general purpose * add dev mode for annos * fix error on select duplicate * handle zero occupancy categories * correctly maintain unclipped AND clipped world * correctly handle zero length FBS matrix and label files * ensure all writable categorical schema contains an unassigned category * handle case where building occupancy stack for category with no members * dialog for creating label, disable button if duplicate or empty * visually separate writeable * edit category * fix edit category name * remove debugging code * fix edit annotation label * visually define unassigned, change options * Pull in requirements.txt from `master` * label currently selected cells * duplicate label * lint * fix pytest merge issues * rename --label-file to --experimental-label-file * remove debugging console log * spelling error fix; fix bug found in PR review. * lint
82 lines
2.4 KiB
JavaScript
82 lines
2.4 KiB
JavaScript
import { Colors } from "@blueprintjs/core";
|
|
|
|
/* if a categorical metadata field has more options than this, truncate */
|
|
export const maxCategoricalOptionsToDisplay = 100;
|
|
|
|
/* default "unassigned" value for user-created categorical metadata */
|
|
export const unassignedCategoryLabel = "unassigned";
|
|
|
|
/*
|
|
these are default values for configuration the CLI may supply.
|
|
See the REST API and CLI specs for more info.
|
|
*/
|
|
export const configDefaults = {
|
|
features: {},
|
|
displayNames: {},
|
|
parameters: {
|
|
"max-category-items": 1000
|
|
}
|
|
};
|
|
|
|
/* colors */
|
|
export const blue = Colors.BLUE3;
|
|
export const linkBlue = Colors.BLUE5;
|
|
export const lightestGrey = "rgb(249,249,249)";
|
|
export const lighterGrey = "rgb(245,245,245)";
|
|
export const lightGrey = "rgb(211,211,211)";
|
|
export const mediumGrey = "rgb(153,153,153)";
|
|
export const darkGrey = "rgb(102,102,102)";
|
|
export const darkerGrey = "rgb(51,51,51)";
|
|
|
|
export const brightBlue = "#4a90e2";
|
|
export const brightGreen = "#A2D729";
|
|
export const darkGreen = "#448C4D";
|
|
|
|
export const nonFiniteCellColor = lightGrey;
|
|
export const defaultCellColor = "rgb(0,0,0,1)";
|
|
export const logoColor = "black"; /* logo pink: "#E9429A" */
|
|
|
|
/* typography constants */
|
|
|
|
export const tiniestFontSize = 12;
|
|
export const largestFontSize = 24;
|
|
export const uppercaseLetterSpacing = "0.04em";
|
|
export const bolder = 700;
|
|
export const accentFont = "Georgia,Times,Times New Roman,serif";
|
|
export const maxParagraphWidth = 600;
|
|
|
|
/* layout styles constants */
|
|
|
|
export const cellxgeneTitleLeftPadding = 14;
|
|
export const cellxgeneTitleTopPadding = 7;
|
|
|
|
export const maxControlsWidth = 800;
|
|
|
|
export const graphMargin = { top: 20, right: 10, bottom: 30, left: 40 };
|
|
export const graphWidth = 700;
|
|
export const graphHeight = 700;
|
|
export const scatterplotMarginLeft = 25;
|
|
|
|
export const leftSidebarWidth = 365;
|
|
export const leftSidebarSectionHeading = {
|
|
fontSize: 18,
|
|
textTransform: "uppercase",
|
|
fontWeight: 500,
|
|
letterSpacing: ".05em"
|
|
};
|
|
export const leftSidebarSectionPadding = 10;
|
|
|
|
/* various timing-related behaviors */
|
|
export const tooltipHoverOpenDelay = 1000; /* ms delay before a tooltip displays */
|
|
|
|
let _API = {
|
|
// prefix: "http://api.clustering.czi.technology/api/",
|
|
// prefix: "http://tabulamuris.cxg.czi.technology/api/",
|
|
// prefix: "http://api-staging.clustering.czi.technology/api/",
|
|
prefix: "http://localhost:5005/api/",
|
|
version: "v0.2/"
|
|
};
|
|
|
|
if (window.CELLXGENE && window.CELLXGENE.API) _API = window.CELLXGENE.API;
|
|
export const API = _API;
|