Unverified Commit 32ed8fc9 authored by Andrey Azov's avatar Andrey Azov Committed by GitHub
Browse files

Move genome and ens-object folders to shared/state (#203)

parent bdd7b641
Pipeline #44659 passed with stages
in 4 minutes and 45 seconds
......@@ -39,11 +39,11 @@ import { getChrLocationFromStr, getChrLocationStr } from './browserHelper';
import { getIsDrawerOpened } from './drawer/drawerSelectors';
import { getEnabledCommittedSpecies } from 'src/content/app/species-selector/state/speciesSelectorSelectors';
import { CommittedItem } from 'src/content/app/species-selector/types/species-search';
import { getExampleEnsObjects } from 'src/ens-object/ensObjectSelectors';
import { EnsObject } from 'src/ens-object/ensObjectTypes';
import { getExampleEnsObjects } from 'src/shared/state/ens-object/ensObjectSelectors';
import { EnsObject } from 'src/shared/state/ens-object/ensObjectTypes';
import analyticsTracking from 'src/services/analytics-service';
import { fetchGenomeData } from 'src/genome/genomeActions';
import { fetchGenomeData } from 'src/shared/state/genome/genomeActions';
import {
changeDrawerView,
closeDrawer,
......
......@@ -4,9 +4,9 @@ import classNames from 'classnames';
import { TrackSet } from '../track-panel/trackPanelConfig';
import { BreakpointWidth } from 'src/global/globalConfig';
import { EnsObject } from 'src/ens-object/ensObjectTypes';
import { EnsObject } from 'src/shared/state/ens-object/ensObjectTypes';
import { getDisplayStableId } from 'src/ens-object/ensObjectHelpers';
import { getDisplayStableId } from 'src/shared/state/ens-object/ensObjectHelpers';
import { getFormattedLocation } from 'src/shared/helpers/regionFormatter';
import { getCommaSeparatedNumber } from 'src/shared/helpers/numberFormatter';
......
......@@ -20,8 +20,8 @@ import {
} from '../browserActions';
import { getIsTrackPanelOpened } from '../track-panel/trackPanelSelectors';
import { BrowserNavStates, ChrLocation } from '../browserState';
import { getGenomeKaryotype } from 'src/genome/genomeSelectors';
import { GenomeKaryotypeItem } from 'src/genome/genomeTypes';
import { getGenomeKaryotype } from 'src/shared/state/genome/genomeSelectors';
import { GenomeKaryotypeItem } from 'src/shared/state/genome/genomeTypes';
import styles from './BrowserNavBar.scss';
......
......@@ -15,13 +15,13 @@ import {
getBrowserActiveGenomeId,
getChrLocation
} from '../browserSelectors';
import { getGenomeKaryotype } from 'src/genome/genomeSelectors';
import { getGenomeKaryotype } from 'src/shared/state/genome/genomeSelectors';
import {
changeBrowserLocation,
changeFocusObject,
toggleRegionEditorActive
} from '../browserActions';
import { GenomeKaryotypeItem } from 'src/genome/genomeTypes';
import { GenomeKaryotypeItem } from 'src/shared/state/genome/genomeTypes';
import {
getCommaSeparatedNumber,
......
......@@ -4,7 +4,7 @@ import { ReactComponent as resetIcon } from 'static/img/browser/track-reset.svg'
import ImageButton from 'src/shared/components/image-button/ImageButton';
import styles from './BrowserReset.scss';
import { EnsObject } from 'src/ens-object/ensObjectTypes';
import { EnsObject } from 'src/shared/state/ens-object/ensObjectTypes';
import { Status } from 'src/shared/types/status';
export type BrowserResetProps = {
......
......@@ -12,7 +12,7 @@ import { getChrLocationStr } from './browserHelper';
import browserMessagingService from 'src/content/app/browser/browser-messaging-service';
import browserStorageService from './browser-storage-service';
import { fetchEnsObject } from 'src/ens-object/ensObjectActions';
import { fetchEnsObject } from 'src/shared/state/ens-object/ensObjectActions';
import {
getBrowserActiveGenomeId,
......
......@@ -2,8 +2,8 @@ import { RootState } from 'src/store';
import { ChrLocation } from './browserState';
import { getQueryParamsMap } from 'src/global/globalHelper';
import { getGenomeInfo } from 'src/genome/genomeSelectors';
import { getEnsObjectById } from 'src/ens-object/ensObjectSelectors';
import { getGenomeInfo } from 'src/shared/state/genome/genomeSelectors';
import { getEnsObjectById } from 'src/shared/state/ens-object/ensObjectSelectors';
export const getBrowserActivated = (state: RootState) =>
state.browser.browserInfo.browserActivated;
......
......@@ -19,7 +19,7 @@ import closeIcon from 'static/img/shared/close.svg';
import styles from './Drawer.scss';
import SnpIndels from './drawer-views/SnpIndels';
import { EnsObject } from 'src/ens-object/ensObjectTypes';
import { EnsObject } from 'src/shared/state/ens-object/ensObjectTypes';
export type DrawerProps = {
drawerView: string;
......
import React, { FunctionComponent } from 'react';
import { getDisplayStableId } from 'src/ens-object/ensObjectHelpers';
import { getDisplayStableId } from 'src/shared/state/ens-object/ensObjectHelpers';
import { EnsObject } from 'src/ens-object/ensObjectTypes';
import { EnsObject } from 'src/shared/state/ens-object/ensObjectTypes';
import styles from '../Drawer.scss';
......
......@@ -2,9 +2,9 @@ import React, { FunctionComponent } from 'react';
import get from 'lodash/get';
import find from 'lodash/find';
import { getDisplayStableId } from 'src/ens-object/ensObjectHelpers';
import { getDisplayStableId } from 'src/shared/state/ens-object/ensObjectHelpers';
import { EnsObject } from 'src/ens-object/ensObjectTypes';
import { EnsObject } from 'src/shared/state/ens-object/ensObjectTypes';
import styles from '../Drawer.scss';
......
......@@ -22,7 +22,7 @@ import { getBreakpointWidth } from 'src/global/globalSelectors';
import { toggleTrackPanel } from './trackPanelActions';
import { BreakpointWidth } from 'src/global/globalConfig';
import { EnsObject } from 'src/ens-object/ensObjectTypes';
import { EnsObject } from 'src/shared/state/ens-object/ensObjectTypes';
import styles from './TrackPanel.scss';
......
......@@ -4,8 +4,11 @@ import get from 'lodash/get';
import { toggleDrawer, changeDrawerView } from '../../drawer/drawerActions';
import { TrackSet, BrowserTrackStates } from '../trackPanelConfig';
import { GenomeTrackCategory } from 'src/genome/genomeTypes';
import { EnsObjectTrack, EnsObject } from 'src/ens-object/ensObjectTypes';
import { GenomeTrackCategory } from 'src/shared/state/genome/genomeTypes';
import {
EnsObjectTrack,
EnsObject
} from 'src/shared/state/ens-object/ensObjectTypes';
import { RootState } from 'src/store';
import { getIsDrawerOpened } from '../../drawer/drawerSelectors';
import { getLaunchbarExpanded } from 'src/header/headerSelectors';
......@@ -15,7 +18,7 @@ import {
getBrowserActiveGenomeId
} from '../../browserSelectors';
import { getSelectedTrackPanelTab } from '../trackPanelSelectors';
import { getGenomeTrackCategoriesById } from 'src/genome/genomeSelectors';
import { getGenomeTrackCategoriesById } from 'src/shared/state/genome/genomeSelectors';
import TrackPanelListItem from './TrackPanelListItem';
......
......@@ -26,7 +26,7 @@ import {
getHighlightedTrackId,
isTrackCollapsed
} from 'src/content/app/browser/track-panel/trackPanelSelectors';
import { EnsObjectTrack } from 'src/ens-object/ensObjectTypes';
import { EnsObjectTrack } from 'src/shared/state/ens-object/ensObjectTypes';
import { getIsDrawerOpened, getDrawerView } from '../../drawer/drawerSelectors';
import {
getBrowserActiveGenomeId,
......
......@@ -4,13 +4,13 @@ import { connect } from 'react-redux';
import upperFirst from 'lodash/upperFirst';
import { RootState } from 'src/store';
import { EnsObject } from 'src/ens-object/ensObjectTypes';
import { EnsObject } from 'src/shared/state/ens-object/ensObjectTypes';
import { getBrowserActiveGenomeId } from '../../../browserSelectors';
import { updateTrackStatesAndSave } from 'src/content/app/browser/browserActions';
import { BrowserTrackStates } from 'src/content/app/browser/track-panel/trackPanelConfig';
import { getActiveGenomePreviouslyViewedObjects } from 'src/content/app/browser/track-panel/trackPanelSelectors';
import { fetchExampleEnsObjects } from 'src/ens-object/ensObjectActions';
import { getExampleEnsObjects } from 'src/ens-object/ensObjectSelectors';
import { fetchExampleEnsObjects } from 'src/shared/state/ens-object/ensObjectActions';
import { getExampleEnsObjects } from 'src/shared/state/ens-object/ensObjectSelectors';
import * as urlFor from 'src/shared/helpers/urlHelper';
import { closeTrackPanelModal } from '../../trackPanelActions';
import ImageButton from 'src/shared/components/image-button/ImageButton';
......
......@@ -2,7 +2,7 @@ import React from 'react';
import classNames from 'classnames';
import { TrackSet } from '../trackPanelConfig';
import { EnsObject } from 'src/ens-object/ensObjectTypes';
import { EnsObject } from 'src/shared/state/ens-object/ensObjectTypes';
import styles from './TrackPanelTabs.scss';
......
......@@ -28,7 +28,7 @@ import {
CommittedItem
} from 'src/content/app/species-selector/types/species-search';
import { getGenomeInfoById } from 'src/genome/genomeSelectors';
import { getGenomeInfoById } from 'src/shared/state/genome/genomeSelectors';
import { CurrentItem } from './speciesSelectorState';
......
......@@ -6,7 +6,7 @@ import * as urlFor from 'src/shared/helpers/urlHelper';
import { RootState } from 'src/store';
import { fetchDataForLastVisitedObjects } from 'src/content/app/browser/browserActions';
import { getGenomeInfo } from 'src/genome/genomeSelectors';
import { getGenomeInfo } from 'src/shared/state/genome/genomeSelectors';
import { getEnabledCommittedSpecies } from '../app/species-selector/state/speciesSelectorSelectors';
import {
getPreviouslyViewedGenomeBrowserObjects,
......@@ -17,7 +17,7 @@ import AppBar from 'src/shared/components/app-bar/AppBar';
import SpeciesTabsWrapper from 'src/shared/components/species-tabs-wrapper/SpeciesTabsWrapper';
import { SimpleSelectedSpecies } from 'src/shared/components/selected-species';
import { GenomeInfoData } from 'src/genome/genomeTypes';
import { GenomeInfoData } from 'src/shared/state/genome/genomeTypes';
import { CommittedItem } from '../app/species-selector/types/species-search';
import styles from './Home.scss';
......
......@@ -8,7 +8,7 @@ import {
import {
getEnsObjectById,
getEnsObjectLoadingStatus
} from 'src/ens-object/ensObjectSelectors';
} from 'src/shared/state/ens-object/ensObjectSelectors';
import { getCommittedSpecies } from 'src/content/app/species-selector/state/speciesSelectorSelectors';
import { LoadingState } from 'src/shared/types/loading-state';
......
......@@ -3,11 +3,11 @@ import { connectRouter } from 'connected-react-router';
import browser from '../content/app/browser/browserReducer';
import drawer from '../content/app/browser/drawer/drawerReducer';
import genome from '../genome/genomeReducer';
import genome from '../shared/state/genome/genomeReducer';
import customDownload from '../content/app/custom-download/state/customDownloadReducer';
import global from '../global/globalReducer';
import header from '../header/headerReducer';
import ensObjects from '../ens-object/ensObjectReducer';
import ensObjects from '../shared/state/ens-object/ensObjectReducer';
import speciesSelector from '../content/app/species-selector/state/speciesSelectorReducer';
const rootReducer = (history: any) =>
......
import { getCommaSeparatedNumber } from 'src/shared/helpers/numberFormatter';
import { EnsObjectLocation } from 'src/ens-object/ensObjectTypes';
import { EnsObjectLocation } from 'src/shared/state/ens-object/ensObjectTypes';
export const getFormattedLocation = (location: EnsObjectLocation) => {
const start = getCommaSeparatedNumber(location.start);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment