Skip to content

Commit

Permalink
[ENH] Implemented UI improvements (#16)
Browse files Browse the repository at this point in the history
* Cleaned up old files

* Added favicon

* Added summary stats

* Implemented navbar

* Implemented logic for displaying snackbar/toasts

* Fixed the bg color on hover for modality buttons

* Added `circularProgress` on `submit query` button while result is being fetched

* Modified how dataset name is displayed in `ResultCard`

* Implemented validation for `continuousField`

* Refactored and formatted with prettier

* [WIP] Implemented alert for OpenNeuro

* Implemented `OpenNeuro` alert

* Moved the logic for validation of `ContinuousField` to `QueryForm`

* [REF] compute errors from props

---------

Co-authored-by: rmanaem <[email protected]>

* [REF] remove responsibilities from async getter

also learn a bit about promises

* [REF] remove responsibilities from node getter funtion

- learn more about async / await

* [REF] Removed `autoHideDuration` prop from `Snackbar`

* [REF] Added an empty line for readability

* [REF] Reduced inline comment

* [REF] Refactored logic inside `useEffect` to use `then` instead of an `async` function

* [REF] Refactored `summaryStats`

* [REF] Renamed `minAgeBiggerThanMax` to `minAgeExceedsMaxAge`

* [REF] Renamed `label` to `nodeName`

* [REF] Fixed typo in `openNeuroIsAnOption`

* Added comment `TODO` comment

* Added `notistack`

* [REF] Reworked logic of displaying toasts to use `notistack`

* Removed custom toast/snackbar components

* [REF] Renamed `tryThisOptionsGetter` to `getAttributes`

---------

Co-authored-by: Sebastian Urchs <[email protected]>
  • Loading branch information
rmanaem and surchs authored Feb 14, 2024
1 parent 78d37bc commit 91905f1
Show file tree
Hide file tree
Showing 20 changed files with 541 additions and 286 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/ico" href="./src/assets/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Neurobagel Query Tool</title>
</head>
Expand Down
68 changes: 63 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@
"@mui/material": "^5.15.5",
"axios": "^1.6.5",
"eslint-plugin-tsdoc": "^0.2.17",
"notistack": "^3.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.21.2"
"react-router-dom": "^6.21.2",
"uuid": "^9.0.1"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.10",
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^6.18.0",
"@vitejs/plugin-react-swc": "^3.5.0",
Expand Down
17 changes: 0 additions & 17 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,17 +0,0 @@
/* #root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
} */

.dataset-name-etc-container {
overflow: hidden;
}

.dataset-name {
max-width: 90%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
8 changes: 0 additions & 8 deletions src/App.cy.tsx

This file was deleted.

Loading

0 comments on commit 91905f1

Please sign in to comment.