Skip to content

Feat import errors#53

Merged
coeit merged 3 commits into
developmentfrom
feat-import-Errors
Feb 26, 2021
Merged

Feat import errors#53
coeit merged 3 commits into
developmentfrom
feat-import-Errors

Conversation

@coeit
Copy link
Copy Markdown
Contributor

@coeit coeit commented Feb 26, 2021

Closes #50

Description

This PR implements a Error snackbar via react-toastify for Data import. For now only wrong file types are thrown, since no validations on the files themselves is implemented yet.

@coeit coeit added the feature New feature or request label Feb 26, 2021
@coeit coeit self-assigned this Feb 26, 2021
@coeit coeit merged commit 9e5d239 into development Feb 26, 2021
@coeit coeit deleted the feat-import-Errors branch February 26, 2021 16:15
davelsio added a commit that referenced this pull request Jul 1, 2021
* Feat import errors (#53)

* chore: delete AppModal.jsx and rename AppModal2 to AppModal

* feat: import Errors install react-toastify

* feat: implement react-toastify toast notification on wrong file types

* merge 'main' into 'development'

* fix: linter errors

* chore: update dependencies 2021-06-09 (#65)

* fix: linter errors

* chore: update babel

* chore: update eslint

* chore: update css packages
- tailwindcss
- postcss
- autoprefixer
- css-loader
- mini-css-extract-plugin

* chore: update @testing-library/jest-dom@5.13.0

* chore: update nanoid@3.1.23, react-toastify@7.0.4

* chore: update mobx@6.3.2, mobx-react@7.2.0

* chore: vite migration (#66)

* chore: migrate from webpack to vitejs

* chore: remove unused root index.jsx

* fix: favicon is served from root

* fix: serve icons from /public

* chore: ignore public/ and index.html

* fix: remove redundant svg title

* feat: manual count unit (#69)

* feat: use AppDatalist for count unit selection and add more options
fix: expression table readAsText wasn't called correctly

* fix: move onloadend out of onload

* fix: restore preload functionality (#70)

* fix: use the correct icon extension

* fix: upload expression table does not read the file

* fix: use VITE_ prefix for importing env variables

* refactor: sort action handler

* fix: remove  leftover debug logs

* refactor: prettify imports

* chore: add *.local files to gitignore

* fix: prefix env variables with VITE_

* fix: add mandatory groupOrder and sampleOrder to gxp_settings example

* Typescript support (#72)

* chore: add typescript + eslint support

* fix: format and lint errors

* refactor: ported a few components to typescript as an example
- AppAnchor
- AppButton
- AppCheckbox

* feat: Cypress testing (#73)

* chore: port tests from jest to cypress
fix: ensure all tests are passing

* fix: missing updated yarn.lock file

* chore: add create-cypress-tests helper

* chore: support for component testing using vite-dev-server

* refactor: separate integration (standard) tests from component (ct) tests

* chore: ignore nyc coverage reports

* docs: update README with testing commands and example files docs

* tests: support path aliases in cypress tests (#74)

* fix: update ci workflow to work with the new configuration
- use yarn instead of npm (might require install?)
- use the new build command

* hotfix: when preloading, if no settings (or no group and sample order) are provided, use the default table colum order

* chore: use plotly from npm (#75)

* chore: use latest plotly from npm

* fix: remove unused autosize and responsive plotly layout options

* chore: eslint ignore index.html

* fix: remaining linter warnings in config files

* Chakra UI (#77)

* chore: add chakra-ui and load the provider

* chore: add react-icons package

* refactor: port App to TypeScript
- fix the dataframe loadFromObject config arg type to match the rows data structure
- port fetch and parser utils to TypeScript
- convert App to a function component

* feat: new application layout
- sidebar navigation has been replaced by a topbar (alternative sidebar also provided)
- only top level routes are displayed in the topbar
- delegate access to children subroutes and functionality

* refactor: extract nav and link components from app-layout into their own components folders

* feat: add prop to render accent conditionally

* refactor: sidebar-nav styles
- move the open transition to the stack
- provide default styles but allow overriding props
- add JSDoc to link props interface

* feat: add the data-layout sidebar component

* feat: add navigation cards to the data home page

* fix: missing hover styles in nav-card

* refactor: remove unused onMouse events

* fix: icon is not a native anchor prop

* fix: first-child is unsafe server-side error

* feat: support partial path matching when setting the active link color

* feat: support overriding FlexProps in topbar

* feat: do not uppercase sidebar links

* feat: add background color to the topbar

* fix: data layout background color overrides app layout styles

* feat: remove links prop from sidebar-nav
- all children are loaded manually

* feat: make sidebar-link accessible to kb navigation
- add tabIndex prop
- remove superfluous flex child

* feat: add sidebar-file and -button to nav-sidebar

* feat: remove unused data-layout

* feat: make topbar-link accessible to kb navigation

* feat: use list components for topbar-nav

* feat: support kb navigation in nav-card

* fix: nav-card content not growing in width

* fix: focused sidebar items should expand the content

* feat: matching hover and focus styles in sidebar -button and -file

* feat: matching hover and focus styles in topbar-link

* fix: sidebar-file should activate on kb input

* chore: add type-fest package

* refactor: rename data-page to data-home

* feat: add data-files page
- sidebar menu actions (no functionality yet)
- formik integration with the upload gene expression table menu and form

* feat: support kb navigation in sidebar-file

* chore: disable tailwind and plotly css files

* fix: consistent label styles in formik-file

* feat: support isRequired indicator and aria props in formik inputs

* feat: required separator and file fields in xtable-form

* fix: do not attempt to show hint in formik-file (readonly) field

* feat: integrate xtable submit with the stores

* fix: add missing string util module

* feat: add replicate cards to data-files page

* fix: dataframe removeColumn should search for the literal column name

* chore: remove unused DataLayout component and string utility module

* chore: remove unused GroupCard component

* feat: add bulkRemove fuctionality to data-files page

* feat: add formik-modal component

* feat: port info-form to chakra-ui

* feat: add 'load gene info table' menu functionality to the data-files page

* refactor: rename initialRef->initialFocusRef

* feat: add db-form component

* fix: duplicate input ids in formik-file

* fix: import-gxp-database menu triggering is an input

* feat: add import gxp database functionality

* fix: use a unique name in the export-form

* fix: escape the column delimiter before showing it on the form field

* refactor: moved new data modules to a the pages folder

* refactor: consistent names for data pages

* refactor: consistent app-routes name

* feat: improve data-files accessibility
- move sidebar animation to sidebar-nav component
- structure sidebar-nav as region->section-buttons
- sidebar-button mouse click is only triggered by main mouse button
- add aria-label to repl-card component
- add tabIndex and focus visual cues to repl-card

* fix: sidebar-nav hover area should be the full sidebar

* feat: more props in sidebar-button
- add textGap to control the text-to-icon spacing
- inherit from FlexProps and pass props to the container

* feat: tentative plots-home page and layout

* fix: sidebar-nav actions should be sticky

* feat: more accessible repl-card
- add hover styles
- remove tabIndex from non-interactive card
- add aria-label to checkbox and button

* refactor: slightly optimize for speed the bulk delete implementation

* fix: center text icons in plots-home sidebar

* feat: optional visually hidden label in formik fields

* refactor: inherit ModalProps in formik-modal

* chore: remove tailwindcss code and dependencies

* feat: bars form and formik arrray (#78)

* feat: support left-,right- input addons and elements in formik-field

* feat: add groupProps API to formik-field

* feat: add bars plot form

* feat: expose form-control props in formik-field

* feat: add formik-field component

* feat: add legend and caption switches to bars-form
refactor: improve bars-form semantic html

* feat: improve bars-form modal styles
- increase modal size to xl
- move scrollbar to window

* fix: remove legend and caption switch validation (dev leftover)

* refactor: rename menu to Bars Plot (plural) for consistency

* hotfix: replicate cards wrap does not retain full-width when only two or less cards exist

* refactor: plot store (#79)


* wip: plot store refactor

* add missing plot-store types

* refactor: Plot components (#80)

* wip: plot-components

* wip: plot-components

* feat: add plot data utility functions

* re-add plot-store functionality to compute plotly plot data

* refactor: re-add functionality to the side-bar
- add forms for plottypes
- update generic PlotlyPlot component

* refactor: port PlotCaption and GeneCard to typescript and chakra

* chore: remove unused Plot component

* chore: cleanup typescript warnings / logs

* fix: legend name for singleGene bar/ind Lines

* refactor: Individual lines navigation label name

* feat: heatmap plot (#81)

* feat: heatmap utility module
- refactor functions to have a single responsibility
- add a valuesToBins function to transform clustering results into visx consumable data
- add and type the ml-distance package

* chore: add documented regions to heatmap module

* feat: add heatmap-plot component

* feat: add heatmap plot store functionality

* feat: add heatmap plot menus and form to plots-home

* fix: add missing key to the loading spinner in plots-home

* feat: support for resizing heatmap plots

* fix: only one 'main' per page

* fix: remove percentage-based resize limits

* feat: show a loading indicator during internal plot computation

* refactor: extract heatmap-plot container into a separate component

* fix: hacking workaround to give time for observers to react to plot `isLoading` before blocking the UI

* fix: non-matching bracket

* feat: improvements to the heatmap-plot component
- add custom interfaces for heatmap-plot bins
- add bottom labels to the plot
- increase container height

* feat: add a `toBins` method to the dataframe class

* fix: loadGxpSettings accepts a partial object

* chore: use modular visx dependencies

* feat: support selecting replicate subsets in heatmap visualizations

* fix: in the  heatmap, treat an empty replicates subset as if it were undefined

* chore: minor code cleanup

* chore: support path alias autocompletion in IDEs that read `tsconfig.json`.

* refactor: use plot-container for plotly plots (#82)

* feat: use plot-container for plotly plots
refactor: plot-container to display plot-title as h1
fix: warning to cleanup ref in resizePlot useEffect

* refactor: add flex direction column to PlotlyPlot

* fix: heatmap padding not a property value in firefox

* fix: prevent using stale reference for figureRef

* fix: observe internalRef

* fix: modebar styles

* refactor: remove html title
fix: re-add height 900

* fix: add overflow to Plot captions

* refactor: reduce tick line height

* refactor: reduce plot-container height

* refactor: port dataframe and remaining utilities to typescript (#83)

* refactor: port the dataframe class and all related utility modules to typescript

* refactor: sort alphabetically

* refactor: port data-store to typescript

* refactor: rename internal arr2d variable to arrayOfColumns

* Readd pca (#84)

* feat: add PCA plot type

* fix: PlotlyPlot adjust to full size of parent

* refactor: add flexShrink to PlotlyPlot captions

* fix: pca rename dataframe functions from develop merge

* fix: setToColor utility. Object.fromEntries takes zipped Array

* Gene browser tool (#85)

* feat: tools routes and home page

* feat: add formik-number input

* feat: add gene-browser page, form, and card

* chore: remove old unused gene-browser components

* fix: consistent geneInfo structure in deprecated gene-card component

* refactor: name useEffect function

* feat: add gene-details table and modal

* feat: add a spinner during page data loading

* refactor: remove leftover demo caption

* feat: Enter key in focused card opens the details table modal

* feat: adjust modal size in larger screens

* feat: increase table header font

* chore: update legacy PlotCaption gene-card module path

* feat: rename search accession -> search in accessions for clarity

* feat: hack to show the loading spinner in heavy search computations

* refactor: type the modalSize computed prop

* Heatmap title tooltip (#86)

* feat: add heatmap plot Title

* feat: add tooltips to heatmap

* chore: add comment to separate tooltip logic

* fix: remove titleHeight from yScale. Add top offset instead

* fix: remove additional title height from core plot bounds
refactor: move all plotDims variables inside the useEffect computation
refactor: tweak styles for the tooltip

* refactor: rename clientWidth->plotBounds (clarity)

Co-authored-by: David Velasco <davvelsan@gmail.com>

* feat: add left axis to heatmap (#87)

* feat: add left axis to heatmap (#87)

* feat: accession autocomplete (#88)

* feat: add left axis to heatmap (#87)

* feat: add useMatchAccession hook

* feat: add formik-accession input component

* feat: add autocomplete formik-accession to bars and lines plots

* feat: heatmap dendro (#89)

* feat: createHeatmapPlot also returns a cluster tree

* fix: correct heatmap plot props

* wip: heatmap + dendrogram

* feat: sort the clustered heatmap matrix
- add a function to get leave names from a cluster object
- add a function to sort a distance matrix to match the clustering results
- createHeatmapPlot now returns the clustered matrix

* fix: use standard tickLabelSize

* fix: use correct row names

* chore: remove unused imports

* fix: tooltip placement did not account for the dendrogram plot offset

* fix: sort the matrix rows to match the clustered tree

* feat: invert the heatmap colors to match a distance value

Co-authored-by: coeit <cbeiteneuer@gmail.com>

* chore: remove leftover debug logs

* feat: plots sidebar layout, icons, and delete functionality (#90)

* feat: fixed plots sidebar with real icons

* feat: add delete plots button

* feat: rename menus to eliminate superfluous information

* feat: Info routes (#92)

* feat: add a new link-card component

* feat: add info module route and page

* fix: typo

* feat: app layout and flow tweaks (#91)

* feat: change the default data route to data-files

* feat: disable plot actions when no meaningful action can be taken

* feat: add warning alert to plots-home when no data has been loaded

* fix: add missing disabled property to sidebar-button

* fix: plots sidebar should not be on top of the plots form modal overlay

* feat: disable remove data menu if no data is loaded

* fix: remove plots should function if there are plots, even if there is no data

* refactor: rename variables for clarity

* fix: disabled buttons prevent sidebar collapse

* fix: prevent toolbar-link text selection

* feat: remove empty app home page and add a redirect to /data

* feat: add an empty app-home page that for now redirects to /data

* feat: warn the user if no data is loaded when in gene-browser tool

* feat: plot actions (#93)

* wip: download util

* refactor: port download util to ts

* feat: add default config to PlotlyPlot for downloading as svg

* refactor: rename download util to svg util

* feat: wip: add rudimentary downaload button to heatmap plot

* feat:
- rename plot key prop to id.
- restore delete for PlotlyPlot

* feat: add standard plot config to pca plot

* fix: add missing key - id change

* feat: add plot-container actions
- download plot
- delete plot

* feat: only show plot actions in visx plots
- workaround until the modebar is removed

* feat: delete Plot for heatmap

* fix: add missing id prop

* fix: add missing id prop

Co-authored-by: David Velasco <davvelsan@gmail.com>

* feat: accession validation (#94)

* feat: verify that the accession exists before submitting a plot

* feat: do not validate accession inputs onBlur

* hotfix: ensure form delimiters are correctly unescaped

* chore: pre-deploy cleanup (#95)

- remove old components
- standard snake-case file names

* chore: merge main into develop

* chore: remove legacy layout components

* chore: remove legacy modules

* chore: remove unused icons

Co-authored-by: coeit <36563701+coeit@users.noreply.github.com>
Co-authored-by: coeit <cbeiteneuer@gmail.com>
davelsio added a commit that referenced this pull request Jul 7, 2021
* Feat import errors (#53)

* chore: delete AppModal.jsx and rename AppModal2 to AppModal

* feat: import Errors install react-toastify

* feat: implement react-toastify toast notification on wrong file types

* merge 'main' into 'development'

* fix: linter errors

* chore: update dependencies 2021-06-09 (#65)

* fix: linter errors

* chore: update babel

* chore: update eslint

* chore: update css packages
- tailwindcss
- postcss
- autoprefixer
- css-loader
- mini-css-extract-plugin

* chore: update @testing-library/jest-dom@5.13.0

* chore: update nanoid@3.1.23, react-toastify@7.0.4

* chore: update mobx@6.3.2, mobx-react@7.2.0

* chore: vite migration (#66)

* chore: migrate from webpack to vitejs

* chore: remove unused root index.jsx

* fix: favicon is served from root

* fix: serve icons from /public

* chore: ignore public/ and index.html

* fix: remove redundant svg title

* feat: manual count unit (#69)

* feat: use AppDatalist for count unit selection and add more options
fix: expression table readAsText wasn't called correctly

* fix: move onloadend out of onload

* fix: restore preload functionality (#70)

* fix: use the correct icon extension

* fix: upload expression table does not read the file

* fix: use VITE_ prefix for importing env variables

* refactor: sort action handler

* fix: remove  leftover debug logs

* refactor: prettify imports

* chore: add *.local files to gitignore

* fix: prefix env variables with VITE_

* fix: add mandatory groupOrder and sampleOrder to gxp_settings example

* Typescript support (#72)

* chore: add typescript + eslint support

* fix: format and lint errors

* refactor: ported a few components to typescript as an example
- AppAnchor
- AppButton
- AppCheckbox

* feat: Cypress testing (#73)

* chore: port tests from jest to cypress
fix: ensure all tests are passing

* fix: missing updated yarn.lock file

* chore: add create-cypress-tests helper

* chore: support for component testing using vite-dev-server

* refactor: separate integration (standard) tests from component (ct) tests

* chore: ignore nyc coverage reports

* docs: update README with testing commands and example files docs

* tests: support path aliases in cypress tests (#74)

* fix: update ci workflow to work with the new configuration
- use yarn instead of npm (might require install?)
- use the new build command

* hotfix: when preloading, if no settings (or no group and sample order) are provided, use the default table colum order

* chore: use plotly from npm (#75)

* chore: use latest plotly from npm

* fix: remove unused autosize and responsive plotly layout options

* chore: eslint ignore index.html

* fix: remaining linter warnings in config files

* Chakra UI (#77)

* chore: add chakra-ui and load the provider

* chore: add react-icons package

* refactor: port App to TypeScript
- fix the dataframe loadFromObject config arg type to match the rows data structure
- port fetch and parser utils to TypeScript
- convert App to a function component

* feat: new application layout
- sidebar navigation has been replaced by a topbar (alternative sidebar also provided)
- only top level routes are displayed in the topbar
- delegate access to children subroutes and functionality

* refactor: extract nav and link components from app-layout into their own components folders

* feat: add prop to render accent conditionally

* refactor: sidebar-nav styles
- move the open transition to the stack
- provide default styles but allow overriding props
- add JSDoc to link props interface

* feat: add the data-layout sidebar component

* feat: add navigation cards to the data home page

* fix: missing hover styles in nav-card

* refactor: remove unused onMouse events

* fix: icon is not a native anchor prop

* fix: first-child is unsafe server-side error

* feat: support partial path matching when setting the active link color

* feat: support overriding FlexProps in topbar

* feat: do not uppercase sidebar links

* feat: add background color to the topbar

* fix: data layout background color overrides app layout styles

* feat: remove links prop from sidebar-nav
- all children are loaded manually

* feat: make sidebar-link accessible to kb navigation
- add tabIndex prop
- remove superfluous flex child

* feat: add sidebar-file and -button to nav-sidebar

* feat: remove unused data-layout

* feat: make topbar-link accessible to kb navigation

* feat: use list components for topbar-nav

* feat: support kb navigation in nav-card

* fix: nav-card content not growing in width

* fix: focused sidebar items should expand the content

* feat: matching hover and focus styles in sidebar -button and -file

* feat: matching hover and focus styles in topbar-link

* fix: sidebar-file should activate on kb input

* chore: add type-fest package

* refactor: rename data-page to data-home

* feat: add data-files page
- sidebar menu actions (no functionality yet)
- formik integration with the upload gene expression table menu and form

* feat: support kb navigation in sidebar-file

* chore: disable tailwind and plotly css files

* fix: consistent label styles in formik-file

* feat: support isRequired indicator and aria props in formik inputs

* feat: required separator and file fields in xtable-form

* fix: do not attempt to show hint in formik-file (readonly) field

* feat: integrate xtable submit with the stores

* fix: add missing string util module

* feat: add replicate cards to data-files page

* fix: dataframe removeColumn should search for the literal column name

* chore: remove unused DataLayout component and string utility module

* chore: remove unused GroupCard component

* feat: add bulkRemove fuctionality to data-files page

* feat: add formik-modal component

* feat: port info-form to chakra-ui

* feat: add 'load gene info table' menu functionality to the data-files page

* refactor: rename initialRef->initialFocusRef

* feat: add db-form component

* fix: duplicate input ids in formik-file

* fix: import-gxp-database menu triggering is an input

* feat: add import gxp database functionality

* fix: use a unique name in the export-form

* fix: escape the column delimiter before showing it on the form field

* refactor: moved new data modules to a the pages folder

* refactor: consistent names for data pages

* refactor: consistent app-routes name

* feat: improve data-files accessibility
- move sidebar animation to sidebar-nav component
- structure sidebar-nav as region->section-buttons
- sidebar-button mouse click is only triggered by main mouse button
- add aria-label to repl-card component
- add tabIndex and focus visual cues to repl-card

* fix: sidebar-nav hover area should be the full sidebar

* feat: more props in sidebar-button
- add textGap to control the text-to-icon spacing
- inherit from FlexProps and pass props to the container

* feat: tentative plots-home page and layout

* fix: sidebar-nav actions should be sticky

* feat: more accessible repl-card
- add hover styles
- remove tabIndex from non-interactive card
- add aria-label to checkbox and button

* refactor: slightly optimize for speed the bulk delete implementation

* fix: center text icons in plots-home sidebar

* feat: optional visually hidden label in formik fields

* refactor: inherit ModalProps in formik-modal

* chore: remove tailwindcss code and dependencies

* feat: bars form and formik arrray (#78)

* feat: support left-,right- input addons and elements in formik-field

* feat: add groupProps API to formik-field

* feat: add bars plot form

* feat: expose form-control props in formik-field

* feat: add formik-field component

* feat: add legend and caption switches to bars-form
refactor: improve bars-form semantic html

* feat: improve bars-form modal styles
- increase modal size to xl
- move scrollbar to window

* fix: remove legend and caption switch validation (dev leftover)

* refactor: rename menu to Bars Plot (plural) for consistency

* hotfix: replicate cards wrap does not retain full-width when only two or less cards exist

* refactor: plot store (#79)


* wip: plot store refactor

* add missing plot-store types

* refactor: Plot components (#80)

* wip: plot-components

* wip: plot-components

* feat: add plot data utility functions

* re-add plot-store functionality to compute plotly plot data

* refactor: re-add functionality to the side-bar
- add forms for plottypes
- update generic PlotlyPlot component

* refactor: port PlotCaption and GeneCard to typescript and chakra

* chore: remove unused Plot component

* chore: cleanup typescript warnings / logs

* fix: legend name for singleGene bar/ind Lines

* refactor: Individual lines navigation label name

* feat: heatmap plot (#81)

* feat: heatmap utility module
- refactor functions to have a single responsibility
- add a valuesToBins function to transform clustering results into visx consumable data
- add and type the ml-distance package

* chore: add documented regions to heatmap module

* feat: add heatmap-plot component

* feat: add heatmap plot store functionality

* feat: add heatmap plot menus and form to plots-home

* fix: add missing key to the loading spinner in plots-home

* feat: support for resizing heatmap plots

* fix: only one 'main' per page

* fix: remove percentage-based resize limits

* feat: show a loading indicator during internal plot computation

* refactor: extract heatmap-plot container into a separate component

* fix: hacking workaround to give time for observers to react to plot `isLoading` before blocking the UI

* fix: non-matching bracket

* feat: improvements to the heatmap-plot component
- add custom interfaces for heatmap-plot bins
- add bottom labels to the plot
- increase container height

* feat: add a `toBins` method to the dataframe class

* fix: loadGxpSettings accepts a partial object

* chore: use modular visx dependencies

* feat: support selecting replicate subsets in heatmap visualizations

* fix: in the  heatmap, treat an empty replicates subset as if it were undefined

* chore: minor code cleanup

* chore: support path alias autocompletion in IDEs that read `tsconfig.json`.

* refactor: use plot-container for plotly plots (#82)

* feat: use plot-container for plotly plots
refactor: plot-container to display plot-title as h1
fix: warning to cleanup ref in resizePlot useEffect

* refactor: add flex direction column to PlotlyPlot

* fix: heatmap padding not a property value in firefox

* fix: prevent using stale reference for figureRef

* fix: observe internalRef

* fix: modebar styles

* refactor: remove html title
fix: re-add height 900

* fix: add overflow to Plot captions

* refactor: reduce tick line height

* refactor: reduce plot-container height

* refactor: port dataframe and remaining utilities to typescript (#83)

* refactor: port the dataframe class and all related utility modules to typescript

* refactor: sort alphabetically

* refactor: port data-store to typescript

* refactor: rename internal arr2d variable to arrayOfColumns

* Readd pca (#84)

* feat: add PCA plot type

* fix: PlotlyPlot adjust to full size of parent

* refactor: add flexShrink to PlotlyPlot captions

* fix: pca rename dataframe functions from develop merge

* fix: setToColor utility. Object.fromEntries takes zipped Array

* Gene browser tool (#85)

* feat: tools routes and home page

* feat: add formik-number input

* feat: add gene-browser page, form, and card

* chore: remove old unused gene-browser components

* fix: consistent geneInfo structure in deprecated gene-card component

* refactor: name useEffect function

* feat: add gene-details table and modal

* feat: add a spinner during page data loading

* refactor: remove leftover demo caption

* feat: Enter key in focused card opens the details table modal

* feat: adjust modal size in larger screens

* feat: increase table header font

* chore: update legacy PlotCaption gene-card module path

* feat: rename search accession -> search in accessions for clarity

* feat: hack to show the loading spinner in heavy search computations

* refactor: type the modalSize computed prop

* Heatmap title tooltip (#86)

* feat: add heatmap plot Title

* feat: add tooltips to heatmap

* chore: add comment to separate tooltip logic

* fix: remove titleHeight from yScale. Add top offset instead

* fix: remove additional title height from core plot bounds
refactor: move all plotDims variables inside the useEffect computation
refactor: tweak styles for the tooltip

* refactor: rename clientWidth->plotBounds (clarity)

Co-authored-by: David Velasco <davvelsan@gmail.com>

* feat: add left axis to heatmap (#87)

* feat: add left axis to heatmap (#87)

* feat: accession autocomplete (#88)

* feat: add left axis to heatmap (#87)

* feat: add useMatchAccession hook

* feat: add formik-accession input component

* feat: add autocomplete formik-accession to bars and lines plots

* feat: heatmap dendro (#89)

* feat: createHeatmapPlot also returns a cluster tree

* fix: correct heatmap plot props

* wip: heatmap + dendrogram

* feat: sort the clustered heatmap matrix
- add a function to get leave names from a cluster object
- add a function to sort a distance matrix to match the clustering results
- createHeatmapPlot now returns the clustered matrix

* fix: use standard tickLabelSize

* fix: use correct row names

* chore: remove unused imports

* fix: tooltip placement did not account for the dendrogram plot offset

* fix: sort the matrix rows to match the clustered tree

* feat: invert the heatmap colors to match a distance value

Co-authored-by: coeit <cbeiteneuer@gmail.com>

* chore: remove leftover debug logs

* feat: plots sidebar layout, icons, and delete functionality (#90)

* feat: fixed plots sidebar with real icons

* feat: add delete plots button

* feat: rename menus to eliminate superfluous information

* feat: Info routes (#92)

* feat: add a new link-card component

* feat: add info module route and page

* fix: typo

* feat: app layout and flow tweaks (#91)

* feat: change the default data route to data-files

* feat: disable plot actions when no meaningful action can be taken

* feat: add warning alert to plots-home when no data has been loaded

* fix: add missing disabled property to sidebar-button

* fix: plots sidebar should not be on top of the plots form modal overlay

* feat: disable remove data menu if no data is loaded

* fix: remove plots should function if there are plots, even if there is no data

* refactor: rename variables for clarity

* fix: disabled buttons prevent sidebar collapse

* fix: prevent toolbar-link text selection

* feat: remove empty app home page and add a redirect to /data

* feat: add an empty app-home page that for now redirects to /data

* feat: warn the user if no data is loaded when in gene-browser tool

* feat: plot actions (#93)

* wip: download util

* refactor: port download util to ts

* feat: add default config to PlotlyPlot for downloading as svg

* refactor: rename download util to svg util

* feat: wip: add rudimentary downaload button to heatmap plot

* feat:
- rename plot key prop to id.
- restore delete for PlotlyPlot

* feat: add standard plot config to pca plot

* fix: add missing key - id change

* feat: add plot-container actions
- download plot
- delete plot

* feat: only show plot actions in visx plots
- workaround until the modebar is removed

* feat: delete Plot for heatmap

* fix: add missing id prop

* fix: add missing id prop

Co-authored-by: David Velasco <davvelsan@gmail.com>

* feat: accession validation (#94)

* feat: verify that the accession exists before submitting a plot

* feat: do not validate accession inputs onBlur

* hotfix: ensure form delimiters are correctly unescaped

* chore: pre-deploy cleanup (#95)

- remove old components
- standard snake-case file names

* chore: merge main into develop

* chore: remove legacy layout components

* chore: remove legacy modules

* chore: remove unused icons

* fix: missing validateOnBlur for data forms (#98)

* feat: color by for stacked lines form (#99)

* wip: feat colorBy, formik radio component

* feat: generic form-radio component

* feat: stacked-lines use form-radio for colorBy

* chore: remove debug logs

* feat: add optional direction prop

* refactor: RadioOptions extend RadioProps

* feat: remove all modebar buttons but download and delete (#101)

* feat: preload tweaks (#100)

* feat: hide data manipulation menus when preloaded

* fix: remove env var for not-implemented plot preloading

* feat: disable repl-card delete and select buttons if preloaded

* feat: remove resizer styles until a cross-browser solution is implemented

* feat: add a new image plot type to the plots store

* feat: display images in the plots page
- new image-plot component to display images
- new image-form component to load new images

* fix: image alt should be required

* fix: no need (probably) to async the addImagePlot action

* fix: add a repl-card tabIndex if preloading (no button interactions)

* feat: use plot-container for the image-plot
- enable delete button
- standardize plot styles

* feat: delete image plot
- reuse delete plot action
- revoke url if plot type is image

* fix: import the gxp database image as blob

* fix: backwards compatibility with single-image databases
- export the first image-plot within the generated zip

* fix: preloaded should check for data property when disabling repl-card functionality

* fix: missing delete replicate button

* fix: tests failing (#102)

* chore: remove AppAnchor test. AppAnchor no longer exists

* chore: add chai-exclude package

* fix: cypress tsconfig compiler options to use es2019

* fix: enrichment analyses test

* fix: heatmap tests

* chore: remove unused commented code

* chore: delete deprecated tests folder

* fix: test name

* feat: app state (#103)

* fix: fetchResource should not return undefined, but throw instead

* refactor: app-layout inherits props from FlexProps

* feat: add application state
- when preloading, show a loading indicator and message
- if preloading failed, override routes with an error message

Co-authored-by: coeit <36563701+coeit@users.noreply.github.com>
Co-authored-by: coeit <cbeiteneuer@gmail.com>
coeit added a commit that referenced this pull request Aug 20, 2021
* Feat import errors (#53)

* chore: delete AppModal.jsx and rename AppModal2 to AppModal

* feat: import Errors install react-toastify

* feat: implement react-toastify toast notification on wrong file types

* merge 'main' into 'development'

* fix: linter errors

* chore: update dependencies 2021-06-09 (#65)

* fix: linter errors

* chore: update babel

* chore: update eslint

* chore: update css packages
- tailwindcss
- postcss
- autoprefixer
- css-loader
- mini-css-extract-plugin

* chore: update @testing-library/jest-dom@5.13.0

* chore: update nanoid@3.1.23, react-toastify@7.0.4

* chore: update mobx@6.3.2, mobx-react@7.2.0

* chore: vite migration (#66)

* chore: migrate from webpack to vitejs

* chore: remove unused root index.jsx

* fix: favicon is served from root

* fix: serve icons from /public

* chore: ignore public/ and index.html

* fix: remove redundant svg title

* feat: manual count unit (#69)

* feat: use AppDatalist for count unit selection and add more options
fix: expression table readAsText wasn't called correctly

* fix: move onloadend out of onload

* fix: restore preload functionality (#70)

* fix: use the correct icon extension

* fix: upload expression table does not read the file

* fix: use VITE_ prefix for importing env variables

* refactor: sort action handler

* fix: remove  leftover debug logs

* refactor: prettify imports

* chore: add *.local files to gitignore

* fix: prefix env variables with VITE_

* fix: add mandatory groupOrder and sampleOrder to gxp_settings example

* Typescript support (#72)

* chore: add typescript + eslint support

* fix: format and lint errors

* refactor: ported a few components to typescript as an example
- AppAnchor
- AppButton
- AppCheckbox

* feat: Cypress testing (#73)

* chore: port tests from jest to cypress
fix: ensure all tests are passing

* fix: missing updated yarn.lock file

* chore: add create-cypress-tests helper

* chore: support for component testing using vite-dev-server

* refactor: separate integration (standard) tests from component (ct) tests

* chore: ignore nyc coverage reports

* docs: update README with testing commands and example files docs

* tests: support path aliases in cypress tests (#74)

* fix: update ci workflow to work with the new configuration
- use yarn instead of npm (might require install?)
- use the new build command

* hotfix: when preloading, if no settings (or no group and sample order) are provided, use the default table colum order

* chore: use plotly from npm (#75)

* chore: use latest plotly from npm

* fix: remove unused autosize and responsive plotly layout options

* chore: eslint ignore index.html

* fix: remaining linter warnings in config files

* Chakra UI (#77)

* chore: add chakra-ui and load the provider

* chore: add react-icons package

* refactor: port App to TypeScript
- fix the dataframe loadFromObject config arg type to match the rows data structure
- port fetch and parser utils to TypeScript
- convert App to a function component

* feat: new application layout
- sidebar navigation has been replaced by a topbar (alternative sidebar also provided)
- only top level routes are displayed in the topbar
- delegate access to children subroutes and functionality

* refactor: extract nav and link components from app-layout into their own components folders

* feat: add prop to render accent conditionally

* refactor: sidebar-nav styles
- move the open transition to the stack
- provide default styles but allow overriding props
- add JSDoc to link props interface

* feat: add the data-layout sidebar component

* feat: add navigation cards to the data home page

* fix: missing hover styles in nav-card

* refactor: remove unused onMouse events

* fix: icon is not a native anchor prop

* fix: first-child is unsafe server-side error

* feat: support partial path matching when setting the active link color

* feat: support overriding FlexProps in topbar

* feat: do not uppercase sidebar links

* feat: add background color to the topbar

* fix: data layout background color overrides app layout styles

* feat: remove links prop from sidebar-nav
- all children are loaded manually

* feat: make sidebar-link accessible to kb navigation
- add tabIndex prop
- remove superfluous flex child

* feat: add sidebar-file and -button to nav-sidebar

* feat: remove unused data-layout

* feat: make topbar-link accessible to kb navigation

* feat: use list components for topbar-nav

* feat: support kb navigation in nav-card

* fix: nav-card content not growing in width

* fix: focused sidebar items should expand the content

* feat: matching hover and focus styles in sidebar -button and -file

* feat: matching hover and focus styles in topbar-link

* fix: sidebar-file should activate on kb input

* chore: add type-fest package

* refactor: rename data-page to data-home

* feat: add data-files page
- sidebar menu actions (no functionality yet)
- formik integration with the upload gene expression table menu and form

* feat: support kb navigation in sidebar-file

* chore: disable tailwind and plotly css files

* fix: consistent label styles in formik-file

* feat: support isRequired indicator and aria props in formik inputs

* feat: required separator and file fields in xtable-form

* fix: do not attempt to show hint in formik-file (readonly) field

* feat: integrate xtable submit with the stores

* fix: add missing string util module

* feat: add replicate cards to data-files page

* fix: dataframe removeColumn should search for the literal column name

* chore: remove unused DataLayout component and string utility module

* chore: remove unused GroupCard component

* feat: add bulkRemove fuctionality to data-files page

* feat: add formik-modal component

* feat: port info-form to chakra-ui

* feat: add 'load gene info table' menu functionality to the data-files page

* refactor: rename initialRef->initialFocusRef

* feat: add db-form component

* fix: duplicate input ids in formik-file

* fix: import-gxp-database menu triggering is an input

* feat: add import gxp database functionality

* fix: use a unique name in the export-form

* fix: escape the column delimiter before showing it on the form field

* refactor: moved new data modules to a the pages folder

* refactor: consistent names for data pages

* refactor: consistent app-routes name

* feat: improve data-files accessibility
- move sidebar animation to sidebar-nav component
- structure sidebar-nav as region->section-buttons
- sidebar-button mouse click is only triggered by main mouse button
- add aria-label to repl-card component
- add tabIndex and focus visual cues to repl-card

* fix: sidebar-nav hover area should be the full sidebar

* feat: more props in sidebar-button
- add textGap to control the text-to-icon spacing
- inherit from FlexProps and pass props to the container

* feat: tentative plots-home page and layout

* fix: sidebar-nav actions should be sticky

* feat: more accessible repl-card
- add hover styles
- remove tabIndex from non-interactive card
- add aria-label to checkbox and button

* refactor: slightly optimize for speed the bulk delete implementation

* fix: center text icons in plots-home sidebar

* feat: optional visually hidden label in formik fields

* refactor: inherit ModalProps in formik-modal

* chore: remove tailwindcss code and dependencies

* feat: bars form and formik arrray (#78)

* feat: support left-,right- input addons and elements in formik-field

* feat: add groupProps API to formik-field

* feat: add bars plot form

* feat: expose form-control props in formik-field

* feat: add formik-field component

* feat: add legend and caption switches to bars-form
refactor: improve bars-form semantic html

* feat: improve bars-form modal styles
- increase modal size to xl
- move scrollbar to window

* fix: remove legend and caption switch validation (dev leftover)

* refactor: rename menu to Bars Plot (plural) for consistency

* hotfix: replicate cards wrap does not retain full-width when only two or less cards exist

* refactor: plot store (#79)


* wip: plot store refactor

* add missing plot-store types

* refactor: Plot components (#80)

* wip: plot-components

* wip: plot-components

* feat: add plot data utility functions

* re-add plot-store functionality to compute plotly plot data

* refactor: re-add functionality to the side-bar
- add forms for plottypes
- update generic PlotlyPlot component

* refactor: port PlotCaption and GeneCard to typescript and chakra

* chore: remove unused Plot component

* chore: cleanup typescript warnings / logs

* fix: legend name for singleGene bar/ind Lines

* refactor: Individual lines navigation label name

* feat: heatmap plot (#81)

* feat: heatmap utility module
- refactor functions to have a single responsibility
- add a valuesToBins function to transform clustering results into visx consumable data
- add and type the ml-distance package

* chore: add documented regions to heatmap module

* feat: add heatmap-plot component

* feat: add heatmap plot store functionality

* feat: add heatmap plot menus and form to plots-home

* fix: add missing key to the loading spinner in plots-home

* feat: support for resizing heatmap plots

* fix: only one 'main' per page

* fix: remove percentage-based resize limits

* feat: show a loading indicator during internal plot computation

* refactor: extract heatmap-plot container into a separate component

* fix: hacking workaround to give time for observers to react to plot `isLoading` before blocking the UI

* fix: non-matching bracket

* feat: improvements to the heatmap-plot component
- add custom interfaces for heatmap-plot bins
- add bottom labels to the plot
- increase container height

* feat: add a `toBins` method to the dataframe class

* fix: loadGxpSettings accepts a partial object

* chore: use modular visx dependencies

* feat: support selecting replicate subsets in heatmap visualizations

* fix: in the  heatmap, treat an empty replicates subset as if it were undefined

* chore: minor code cleanup

* chore: support path alias autocompletion in IDEs that read `tsconfig.json`.

* refactor: use plot-container for plotly plots (#82)

* feat: use plot-container for plotly plots
refactor: plot-container to display plot-title as h1
fix: warning to cleanup ref in resizePlot useEffect

* refactor: add flex direction column to PlotlyPlot

* fix: heatmap padding not a property value in firefox

* fix: prevent using stale reference for figureRef

* fix: observe internalRef

* fix: modebar styles

* refactor: remove html title
fix: re-add height 900

* fix: add overflow to Plot captions

* refactor: reduce tick line height

* refactor: reduce plot-container height

* refactor: port dataframe and remaining utilities to typescript (#83)

* refactor: port the dataframe class and all related utility modules to typescript

* refactor: sort alphabetically

* refactor: port data-store to typescript

* refactor: rename internal arr2d variable to arrayOfColumns

* Readd pca (#84)

* feat: add PCA plot type

* fix: PlotlyPlot adjust to full size of parent

* refactor: add flexShrink to PlotlyPlot captions

* fix: pca rename dataframe functions from develop merge

* fix: setToColor utility. Object.fromEntries takes zipped Array

* Gene browser tool (#85)

* feat: tools routes and home page

* feat: add formik-number input

* feat: add gene-browser page, form, and card

* chore: remove old unused gene-browser components

* fix: consistent geneInfo structure in deprecated gene-card component

* refactor: name useEffect function

* feat: add gene-details table and modal

* feat: add a spinner during page data loading

* refactor: remove leftover demo caption

* feat: Enter key in focused card opens the details table modal

* feat: adjust modal size in larger screens

* feat: increase table header font

* chore: update legacy PlotCaption gene-card module path

* feat: rename search accession -> search in accessions for clarity

* feat: hack to show the loading spinner in heavy search computations

* refactor: type the modalSize computed prop

* Heatmap title tooltip (#86)

* feat: add heatmap plot Title

* feat: add tooltips to heatmap

* chore: add comment to separate tooltip logic

* fix: remove titleHeight from yScale. Add top offset instead

* fix: remove additional title height from core plot bounds
refactor: move all plotDims variables inside the useEffect computation
refactor: tweak styles for the tooltip

* refactor: rename clientWidth->plotBounds (clarity)

Co-authored-by: David Velasco <davvelsan@gmail.com>

* feat: add left axis to heatmap (#87)

* feat: add left axis to heatmap (#87)

* feat: accession autocomplete (#88)

* feat: add left axis to heatmap (#87)

* feat: add useMatchAccession hook

* feat: add formik-accession input component

* feat: add autocomplete formik-accession to bars and lines plots

* feat: heatmap dendro (#89)

* feat: createHeatmapPlot also returns a cluster tree

* fix: correct heatmap plot props

* wip: heatmap + dendrogram

* feat: sort the clustered heatmap matrix
- add a function to get leave names from a cluster object
- add a function to sort a distance matrix to match the clustering results
- createHeatmapPlot now returns the clustered matrix

* fix: use standard tickLabelSize

* fix: use correct row names

* chore: remove unused imports

* fix: tooltip placement did not account for the dendrogram plot offset

* fix: sort the matrix rows to match the clustered tree

* feat: invert the heatmap colors to match a distance value

Co-authored-by: coeit <cbeiteneuer@gmail.com>

* chore: remove leftover debug logs

* feat: plots sidebar layout, icons, and delete functionality (#90)

* feat: fixed plots sidebar with real icons

* feat: add delete plots button

* feat: rename menus to eliminate superfluous information

* feat: Info routes (#92)

* feat: add a new link-card component

* feat: add info module route and page

* fix: typo

* feat: app layout and flow tweaks (#91)

* feat: change the default data route to data-files

* feat: disable plot actions when no meaningful action can be taken

* feat: add warning alert to plots-home when no data has been loaded

* fix: add missing disabled property to sidebar-button

* fix: plots sidebar should not be on top of the plots form modal overlay

* feat: disable remove data menu if no data is loaded

* fix: remove plots should function if there are plots, even if there is no data

* refactor: rename variables for clarity

* fix: disabled buttons prevent sidebar collapse

* fix: prevent toolbar-link text selection

* feat: remove empty app home page and add a redirect to /data

* feat: add an empty app-home page that for now redirects to /data

* feat: warn the user if no data is loaded when in gene-browser tool

* feat: plot actions (#93)

* wip: download util

* refactor: port download util to ts

* feat: add default config to PlotlyPlot for downloading as svg

* refactor: rename download util to svg util

* feat: wip: add rudimentary downaload button to heatmap plot

* feat:
- rename plot key prop to id.
- restore delete for PlotlyPlot

* feat: add standard plot config to pca plot

* fix: add missing key - id change

* feat: add plot-container actions
- download plot
- delete plot

* feat: only show plot actions in visx plots
- workaround until the modebar is removed

* feat: delete Plot for heatmap

* fix: add missing id prop

* fix: add missing id prop

Co-authored-by: David Velasco <davvelsan@gmail.com>

* feat: accession validation (#94)

* feat: verify that the accession exists before submitting a plot

* feat: do not validate accession inputs onBlur

* hotfix: ensure form delimiters are correctly unescaped

* chore: pre-deploy cleanup (#95)

- remove old components
- standard snake-case file names

* chore: merge main into develop

* chore: remove legacy layout components

* chore: remove legacy modules

* chore: remove unused icons

* fix: missing validateOnBlur for data forms (#98)

* feat: color by for stacked lines form (#99)

* wip: feat colorBy, formik radio component

* feat: generic form-radio component

* feat: stacked-lines use form-radio for colorBy

* chore: remove debug logs

* feat: add optional direction prop

* refactor: RadioOptions extend RadioProps

* feat: remove all modebar buttons but download and delete (#101)

* feat: preload tweaks (#100)

* feat: hide data manipulation menus when preloaded

* fix: remove env var for not-implemented plot preloading

* feat: disable repl-card delete and select buttons if preloaded

* feat: remove resizer styles until a cross-browser solution is implemented

* feat: add a new image plot type to the plots store

* feat: display images in the plots page
- new image-plot component to display images
- new image-form component to load new images

* fix: image alt should be required

* fix: no need (probably) to async the addImagePlot action

* fix: add a repl-card tabIndex if preloading (no button interactions)

* feat: use plot-container for the image-plot
- enable delete button
- standardize plot styles

* feat: delete image plot
- reuse delete plot action
- revoke url if plot type is image

* fix: import the gxp database image as blob

* fix: backwards compatibility with single-image databases
- export the first image-plot within the generated zip

* fix: preloaded should check for data property when disabling repl-card functionality

* fix: missing delete replicate button

* fix: tests failing (#102)

* chore: remove AppAnchor test. AppAnchor no longer exists

* chore: add chai-exclude package

* fix: cypress tsconfig compiler options to use es2019

* fix: enrichment analyses test

* fix: heatmap tests

* chore: remove unused commented code

* chore: delete deprecated tests folder

* fix: test name

* feat: app state (#103)

* fix: fetchResource should not return undefined, but throw instead

* refactor: app-layout inherits props from FlexProps

* feat: add application state
- when preloading, show a loading indicator and message
- if preloading failed, override routes with an error message

* fix: heatmap label alignment

* feat: webworkers for heatmap and pca (#106)

* refactor: move webworker utilites

* refactor: heatmap + pca use webworker

* feat: heatmap webworker

* feat: pca webworker

* chore: remove debug logs
refactor: separate webworker functions to separate modules

* chore: mark unsued functions in dataframe as deprecated

* fix: add a minimal size for tickLabel

* hotfix: remove debug log

* feat: add example data/info table to public folder (#108)

feat: add Alert to load example data if no data available
refactor: delete all also clears info table

* feat: Enrichment analyses (#109)

* feat: formik-select component

* feat: wip: enrichment analysis tools components

* feat: enrichment types

* feat: enrichment store

* refactor: info_table example

* refactor: enrichment analysis helper to typescript

* fix: formik select name

* chore: remove unused imports / debug logs

* feat: add hypergeometric pdf compiled to .wasm from the GSL

* chore: remove fisher-exact-test library

* chore: eslintignore utils/gsl

* feat: workerize and implement enrichment analysis

* feat: add info alert to enrichment tool
feat: add delete button to analyses
feat: add Spinner on load

* remove table caption

* feat: enrichment import/export

* refactor: test_for_enrichment return all values + contingency_table

* feat: break extremify matrix if change is 0.

* fix: enrichment types

* wip: fix: enrichment test. WASM not working

* chore: update example data

* chore: remove dev comments

* refactor: rename DataRow -> DataRows

* feat: Heatmap transpose matrix + filter for genes (#110)

* refactor: formik-radio optional disable

* feat: match-replicate hook

* feat: formik replicate component

* feat: heatmap add optional gene filter and transpose option

* refactor: plot-sidebar rename heatmap -> cluster heatmap

* fix: add default empty arry for row-filter

* feat: pca transpose matrix + filter genes/replicates (#111)

* feat: add generic geColors method

* feat: add replicates / accession filter
feat: transpose matrix

* feat: Export plots (#112)

* feat: add optional export enrichment / plots to export form

* chore: rename raw_data -> rawData

* feat: export/import plots

* fix: export enrichment - only create metaSrc when checked

* fix: round enrichment pValues to 4 digits

Co-authored-by: David Velasco <davvelsan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant