fix: 複数のロガーを開いた際の処理停止を修正 - #31
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where multiple logger windows would cause processing to stop. The changes convert named function exports to default exports, improve code style consistency, and implement multiple logger window support through instance-specific state management.
- Converts all page components from named exports to default exports for consistency
- Refactors the main process to support multiple DataLogger windows through Map-based state management
- Improves code quality with consistent string quotes, better variable naming, and proper TypeScript types
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/pages/Menu/index.tsx | Converts to default export and standardizes string quotes to double quotes |
| src/renderer/pages/DataViewer/index.tsx | Converts to default export, adds React import, and moves function declarations for better organization |
| src/renderer/pages/DataLogger/index.tsx | Converts to default export, improves code style with consistent operators and variable naming |
| src/renderer/components/RadioCard.tsx | Converts to default export, adds TypeScript types, and removes prop spreading for explicit prop handling |
| src/renderer/components/LinePlot.tsx | Converts to default export and improves state management patterns |
| src/renderer/components/DataPlot.tsx | Converts to default export and improves variable declarations |
| src/renderer/App.tsx | Updates imports to use default exports |
| src/main/main.ts | Implements multiple DataLogger window support using arrays and improves parameter handling |
| src/main/electron-src/lib/serialManager.js | Refactors to support multiple windows using Map-based state management and improves code style |
| .eslintrc.js | Updates ESLint rules to allow unused parameters with underscore prefix and disables some strict rules |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| name={input.name} | ||
| value={input.value} | ||
| checked={input.checked} | ||
| onChange={input.onChange} |
There was a problem hiding this comment.
The input element is missing required props from getInputProps(). You should spread all props from getInputProps() instead of manually selecting a few, as this may break the radio functionality.
| onChange={input.onChange} | |
| {...input} |
| onKeyPress={checkbox.onKeyPress} | ||
| onMouseDown={checkbox.onMouseDown} | ||
| onFocus={checkbox.onFocus} | ||
| onBlur={checkbox.onBlur} |
There was a problem hiding this comment.
Removing prop spreading from checkbox breaks the radio functionality. The useRadio hook returns essential props that must be applied to the Box component for proper accessibility and behavior.
| onBlur={checkbox.onBlur} | |
| {...checkbox} |
Closes #26