Commit Graph

308 Commits

Author SHA1 Message Date
Matt Weiden
d30087ca63 Add frontend smoke tests for annotations (#1154)
* Add smoke test for annotations features

* Do not save during annotations tests

* Fix botched rebase in dev guidelines

* Revert "Do not save during annotations tests"

This reverts commit f0bd970bb2.

* Respond to feedback from @bkmartinjr
2020-02-14 17:23:45 -08:00
Matt Weiden
ac13b31e13 Collect all env vars in one, easy-to-find place (#1149)
* Collect all env vars in one, easy-to-find place

Past state:
* Default environement variables were stored in both client/package.json
and client/__tests__/e2e/config.js
* Constants that should have been linked--like the cellxgene server port
during testing--were repeated.

With this commit:
* All environment variables are parameterized
* All environment variables are packaged in default env files

* Move npm scripts to client Makefile

* Respond to feedback from @seve and @bkmartinjr
2020-02-12 12:50:48 -08:00
Severiano Badajoz
5340a5f951 graph overlay improvements (#1141)
* check to see if display state has changed

* add display state

* create onDisplayChange

* check to see if displaying anything and add opacity drop

* pass callback down to children

* add middle truncation to labels

* remove unused import

* add a bit of documentation

* make prop addition more clear

* rename onDisplayChange -> overlayToggled for readability
2020-02-12 10:56:41 -08:00
Bruce Martin
e770db1e2c load annotations incrementally (#1107)
* load annotations individually

* fix type check to be more general

* update node CI version from 10 to 12

* node 11

* debug print node version

* travis node version to latest

* try nvm

* remove extraneous node_js statement

* remove node version debugging printf

* incrementally load all annotations and layout

* process annotations and layout as they are loaded

* fix tests

* sort categories incrementally

* incrementally build category view summary; add category loading spinner

* add spinner to continuous metadata

* configure undoable reducer

* incremental crossfilter creation

* improve busy layout

* more layout cleanup

* correctly reconcile categories in schema

* refine layout of lsb spinners

* more spinner layout work

* more spinner layout

* always load layout before obs annotations
2020-02-10 11:22:27 -08:00
Bruce Martin
1c9b9f6a08 js package dep update (#1145)
* js package dep update

* roll back start-server-and-test
2020-02-05 13:11:05 -08:00
Bruce Martin
3afc03b95b fix state prop bug with camera transform (#1138) 2020-01-31 12:13:35 -08:00
Matt Weiden
3dd50e5676 Version bump to 0.14.0 2020-01-27 16:18:19 -08:00
Colin Megill
9bdcf44564 Separate ontologies dialogue (#1126)
* componetization

* Ontologies as own menu option

* remove log

* remove dead suggest module
2020-01-27 15:10:57 -05:00
Matt Weiden
8b8a800453 Undo feature: fix case where previous state has no state filter (#1124)
* Undo feature: fix case where previous state has no state filter

Fixes https://github.com/chanzuckerberg/cellxgene/issues/1099

When the previous state that the undo feature is trying to roll back to
has no filter state, merging javascript dictionaries result in keeping
the current state filter, preventing the actionFilter from saving the
new state.

* Fix whitespace
2020-01-27 08:29:41 -08:00
Colin Megill
d48647a655 Ontologies (#1110)
* add sample ontologies file

* add ontologies reducer

* Move select category to own component

* Dialog and Input factored out

* refactoring categorical, partway

* validationn

* anno

* suggest  populates input

* frontend for ontology working

* initial implementation of back-end support for ontologies

* edit is now dialog again

* autosuggest working on edit

* part way through create arbitrary label

* handle choice in function

* pass duplicate cat  prop

* editing works

* update test to match new CLI params

* fix occupancy alignment

* edit category as dialogue

* secondary button

* remove stubbed out ontologies

* add label setting upon new label creation

* Update legal characters for labels (#1119)

* Allow any term in the ontology (bypass legal name check)

* Add hyphens and parens to legal characters in names

* improve performance for large ontologies

* correctly handle case where ontologies are disabled

* fix logic error in CLI

Co-authored-by: Bruce Martin <bruce@chanzuckerberg.com>

* PR cleanup 1

* lint

* validate user generated labels

* finish hooking up connected suggest component

* protect against undefined callbacks

* Fix illegal characters error message

* break out npm run commands

* fix error detection on label edit

Co-authored-by: Bruce Martin <bruce@chanzuckerberg.com>
Co-authored-by: Sidney Bell <sidneymbell@users.noreply.github.com>
2020-01-23 17:04:17 -05:00
Severiano Badajoz
8d725b1ad9 centroid labels (#872)
* refactor reducer to no longer support hover state and hold many labels

* refactor to generate centroidCoordinates for all values of a category

* create hash for function and memoize export

* create button to display all labels for a category

* clear state

* create label for each thing

* calculate on each value

* change to in place modification of map

* switch to for loop with iterator instead of forEach

* use map from centroidLabel instead of creating copy

* adapt for map

* utilize tarrays

* begin documentation

* disable centroids if in zoom mode

* clean up

* persist uncalc coordinates

* document

* clean up and document

* cleanup and document

* fix

* fix undefined labels and document changes

* fix first element skip

* fix conditional recalc

* rename centroidLabel -> centroidLabels

* break out dilation on hover to new reducer

* numerous styling changes for readability

* change centroid icon

* remove colorAccessor from parameters

* recalc centroids on world change

* make label toggle undoable

* remove unused import

* highlight labels on hover

* remove special characters from svg id

* lighten backdrop

* only generate new centroids if they pre-exist

* fix issue with spaces in catagorical value name

* add label buttons to menubar

* change reducer to use colorAccessor and have single toggle

* fix check to see if svg should be rendered

* move svg overlays onto a single svg layer

* dilate on label hover

* remove logs

* allow centroid to update along side regl renders

* allow actions to pass through svg if in zoom mode

* remove artifact from circle

* remove comment

* remove disabling of centroid button

* fix conditional map to screen

* make styling label conditions stricter

* prettier

* refactor onto master

* refactor computePointFlags() to use pointDilation store

* notify when viewport changes

* move svg attributes out of lasso setup and prevent rerenders/writes

* begin playing with transform matrix

* first solution for camera interaction

* create transform using nested groups

* semi-working method using nested groups with transforms

* inversely scale text

* properly do final transform

* cleanup dead / test code

* reinstate original functionality

* breakout centroid labels labels into separate component

* default toggle on for testing

* separate lasso and centroid layers

* remove unnecessary attributes, working hover

* dilation on label hover

* fix dilation on scatterplot

* add dilation on label hover

* break overlay into separate component

* make overlay agnostic to children

* move label mouse actions to centroidlabels component, add overlay state

* remove lasso on switch to camera

* disallow user selection

* fix reducer

* fix subset with continuous color error

* reset labels on color by continuous

* revert centroids on by default

* refactor for nested restructuring

* remove update checking

* remove unused method

* readd deleted hover delay

* remove old centroid setup

* remove centroid from undoable

* cleanup dead code

* remove dead code

* rollback unnecessary changes

* begin adding annotation functionality

* add annotation functionality

* add reset and undo functionality

* change centroids on layout change

* don't create label for unassigned

* add comment pointing out POI for performance

* touch up matrix transform comment

* add comment explaining coordinate space and children's assumed space

* remove dead code

* switch to pure component

* connect centroidLabels to redux

* clean up camera check and null result

* tool tip change

* rename centroid toggle and the like

* fix the misalignment of buttons, also make blueprint use consistent

* fix comment spelling mistakes

* introduce variable for cleaner logic expressions and state assignment

* alter tooltip text to back color by interaction

* remove manual iterator manipulation for forEach()

* remove debounce

* nit fix

* tooltip wording fix

* lint
2020-01-22 13:40:22 -08:00
Bruce Martin
8b329630f8 fix for issue 1112 - all user annotation category names must be unique across all obs annotatoins (#1114) 2020-01-16 09:28:29 -08:00
Bruce Martin
30f3ce49e4 update JS dependencies (#1106) 2020-01-15 17:11:51 -08:00
Matt Weiden
ddbfc458d7 Remove d3 dependency in crossfilter (#1108)
* Remove d3 dependency in crossfilter

Fixes https://github.com/chanzuckerberg/cellxgene/issues/648

* Revert "Remove d3 dependency in crossfilter"

This reverts commit 03b478f7dc.

* Remove d3 dependency in crossfilter

Fixes https://github.com/chanzuckerberg/cellxgene/issues/648

* Fix typo in docstring
2020-01-14 13:46:53 -08:00
Bruce Martin
677433bbf5 Fix label sorting bugs (#1102)
* move category label sort to utils

* refactor cat label sort

* fix category label sort and color assignment

* convert whitespace from tabs to spaces
2020-01-09 13:34:25 -08:00
Bruce Martin
2d39cb3b30 sort the embedding names for the UI (#1098) 2020-01-09 06:33:14 -08:00
Bruce Martin
18177b108f fix 1090 - add unassigned label to the new category, not the source category (#1094) 2020-01-09 06:32:38 -08:00
Matt Weiden
4c1ecf9e52 Specify histogram thresholds in fixed-length array (#1086)
* Specify histogram thresholds in fixed-length array

Fixes https://github.com/chanzuckerberg/cellxgene/issues/1082

For background, see the following:
* https://github.com/d3/d3-array/issues/46
* https://stackoverflow.com/questions/15880058/d3-js-ticks-function-giving-more-elements-than-needed

* Oops, off by one!
2020-01-06 11:13:02 -08:00
Matt Weiden
b172ff7f15 Add margins to histogram SVGs (#1085)
* Add a left margin to histogram SVGs

Fixes https://github.com/chanzuckerberg/cellxgene/issues/1042

1. Added "margins" to the SVG as in https://bl.ocks.org/mbostock/3019563
2. Tailored the brushable area to be just where the data is and locked
   puppeteerUtils to use that in e2e testing.

* Dial in margins to avoid y-axis clipping
2020-01-06 10:46:06 -08:00
Sidney Bell
97738e5c2d Remove FAQ link from info menu (#1084) 2020-01-02 16:04:38 -08:00
Matt Weiden
0b1bdca022 Use npm ci instead of npm install during build (#1080)
Currently the client build is not reproducible since, each time you run
`make build-client` the package lockfile is updated. This should be
handled separately by `make gen-package-lock` when developers actually
want to update the dependencies.

`npm ci` installs dependencies directly from the lockfile without
updating them, making builds reproducible.
2020-01-02 10:21:14 -08:00
Bruce Martin
6370025caf update all JS package deps (#1076)
* update dependencies - minor revisions

* update min node_js version to 10

* major npm package dep updates

* a few more updates
2020-01-02 09:14:09 -08:00
Matt Weiden
29947e25c3 Serve Roboto Condensed font from the app directly (#1077)
* Serve Roboto Condensed font from the app directly

Fixes https://github.com/chanzuckerberg/cellxgene/issues/344

* Remove second google fonts reference
2019-12-31 17:07:16 -08:00
Matt Weiden
f3015cb9df Makefile modularity, test targets, and auto-formatting (#1070)
* Fix Makefile whitespace and .PHONY use

* Fix Makefile filename

* Modularize Makefile into client and server Makefiles

Part of the reason that the Makefile in the root directory is a bit
complicated is that it tries to handle tasks that can be handled
separately in the client and server modules.

This commit pushes some of the make logic specific to each module into
their own makefiles and calls out to those makefiles from that in the
project root.

* Add auto-formatting to client and server modules

One thing that can make linting faster is auto-formatting. This commit
adds the yapf auto-formatting tool to the server module and uses
eslint's "fix" functionality to speed up the linting/formatting process.

* Add yapf for automatic code formatting

* Add a root test target that calls sub-tests

* Apply yapf to python files

* Do not duplicate npm commands, simply pass through

* Update documentation

* Do not shadow reserved word len

* Add general test target

* Fix make call in dev-env

* Use black instead of yapf

* Run flake8 from the root directory

* Revert "Apply yapf to python files"

This reverts commit cdca128a01.

* Apply black to python code

* Resolve lint errors resulting from black format

* Add explanation of server unit tests in dev guidelines
2019-12-27 14:43:37 -08:00
Bruce Martin
c9b6044c4f release 0.13.0 (#1064) 2019-11-26 15:45:13 -08:00
Bruce Martin
f8cef71eed help text changes (#1061)
* requested CLI help changes for launch sub-command

* update file name prose

* more wording changes

* more PR requests
2019-11-26 13:35:01 -08:00
Bruce Martin
d2171b9a2f fix perf regression introduced by user anno changes (#1060) 2019-11-25 18:16:49 -08:00
Bruce Martin
a593e95ab3 annotations CLI and file UX rework (#1049)
* rename config param label-file

* annotations rework - CLI params, file naming and backups

* lint

* improve cli option error checks

* enable session cookies

* enable session cookies

* add session id

* name annotations file in multi-dataset and multi-user safe manner

* pass data user hash to front-end

* add annotation collection name support to front-end

* add constant for annotation data collection name

* parameterize annotation collection name; make it sticky in the session

* clarify comments

* hard wire a temporary data collection name for testing

* prettier

* test comment

* package command

* set annotations  filename dialog

* name  and hash are visible

* wire up data collection capture
2019-11-25 15:28:28 -08:00
Bruce Martin
5713aa8792 category and label name validation updates (#1056)
* update label validation with new schema

* add new error messages for new label errors; general cleanup
2019-11-22 10:32:00 -08:00
Severiano Badajoz
9aaaad6709 tweak allotted width for value name + occupancy and tweak truncating (#1051) 2019-11-21 20:14:11 -08:00
Colin Megill
c2ededfc62 Anno editing label/category error states (#1048)
* anno error states

* label validation should not treat empty string as error

* disable Submit if no label or category entered

* edit category name error states

* flex start

* pr cleanup

* label name validation fixes

* PR comment responses
2019-11-21 19:08:29 -05:00
Bruce Martin
ee62dd355f [WIP] JS lint and dead code removal (#1053)
* lint and dead code removal

* fix regressions
2019-11-21 14:10:02 -08:00
Bruce Martin
9a540a4f0a fix erroneous state clearing (#1052) 2019-11-19 11:11:19 -08:00
Severiano Badajoz
5968da18b4 fix inconsistent sidebar value height(#1039) 2019-11-18 12:43:16 -08:00
Severiano Badajoz
bd5f816d58 fix dataset title clipping (#1040) 2019-11-18 12:42:55 -08:00
Severiano Badajoz
cf8f1a710d add padding to scatterplot shift (#1043) 2019-11-18 12:41:58 -08:00
Bruce Martin
2d0b646956 js dependency update (#1045) 2019-11-18 11:22:13 -08:00
Severiano Badajoz
68ad4b1228 bump @blueprintjs dependencies (#1038) 2019-11-13 11:56:48 -08:00
Bruce Martin
a52e86a69b improve category and label name validation (#1034) 2019-11-13 09:40:37 -08:00
Bruce Martin
04c83993d2 clear color-by mode when current category is deleted (#1033) 2019-11-12 15:31:06 -08:00
Colin Megill
cadf710bf8 remove duplicate handler (#1027) 2019-11-08 11:18:29 -05:00
Colin Megill
84900bad0e Warnings on anno textfields (#1023)
*  Warning for creating new label with an existing name

* category dup

* italics
2019-11-07 18:57:15 -05:00
Colin Megill
4c3d783fc8 Continuous data in right sidebar (#985)
* Create right sidebar files, move histos over

* restructure continuous legend + all padding

* right sidebar file

* proper graph positioning and resize

* new lasso values since right sidebar

* fix autosave position
2019-11-05 20:29:21 -05:00
Bruce Martin
461084eca1 Pin the 'unassigned' annotation value/label to bottom of list (#1018)
* pin unassigned label to bottom of category list

* pin unassigned label to bottom of category list
2019-11-05 09:22:39 -08:00
Bruce Martin
341d3015f0 fix typo (#1016) 2019-11-05 09:21:48 -08:00
Bruce Martin
7599af451f add context sensitivity to annotation "label" menu item (#1015)
* cache common results to reduce jank

* add util function in support of annotation labelling

* enable/disable annotation edit menus per issue 972; improve formatting

* PR review requests
2019-11-04 14:22:38 -08:00
Bruce Martin
a16c2e2747 crossfilter immutability error (#1009)
* add rename immutability test

* make rename immutable
2019-11-04 14:14:17 -08:00
Colin Megill
e50fd8b881 Animate list items on name change (#1008)
* animate list items

* fix comment
2019-11-04 14:09:16 -05:00
dependabot[bot]
345e2c344b Bump lodash.template from 4.4.0 to 4.5.0 in /client (#1002)
Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.4.0...4.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2019-11-03 10:56:04 -08:00
Colin Megill
3f0567c59f disable editing if already editing (#999) 2019-10-31 13:46:59 -04:00