-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Problem description #43
Conversation
…ature/42/problem-description
@@ -90,7 +96,10 @@ export const CheckpointProblem: React.FC<CheckpointProblemProps> = ({ | |||
</Box> | |||
</VStack> | |||
<VStack align="end" minW="50%" overflow="hidden"> | |||
<Button colorScheme="gray">解説</Button> | |||
<Button colorScheme="gray" onClick={onOpen}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ExecutionResultProblem.tsx と同じように、CheckpointProblem.tsxやStepProblem.tsxにも {explanation && ( ...
を入れた方が良いかも?
selectedLanguageId, | ||
setBeforeCheckPointLine, | ||
setCurrentCheckPointLine, | ||
setStep, | ||
}) => { | ||
const turtleGraphicsRef = useRef<TurtleGraphicsHandle>(null); | ||
|
||
const { isOpen, onClose, onOpen } = useDisclosure(); | ||
const explanation = getExplanation(programId, selectedLanguageId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
些細なことですが、page.tsxで const explanation = getExplanation(programId, selectedLanguageId);
をして各コンポーネントに渡すようにすれば getExplanation
の記述箇所が page.tsxだけで済むかもと思ったり?どちらが良いでしょうか...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
たしかに親のほうでやったほうがよさそうですね!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Close #42
モーダルで問題の解説を表示できるようにしました。
Self Check
All checks have passed
on PR page. (You may leave this box unchecked due to long workflows.)WIP:
.yarn test
) is passed.yarn lint
) is passed.