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

関数とパラメーターに説明のリンク追加 #534

Open
wants to merge 5 commits into
base: develop-main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,26 @@ export const AlgorithmParamForm = memo(function AlgorithmParamForm() {
selectAlgorithmParamsKeyList(nodeId),
arrayEqualityFn,
)
const parameterUrl = `https://github.com/arayabrain/barebone-studio/blob/develop-main/docs/specifications/algorithm_nodes.md#${algoName.toLowerCase()}`
useEffect(() => {
if (!algoParamIsLoaded) {
dispatch(getAlgoParams({ nodeId, algoName }))
}
}, [dispatch, nodeId, algoName, algoParamIsLoaded])
return (
<div style={{ padding: 24 }}>
<SectionTitle>{algoName}</SectionTitle>
<a
itutu-tienday marked this conversation as resolved.
Show resolved Hide resolved
href={parameterUrl}
target="_blank"
rel="noopener noreferrer"
style={{
textDecoration: "underline",
color: "inherit",
cursor: "pointer",
}}
>
<SectionTitle>{algoName}</SectionTitle>
</a>
{paramKeyList.map((paramKey) => (
<ParamItem key={paramKey} paramKey={paramKey} />
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,34 @@ const RightDrawer: FC = () => {
return "none"
}
})
const titleLink = useSelector((state: RootState) => {
const mode = selectRightDrawerMode(state)
switch (mode) {
case RIGHT_DRAWER_MODE.NWB:
return "https://optinist.readthedocs.io/en/latest/gui/workflow.html#nwb-setting"
itutu-tienday marked this conversation as resolved.
Show resolved Hide resolved
case RIGHT_DRAWER_MODE.PARAM_FORM:
itutu-tienday marked this conversation as resolved.
Show resolved Hide resolved
return "https://github.com/arayabrain/barebone-studio/blob/develop-main/docs/specifications/algorithm_nodes.md#algorithm_nodesalgorithm-nodes"
case RIGHT_DRAWER_MODE.SNAKEMAKE:
return "https://optinist.readthedocs.io/en/latest/gui/workflow.html#snakemane-settings"
default:
return ""
}
})
return (
<StyledDrawer open={open} anchor="right" variant="persistent">
<Toolbar />
<Box display="flex" alignItems="center">
<IconButton color="inherit" onClick={onClick} size="large">
<ChevronRightIcon />
</IconButton>
<Typography variant="h6">{title}</Typography>
<a
href={titleLink}
target="_blank"
rel="noopener noreferrer"
style={{ textDecoration: "underline", color: "inherit" }}
>
<Typography variant="h6">{title}</Typography>
</a>
</Box>
<Divider />
<MainContents>
Expand Down
Loading