Skip to content
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

Changes to Settings page #364

Open
wants to merge 28 commits into
base: gui_graphs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1037479
Update FrequencyRange component
toni-neurosc Sep 24, 2024
447fc20
Fix Number input fields
toni-neurosc Sep 24, 2024
1b066de
Disable autocomplete from TextFields
toni-neurosc Sep 25, 2024
3cc373c
Fix FrequencyRangeList
toni-neurosc Sep 25, 2024
2518990
Add subclass of Pydantic Field that carries additional metadata for f…
toni-neurosc Oct 6, 2024
166ad98
display Pydantic errors in Settings page
toni-neurosc Oct 10, 2024
446b194
Refactor SettingsSection recursive rendering component
toni-neurosc Oct 14, 2024
820e80b
delete unused components
toni-neurosc Nov 8, 2024
9e3f2b2
Change NMSettings.get_default() from reading settings from file to r…
toni-neurosc Nov 8, 2024
dd53590
fix zustand version
toni-neurosc Nov 8, 2024
56d7806
Add classes NMSequenceModel and NMValueModel
toni-neurosc Nov 8, 2024
34a4412
bugfix: in NMBaseModel.validate() method, change model_validate() for…
toni-neurosc Nov 8, 2024
f562621
Improve error collection for the Settings page
toni-neurosc Nov 25, 2024
550bd49
bugfix in settings wrap validator
toni-neurosc Nov 25, 2024
d8581c1
Add Folder selection to FileBrowser component
toni-neurosc Nov 25, 2024
069312f
Merge branch 'better_settings_layout' into gui_graphs
toni-neurosc Nov 27, 2024
f8375c5
Add scan JSON and port selection to App
toni-neurosc Nov 27, 2024
6cf4516
Merge branch 'better_settings_layout' into gui_graphs
toni-neurosc Nov 27, 2024
9a323a8
Fix merge errors
toni-neurosc Nov 27, 2024
f5f810d
Fix StatusBar bug
toni-neurosc Nov 28, 2024
f571c50
Allow passing app server and Vite server ports as params for nm.App
toni-neurosc Nov 28, 2024
9cf3ff0
remove react-scan from dev deps
toni-neurosc Nov 28, 2024
511bdbc
Refactor useStatusBar hook
toni-neurosc Nov 28, 2024
59b372b
f
toni-neurosc Nov 28, 2024
35f3a89
More improvements to settings
toni-neurosc Nov 28, 2024
96c7770
Merge remote-tracking branch 'origin/gui_graphs' into better_settings…
toni-neurosc Dec 4, 2024
802db51
Add FileInfo class, re-organize utils folder, add backend endpoint to…
toni-neurosc Dec 4, 2024
7ca25dc
- Refactor handling of async calls to websocket send data functions
toni-neurosc Dec 5, 2024
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
2 changes: 1 addition & 1 deletion gui_dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"react-dom": "next",
"react-icons": "^5.3.0",
"react-plotly.js": "^2.6.0",
"react-router-dom": "^6.28.0",
"react-router-dom": "^7.0.1",
"zustand": "latest"
},
"devDependencies": {
Expand Down
2 changes: 0 additions & 2 deletions gui_dev/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ export const App = () => {
const connectSocket = useSocketStore((state) => state.connectSocket);
const disconnectSocket = useSocketStore((state) => state.disconnectSocket);

connectSocket();

useEffect(() => {
console.log("Connecting socket from App component...");
connectSocket();
Expand Down
4 changes: 2 additions & 2 deletions gui_dev/src/components/FileBrowser/FileBrowser.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useReducer, useEffect } from "react";
import { getBackendURL } from "@/utils/getBackendURL";
import { getBackendURL } from "@/utils";
import {
Box,
Button,
Expand Down Expand Up @@ -36,7 +36,7 @@ import {
import { QuickAccessSidebar } from "./QuickAccess";
import { FileManager } from "@/utils/FileManager";

const fileManager = new FileManager("");
const fileManager = new FileManager(getBackendURL("/api/files"));

const ALLOWED_EXTENSIONS = [".npy", ".vhdr", ".fif", ".edf", ".bdf"];

Expand Down
2 changes: 1 addition & 1 deletion gui_dev/src/components/FileBrowser/QuickAccess.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from "react";
import { getBackendURL } from "@/utils/getBackendURL";
import { getBackendURL } from "@/utils";
import {
Paper,
Typography,
Expand Down
13 changes: 9 additions & 4 deletions gui_dev/src/components/StatusBar/StatusBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import { ResizeHandle } from "./ResizeHandle";
import { SocketStatus } from "./SocketStatus";
import { WebviewStatus } from "./WebviewStatus";

import { useWebviewStore } from "@/stores";

import { useUiStore, useWebviewStore } from "@/stores";
import { Stack } from "@mui/material";

export const StatusBar = () => {
const { isWebView } = useWebviewStore((state) => state.isWebView);
const isWebView = useWebviewStore((state) => state.isWebView);
const getStatusBarContent = useUiStore((state) => state.getStatusBarContent);

const StatusBarContent = getStatusBarContent();

return (
<Stack
Expand All @@ -17,8 +19,11 @@ export const StatusBar = () => {
bgcolor="background.level1"
borderTop="2px solid"
borderColor="background.level3"
height="2rem"
>
<WebviewStatus />
{StatusBarContent && <StatusBarContent />}

{/* <WebviewStatus /> */}
{/* Current experiment */}
{/* Current stream */}
{/* Current activity */}
Expand Down
8 changes: 4 additions & 4 deletions gui_dev/src/components/TitledBox.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Container } from "@mui/material";
import { Box, Container } from "@mui/material";

/**
* Component that uses the Box component to render an HTML fieldset element
Expand All @@ -13,14 +13,14 @@ export const TitledBox = ({
children,
...props
}) => (
<Container
<Box
component="fieldset"
{...props}
sx={{
borderRadius: 5,
border: "1px solid #555",
backgroundColor: "#424242",
padding: 2,
padding: 1,
width: "100%",
gap: 2,
display: "flex",
Expand All @@ -31,5 +31,5 @@ export const TitledBox = ({
>
<legend>{title}</legend>
{children}
</Container>
</Box>
);
8 changes: 8 additions & 0 deletions gui_dev/src/main.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
// import { scan } from "react-scan";
// scan({
// enabled: true,
// log: true, // logs render info to console
// });

import { StrictMode } from "react";
import ReactDOM from "react-dom/client";
import { App } from "./App.jsx";

// Set up react-scan

// Ignore React 19 warning about accessing element.ref
const originalConsoleError = console.error;
console.error = (message, ...messageArgs) => {
Expand Down
65 changes: 0 additions & 65 deletions gui_dev/src/pages/Settings/DragAndDropList.jsx

This file was deleted.

72 changes: 0 additions & 72 deletions gui_dev/src/pages/Settings/DragAndDropList.module.css

This file was deleted.

66 changes: 0 additions & 66 deletions gui_dev/src/pages/Settings/Dropdown.jsx

This file was deleted.

Loading
Loading