Skip to content

Epic Branch Final Step: Merge Epic Branch into Staging #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 64 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
adac7f1
a bunch of changes that aren't working right now
Yukthiw Oct 5, 2024
f7b7ead
cellefp, publications, chromosome views
Yukthiw Oct 13, 2024
9e0b738
added chromosome viewer to routed views
Yukthiw Oct 17, 2024
7378d14
Added plant, cell, and tissue efps with routing
Yukthiw Oct 31, 2024
4eb4270
All URLState Management done!
Yukthiw Dec 17, 2024
c89c1a3
Fixing deleted gene problem
Yukthiw Jan 4, 2025
c4b85b7
Cleaned up un-needed code
Yukthiw Jan 6, 2025
0a4bd34
Fixed view list
Yukthiw Jan 6, 2025
0b0965e
Cleaned up un-used code
Yukthiw Jan 8, 2025
a2016bf
Updated getting started view
Yukthiw Jan 8, 2025
a208f24
Merge branch 'staging' into yukthiw/routing
Yukthiw Jan 8, 2025
bbb2f26
Cleaned things up, added Routing Changes documentation
Yukthiw Feb 26, 2025
071965c
fixed some naming errors
Yukthiw Feb 26, 2025
2f398a9
Fixed navigation problem
Yukthiw Feb 26, 2025
6f775de
Finished RoutingChanges.md and removed console logs
Yukthiw Mar 3, 2025
af0c8a0
Merge branch 'staging' into yukthiw/routing
Yukthiw Mar 3, 2025
a651ccf
fixed broken stuff!
Yukthiw Mar 7, 2025
a2c9926
Fixed gene deletion issue
Yukthiw Mar 7, 2025
6a38c1f
Getting started-view no longer requires loaded gene
Yukthiw Mar 7, 2025
a262f9e
Bunch of changes to refactor navigator view to use new routing changes
bdls-jamal Mar 13, 2025
7783ac7
Change imports
bdls-jamal Mar 13, 2025
134c1b9
Changes to imports
bdls-jamal Mar 13, 2025
6978652
Changes to update the tutorial.md based on new routing changes
bdls-jamal Mar 17, 2025
f3c6369
Removal of unneeded file
bdls-jamal Mar 17, 2025
542dde6
installing zod locally
bdls-jamal Mar 20, 2025
c012d47
Changes to fix tooltip disappearing issue
bdls-jamal Mar 27, 2025
ce6cd90
Update tutorial.md to fix a spelling error
bdls-jamal Apr 6, 2025
dce71d4
Updates to necessary imports
bdls-jamal Apr 11, 2025
8becd78
Changes to icon names
bdls-jamal Apr 11, 2025
d814da8
Haul of fixes to match comments and changes from pre-routing navigato…
bdls-jamal Apr 12, 2025
574f658
Prettier fixes
bdls-jamal Apr 12, 2025
7facd99
Changes to match interactions view updates
bdls-jamal May 13, 2025
29e1df9
Nothing
bdls-jamal May 14, 2025
964f908
Changes that seem to have interactions view working in routing for no…
bdls-jamal May 15, 2025
a5e60cf
Cureent state, working but styling only applies on first render
bdls-jamal May 15, 2025
521d3de
Fixes to ensure url state matches cytoscape
bdls-jamal May 21, 2025
4d256f2
Changes, colours still not working
bdls-jamal May 29, 2025
8952bec
Added console logs state
bdls-jamal May 30, 2025
c935323
Changes that have the colouring issue resolved supposidely
bdls-jamal Jun 3, 2025
20cea5c
styling changes
bdls-jamal Jun 5, 2025
a3c7fe6
Committing changes from yukthi to deal with errors loading genes with…
bdls-jamal Jun 19, 2025
379e735
Removed snackbar alert for colour issue as this is fixed
bdls-jamal Jun 19, 2025
f65f3cc
Changes to use tsdoc comment styling and remove unused imports
bdls-jamal Jun 19, 2025
87aabd5
Remove unused imports/unnecessary console logs and files
bdls-jamal Jun 19, 2025
2db12a9
Changes to fix how the loading pages work
bdls-jamal Jun 26, 2025
cadcdbb
Merge remote-tracking branch 'origin/staging' into HEAD
bdls-jamal Jul 1, 2025
f85efc7
Removed some files as they are not routing compatible in this version
bdls-jamal Jul 1, 2025
d235d8a
Prettier fixes to pass checks
bdls-jamal Jul 1, 2025
2cb0fc8
Prettier fixes
bdls-jamal Jul 1, 2025
e2e8ad8
Merge branch 'routing-NavigatorView' into routing-NavigatorView
bdls-jamal Jul 1, 2025
9d3fcc1
Merge pull request #162 from bdls-jamal/routing-NavigatorView
bdls-jamal Jul 1, 2025
d21629a
Merge remote-tracking branch 'master/routing-InteractionsView' into HEAD
bdls-jamal Jul 1, 2025
3d27d98
Add interactionsview file
bdls-jamal Jul 1, 2025
da2fb69
Merge pull request #163 from bdls-jamal/routing-InteractionsView
bdls-jamal Jul 1, 2025
f6560c4
Merge pull request #164 from BioAnalyticResource/routing-NavigatorView
bdls-jamal Jul 1, 2025
8585a49
Merge branch 'EpicBranch-routing' into routing-InteractionsView
bdls-jamal Jul 1, 2025
7ffdf09
Merge pull request #165 from BioAnalyticResource/routing-Interactions…
bdls-jamal Jul 1, 2025
5bcd12a
Changes to fix how loading page is presented in all available views. …
bdls-jamal Jul 1, 2025
3ec148c
Fixed experimentefp loading page, removed console log in layout and c…
bdls-jamal Jul 2, 2025
d887cbc
NPX prettier fixes
bdls-jamal Jul 4, 2025
1fc9951
Changes to fix loading when no gene is selected as well as changes su…
bdls-jamal Jul 15, 2025
22141c6
prettier fixes
bdls-jamal Jul 15, 2025
cc80625
Changes based on reviews on July 16th by Vincent. Mainly naming changes
bdls-jamal Jul 16, 2025
9983980
Prettier fixes
bdls-jamal Jul 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ module.exports = {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
'overrides': [
overrides: [
{
'files': ['**/*.js', '**/*.ts', '**/*.tsx'],
'rules': {
files: ['**/*.js', '**/*.ts', '**/*.tsx'],
rules: {
'simple-import-sort/imports': [
'error',
{
'groups': [
groups: [
// `react` first, `next` second, then packages starting with a character
['^react$', '^next', '^[a-z]'],
// Packages starting with `@`
Expand All @@ -49,16 +49,16 @@ module.exports = {
// Style imports
['^.+\\.s?css$'],
// Side effect imports
['^\\u0000']
]
}
]
}
}
['^\\u0000'],
],
},
],
},
},
],
"settings": {
"react": {
"version": "detect"
}
}
settings: {
react: {
version: 'detect',
},
},
}
23 changes: 11 additions & 12 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ name: Node.js CI

on:
push:
branches: [ "main" ]
branches: ['main']
pull_request:
branches: [ "main" ]
branches: ['main']

jobs:
build:

runs-on: ubuntu-latest

strategy:
Expand All @@ -20,12 +19,12 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test
- run: npm run build
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test
- run: npm run build
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"trailingComma":"es5"
"trailingComma": "es5"
}
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ First off, thank you for considering contributing to ePlant! By submitting your
agree that it can be shared under the terms of our license.

### Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

## How to Contribute
Expand Down Expand Up @@ -39,7 +40,7 @@ We welcome feature requests! To suggest a new feature, please open an issue on G
```bash
git remote add upstream https://github.com/BioAnalyticResource/ePlant
```
4. **Verify versions**: Most folks are working with _Node v18.0.0^ and npm 9.8.0^. [You can install Node from here.](https://nodejs.org/en/download/package-manager)
4. **Verify versions**: Most folks are working with \_Node v18.0.0^ and npm 9.8.0^. [You can install Node from here.](https://nodejs.org/en/download/package-manager)
```bash
node -v
npm -v
Expand All @@ -54,12 +55,13 @@ We welcome feature requests! To suggest a new feature, please open an issue on G
```

### Submitting changes

1. **Create a branch**
```bash
git checkout -b your-branch-name
```
2. **Make changes**: Make changes in your forked repository.
3. **Test your changes**: Make sure your changes are working correctly.
3. **Test your changes**: Make sure your changes are working correctly.
4. **Commit your changes**:
```bash
git commit -m "Your commit message"
Expand All @@ -80,19 +82,23 @@ Please include in the PR:
- **Notes (Optional)**: Additional notes.

### Code Style

This is an abridged version of the [Google style guide](https://google.github.io/styleguide/tsguide.html) and [MS Typescript Coding guidelines](https://github.com/microsoft/TypeScript/wiki/Coding-guidelines), plus some tweaks to make it our own.

Use Prettier and ESLint for code formatting. You may want to install the plugin for your IDE to get live feedback and you can configure your IDE to apply auto formatting when you save a file. Using the tsconfig.json file, you can customize the rules for type checking. Avoid removing and/or ignoring default rules as much as possible. If you feel strongly about a rule please outline the changes into a PR and we can discuss the merits of introducing a new change.

All the new code must be written in typescript and all the types should be clearly defined in the project.

### Documentation

If your change affects any part of the documentation, please update the `README.md` accordingly.

### Testing

Make sure to run all tests before submitting your changes. If you add new functionality, please include tests for it.

### Getting Help

If you need help, feel free to ask questions by opening an issue. We appreciate your contributions!

Thank you for contributing to ePlant!
98 changes: 74 additions & 24 deletions Eplant/Eplant.tsx
Original file line number Diff line number Diff line change
@@ -1,40 +1,90 @@
// import useStateWithStorage from '@eplant/util/useStateWithStorage'
import { Route, Routes } from 'react-router-dom'

import { CssBaseline, ThemeProvider } from '@mui/material'
import { useEffect } from 'react'

import { Box, CircularProgress, CssBaseline, useTheme } from '@mui/material'
import { ThemeProvider } from '@mui/material/styles'

import { dark, light } from './css/theme'
import Sidebar from './UI/Sidebar'
import { URLStateProvider } from './state/URLStateProvider'
import { ViewContainer } from './UI/Layout/ViewContainer'
import Sidebar, { collapsedSidebarWidth, sidebarWidth } from './UI/Sidebar'
import { useConfig } from './config'
import EplantLayout from './EplantLayout'
import { useDarkMode } from './state'
import {
useActiveGeneId,
useActiveViewId,
useDarkMode,
useGeneticElements,
usePageLoad,
useSidebarState,
} from './state'
import { updateColors } from './updateColors'
export type EplantProps = Record<string, never>
export default function Eplant() {
const { rootPath } = useConfig()
const [darkMode] = useDarkMode()

return (
<ThemeProvider theme={darkMode ? dark : light}>
<CssBaseline />
<Routes>
<Route path={rootPath}>
<Route index element={<MainEplant />} />
</Route>
</Routes>
</ThemeProvider>
)
}
/**
* The main Eplant component. This is the root of the application. It contains the left nav and the layout.
* @returns {JSX.Element} The rendered Eplant component
*/
const Eplant = () => {
const [darkMode] = useDarkMode()
const [isCollapse, setIsCollapse] = useSidebarState()
const [activeGeneId, setActiveGeneId] = useActiveGeneId()
const [activeViewId, setActiveViewId] = useActiveViewId()
const theme = useTheme()
const [globalProgress, loaded] = usePageLoad()
const config = useConfig()
useEffect(() => {
if (loaded) {
updateColors(theme)
}
}, [theme, loaded])

// SideBar and EplantLayout children
export function MainEplant() {
return (
<>
<ThemeProvider theme={darkMode ? dark : light}>
<CssBaseline />
<Sidebar />
<EplantLayout />
</>
<URLStateProvider>
<Box
sx={(theme) => ({
height: `calc(100% - ${theme.spacing(1)})`,
left: `${isCollapse ? collapsedSidebarWidth : sidebarWidth}px`,
right: '0px',
position: 'absolute',
marginTop: '0.5rem',
boxSizing: 'border-box',
transition: 'left 1s ease-out',
backgroundColor: theme.palette.background.paper,
})}
>
<Box
sx={{
width: '100%',
height: '100%',
display: 'flex',
alignItems: 'stretch',
justifyContent: 'stretch',
}}
>
<div />
{loaded ? (
<ViewContainer
sx={{
width: '100%',
height: '100%',
}}
></ViewContainer>
) : (
<div>
<CircularProgress
variant='indeterminate'
value={globalProgress * 100}
/>
</div>
)}
</Box>
</Box>
</URLStateProvider>
</ThemeProvider>
)
}
export default Eplant
93 changes: 0 additions & 93 deletions Eplant/EplantLayout.tsx

This file was deleted.

6 changes: 0 additions & 6 deletions Eplant/GeneticElement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ export default class GeneticElement {
export type SpeciesApi = {
searchGene: (term: string) => Promise<GeneticElement | null>
autocomplete: (term: string) => Promise<string[]>
loaders: {
[key: string]: (
gene: GeneticElement,
loadEvent: (amount: number) => void
) => Promise<any>
}
}

/**
Expand Down
6 changes: 0 additions & 6 deletions Eplant/Species/arabidopsis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@ import axios from 'axios'
import { Species } from '@eplant/GeneticElement'
import GeneticElement from '@eplant/GeneticElement'

import GeneInfoViewLoader from './loaders/GeneInfoView'
import ArabidopsisPublicationViewer from './loaders/PublicationViewer'
const arabidopsis: Species = new Species('Arabidopsis', {
autocomplete,
searchGene,
loaders: {
'gene-info': GeneInfoViewLoader,
'publication-viewer': ArabidopsisPublicationViewer,
},
})
async function autocomplete(s: string) {
return (
Expand Down
Loading