Skip to content

Commit

Permalink
React 18 Migration (#58)
Browse files Browse the repository at this point in the history
* Remove `|| true` to show eslint errors

#693

* Run `lint:fix` to automatically fix formatting

#693

* Add missing component `RouterScrollToTop`

* Refactor src/app.ts into separate files src/app/*

Caleydo/cohort#693

* Rename app/Cohort to app/Coral

* Move colors to config/colors

Caleydo/cohort#693

* Move rest to base/rest

Caleydo/cohort#693

* Move ScrollLinker from util file to utils/ScrollLinker

Caleydo/cohort#693

* Remove unused color schemes

Caleydo/cohort#693

* Extract CohortColorSchema from util to separate file

Caleydo/cohort#693

* Merge CohortColorSchema with config/colors

Caleydo/cohort#693

* Move utilCustomEvents to base/events

Caleydo/cohort#693

* Move utilIdTypes to config/entities

Caleydo/cohort#693

* Move utilLabels to utils/labels

Caleydo/cohort#693

* Merge Tooltip into AColumn and remove export

Caleydo/cohort#693

* Rename event to event2 for nested event

Caleydo/cohort#693

* Merge CohortInterfaces into app/interfaces

Caleydo/cohort#693

* Use `ICohort` instead `Cohort`

Caleydo/cohort#693

- Replace `Cohort` with `ICohort` were possible
- Add interfaces `IInputCohort` and `IOutputCohort`
- Move classes `InputCohort` and `OutputCohort` to Cohort.ts
- Move public functions and properties from `Cohort` to interface `ICohort`
- Move interfaces and enums from `Cohort` to app/interfacoes
- Replace `Array<...>` with `...[]` syntax

* Reorder functions in utlis/labels

Caleydo/cohort#693

* Eslint and typescript errors (#56)

* Upgrade python deps (#51)

* Upgrade python deps

* Switch back to #develop

* Release 4.1.0 (#54)

* prepare next dev version

* Fix colors assignment in plots (#41)

* Prepare github changes

* Remove circleci

* prepare next dev version

* Use `Font Awesome 6 Free` in `font-family` (#39)

* Use `Font Awesome 6 Free` in `font-family`

Requires datavisyn/tdp_core#732

* Update Lineup to 4.6.2

Co-authored-by: Klaus Eckelt <[email protected]>

* Update fontawesome

* Merge visyn_scripts

* prepare next dev version

* Merged `d3_changes` into `develop`  (#45)

* use d3v7 and d3v3 imports
remove depenencies to d3
add dependency to tdp_core

* remove console log

* Dev d3 merge fix (#47)

* move RouterScrollToTop to coral_public

* fix TS errors

* move canvas-confetti to coral_public

* update git dependencies

Co-authored-by: Klaus Eckelt <[email protected]>

* Automatically select root cohort if onboarding was already done (#48)

* Autoselect rootcohort if onboarding was done #579

* format code

* Remove grid lines from visualizations (#49)

remove gridlines #400

* Upgrade python deps (#51)

* Upgrade python deps

* Switch back to #develop

* prepare release 4.1.0

---------

Co-authored-by: Klaus Eckelt <[email protected]>
Co-authored-by: anita-steiner <>
Co-authored-by: Holger Stitz <[email protected]>
Co-authored-by: Patrick <[email protected]>
Co-authored-by: Michael Pühringer <[email protected]>

* prepare next dev version

* Migration to visyn_core (#55)

* Migration to visyn_core

* Linting

* Upgrade deps

---------

Co-authored-by: Michael Puehringer <[email protected]>

* Fix cohort

* Fix circular dependencies

* Further cleanup

* Fix async in loop

* Import

* Add todos for async inside loop errors

---------

Co-authored-by: Michael Pühringer <[email protected]>
Co-authored-by: Vanessa Stoiber <[email protected]>
Co-authored-by: Klaus Eckelt <[email protected]>
Co-authored-by: Holger Stitz <[email protected]>
Co-authored-by: Patrick <[email protected]>
Co-authored-by: dvvanessastoiber <[email protected]>
Co-authored-by: Michael Puehringer <[email protected]>

* bug: merge data subtype object

* React 18 Migration

* Fix typings

* Fix client config typings

* Pin ordino, tourdino

* Add initial value to cohorts array

* Cleanup

* tsconfig

* Update package.json

---------

Co-authored-by: Holger Stitz <[email protected]>
Co-authored-by: Champari Oltion <[email protected]>
Co-authored-by: Michael Pühringer <[email protected]>
Co-authored-by: Vanessa Stoiber <[email protected]>
Co-authored-by: Klaus Eckelt <[email protected]>
Co-authored-by: Patrick <[email protected]>
Co-authored-by: dvvanessastoiber <[email protected]>
Co-authored-by: Michael Puehringer <[email protected]>
Co-authored-by: oltionchampari <[email protected]>
Co-authored-by: Moritz Heckmann <[email protected]>
  • Loading branch information
11 people authored May 16, 2023
1 parent c65c9cb commit 9e57aec
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 32 deletions.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,16 @@
"devDependencies": {
"@types/d3-selection": "^3.0.2",
"@types/d3-transition": "^3.0.1",
"@types/react": "^16.14.6",
"@types/react-dom": "^16.9.5",
"@types/react-router-dom": "^5.1.7",
"mkdirp": "0.5.1",
"tslint": "~5.20.1",
"worker-loader": "^2.0.0"
},
"resolutions": {
"@types/react": "~18.2.0",
"@types/react-dom": "~18.2.0",
"react": "~18.2.0",
"react-dom": "~18.2.0"
},
"browser": {
"fs": false,
"os": false,
Expand Down
3 changes: 2 additions & 1 deletion src/Cohort.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable @typescript-eslint/no-use-before-define */
import { IDType, IDTypeLike, IDTypeManager, IRow, IServerColumn } from 'visyn_core';
import { IDType, IDTypeLike, IDTypeManager } from 'visyn_core/idtype';
import { IRow, IServerColumn } from 'visyn_core/base';
import { IAllFilters, UniqueIdManager } from 'tdp_core';
import {
ECloneFilterTypes,
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IServerColumn } from 'visyn_core';
import type { IServerColumn } from 'visyn_core/base';
import { log } from './util';
import { EElementProvType, IElement, IElementProvJSON, IElementProvJSONTask, ITask, ITaskRep, TaskType } from './app/interfaces';
import { GeneScoreAttribute, PanelScoreAttribute, ServerColumnAttribute, SpecialAttribute } from './data/Attribute';
Expand Down
2 changes: 1 addition & 1 deletion src/Taskview/SearchBar.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { select } from 'd3v7';
import { IServerColumn } from 'visyn_core';
import { IServerColumn } from 'visyn_core/base';
import { IdTextPair, RestBaseUtils } from 'tdp_core';
import { dataTypes, depletion, IDataSubtypeConfig, IDataTypeConfig } from 'tdp_publicdb';
import { colors } from '../config/colors';
Expand Down
2 changes: 1 addition & 1 deletion src/Taskview/Taskview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ abstract class TaskviewTable {
class TaskviewInput extends TaskviewTable {
cohortOrder: number[];

cohorts: IInputCohort[];
cohorts: IInputCohort[] = [];

usedColorsForCohorts = CoralColorSchema.COLOR_SCHEME.map((elem) => {
return { color: elem, cohorts: [] };
Expand Down
3 changes: 2 additions & 1 deletion src/app/Coral.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { select } from 'd3v7';
import { ATDPApplication, CLUEGraphManager, IClientConfig, ITDPOptions, ProvenanceGraph } from 'tdp_core';
import { ATDPApplication, CLUEGraphManager, ITDPOptions, ProvenanceGraph } from 'tdp_core';
import { IClientConfig } from 'visyn_core/base';
import { CoralApp, ICoralClientConfig } from './CoralApp';
import { log } from '../util';

Expand Down
14 changes: 2 additions & 12 deletions src/app/CoralApp.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
import { select, Selection } from 'd3v7';
import SplitGrid from 'split-grid';
import { IServerColumn } from 'visyn_core';
import {
AppContext,
CLUEGraphManager,
IDatabaseViewDesc,
IObjectRef,
ITDPOptions,
NotificationHandler,
ObjectRefUtils,
ProvenanceGraph,
RestBaseUtils,
} from 'tdp_core';
import { IServerColumn, AppContext } from 'visyn_core/base';
import { CLUEGraphManager, IDatabaseViewDesc, IObjectRef, ITDPOptions, NotificationHandler, ObjectRefUtils, ProvenanceGraph, RestBaseUtils } from 'tdp_core';
import { cellline, tissue } from 'tdp_publicdb';
import { Instance as TippyInstance } from 'tippy.js';
import { createCohort, createCohortFromDB } from '../Cohort';
Expand Down
3 changes: 2 additions & 1 deletion src/app/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IDType, IDTypeLike, IRow, IServerColumn } from 'visyn_core';
import { IDType, IDTypeLike } from 'visyn_core/idtype';
import { IServerColumn, IRow } from 'visyn_core/base';
import { IAllFilters } from 'tdp_core';
import type { IEntitySourceConfig } from '../config/entities';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/base/rest.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Ajax, AppContext, IRow } from 'visyn_core';
import { Ajax, AppContext, IRow } from 'visyn_core/base';
import { IParams } from 'tdp_core';
import { deepCopy, log } from '../util';
import {
Expand Down
2 changes: 1 addition & 1 deletion src/common/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { Categories } from 'tdp_publicdb';
import { IServerColumn } from 'visyn_core';
import { IServerColumn } from 'visyn_core/base';
import { ColumnDescUtils, IAdditionalColumnDesc } from 'tdp_core';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/common/forms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { SpeciesUtils, FormSubtype } from 'tdp_publicdb';
import { IServerColumn } from 'visyn_core';
import { IServerColumn } from 'visyn_core/base';
import { FormElementType, IFormElement, IFormSelectOption, ValueCache, RestStorageUtils, LineupUtils, RestBaseUtils } from 'tdp_core';
import { gene, IDataSourceConfig, tissue, cellline, dataSources, dataTypes, dataSubtypes, depletion, drugScreen } from './config';
import { GeneUtils } from './GeneUtils';
Expand Down
4 changes: 2 additions & 2 deletions src/data/Attribute.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { IAllFilters } from 'tdp_core';
import { IDataTypeConfig, IDataSubtypeConfig, resolveDataTypes } from 'tdp_publicdb';
import { IServerColumn } from 'visyn_core';
import { IServerColumn } from 'visyn_core/base';
import { IDataSubtypeConfig, IDataTypeConfig, resolveDataTypes } from 'tdp_publicdb';
import { ICohort } from '../app/interfaces';
import {
HistRouteType,
Expand Down
3 changes: 2 additions & 1 deletion src/data/IAttribute.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IAllFilters, IServerColumn } from 'tdp_core';
import { IAllFilters } from 'tdp_core';
import { IServerColumn } from 'visyn_core/base';
import { IDataSubtypeConfig } from 'tdp_publicdb';
import { ICohort } from '../app/interfaces';
import { INumRange, IEqualsList, HistRouteType } from '../base/interfaces';
Expand Down
8 changes: 4 additions & 4 deletions src/phovea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright (c) The Caleydo Team. All rights reserved.
* Licensed under the new BSD license, available at http://caleydo.org/license
**************************************************************************** */
import type { IRegistry } from 'visyn_core';
import type { IRegistry } from 'visyn_core/plugin';

export default function (registry: IRegistry) {
// helper functions copied from tdp_core:
Expand All @@ -25,7 +25,7 @@ export default function (registry: IRegistry) {
/**
* Set the base data-set
*/
actionFunction('chtSetDataset', 'setDatasetImpl', () => import('./Provenance/General.js'), {
actionFunction('chtSetDataset', 'setDatasetImpl', () => import('./Provenance/General'), {
// setDatasetImpl = function that acutally sets the dataset
analytics: {
category: 'data', // this one is a data operation (other options are visual, selections, layout, and analysis)
Expand All @@ -39,7 +39,7 @@ export default function (registry: IRegistry) {
/**
* Add Cohorts
*/
actionFunction('addCohorts', 'addOverviewCohortImpl', () => import('./Provenance/CohortEV.js').then(), {
actionFunction('addCohorts', 'addOverviewCohortImpl', () => import('./Provenance/CohortEV').then(), {
//
analytics: {
category: 'data', // this one is a data operation (other options are visual, selections, layout, and analysis)
Expand All @@ -50,7 +50,7 @@ export default function (registry: IRegistry) {
/**
* Remove Cohorts
*/
actionFunction('removeCohorts', 'removeOverviewCohortImpl', () => import('./Provenance/CohortEV.js').then(), {
actionFunction('removeCohorts', 'removeOverviewCohortImpl', () => import('./Provenance/CohortEV').then(), {
//
analytics: {
category: 'data', // this one is a data operation (other options are visual, selections, layout, and analysis)
Expand Down
2 changes: 1 addition & 1 deletion src/phovea_registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Licensed under the new BSD license, available at http://caleydo.org/license
**************************************************************************** */

import { PluginRegistry } from 'visyn_core';
import { PluginRegistry } from 'visyn_core/plugin';
import reg from './phovea';

/**
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "visyn_scripts/config/tsconfig.template.json",
"compilerOptions": {
"outDir": "./dist",
"sourceMap": false,
},
"include": [
"src/**/*.ts",
Expand Down

0 comments on commit 9e57aec

Please sign in to comment.