Skip to content

threshold make - #24

Open
toki36 wants to merge 3 commits into
developfrom
feature/threshold-make
Open

threshold make#24
toki36 wants to merge 3 commits into
developfrom
feature/threshold-make

Conversation

@toki36

@toki36 toki36 commented Dec 6, 2025

Copy link
Copy Markdown
Contributor

radar-chart.tsxにモーダルの追加、しきい値をレーダーチャート上に線として表示

Copilot AI review requested due to automatic review settings December 6, 2025 21:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the radar chart component by adding a visual threshold indicator at the 0.5 level and replacing console.log debugging with a modal dialog for displaying disease information.

  • Added a highlighted threshold line at 0.5 level on the radar chart with distinctive red coloring (#fcc7c7ff) and thicker stroke
  • Implemented modal dialog to display disease tips when labels are pressed, replacing the previous console.log approach
  • Introduced state management for modal visibility and selected disease information

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +167 to +174
{selectedDisease && (
<Modal
open={isOpen}
onOpenChange={setIsOpen}
tipsTitle={selectedDisease.name}
tipsContent={selectedDisease.tips}
/>
)}

Copilot AI Dec 6, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The conditional rendering could be improved for better state management. Currently, selectedDisease is not cleared when the modal closes, causing the Modal component to remain mounted (though not visible) after closing. Consider either:

  1. Clearing selectedDisease when the modal closes:
<Modal
  open={isOpen}
  onOpenChange={(open) => {
    setIsOpen(open);
    if (!open) setSelectedDisease(null);
  }}
  tipsTitle={selectedDisease.name}
  tipsContent={selectedDisease.tips}
/>
  1. Or simplify by conditionally rendering based on isOpen alone:
{isOpen && selectedDisease && (
  <Modal ... />
)}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants