Skip to content

Commit 1314564

Browse files
committed
Change link
1 parent 4184a5b commit 1314564

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/views/manage-solution/view/components/manage-solution.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,11 @@ describe('ContextSelection', () => {
195195
}
196196

197197
expect(listener).toHaveBeenCalledTimes(6);
198-
expect(listener).toHaveBeenCalledWith({ type: 'OPEN_HELP' });
198+
expect(listener).toHaveBeenCalledWith({
199+
type: 'OPEN_FILE',
200+
path: 'https://mdk-packs.github.io/vscode-cmsis-solution-docs/manage_settings.html',
201+
external: true
202+
});
199203
expect(listener).toHaveBeenCalledWith({ type: 'GET_CONTEXT_SELECTION_DATA' });
200204
expect(listener).toHaveBeenCalledWith({ type: 'GET_DEBUG_ADAPTERS' });
201205
});

src/views/manage-solution/view/components/manage-solution.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,6 @@ export const ManageSolution = (props: ManageSolutionProps) => {
169169
?.debugger as GenericPropertyList || {}
170170
), [state.solutionData.selectedTarget?.targetSets, state.solutionData.selectedTarget?.selectedSet]);
171171

172-
const openHelp = React.useCallback(
173-
() => props.messageHandler.push({ type: 'OPEN_HELP' }),
174-
[props.messageHandler]
175-
);
176-
177172
// Generic getter (stable, no deps needed as it does not capture changing values directly)
178173
const getProperty = React.useCallback(function getProperty<T>(defaultValue: T | undefined, obj: Record<string, unknown>, ...keys: (string | unknown)[]): T | undefined {
179174
let result = obj;
@@ -325,7 +320,11 @@ export const ManageSolution = (props: ManageSolutionProps) => {
325320
style={{ padding: '0px 12px' }}
326321
title="Manage Solution Target"
327322
aria-label='Manage Solution Target'
328-
onClick={() => openHelp()}
323+
onClick={(e) => {
324+
e.preventDefault();
325+
e.stopPropagation();
326+
openFile('https://mdk-packs.github.io/vscode-cmsis-solution-docs/manage_settings.html', true);
327+
}}
329328
>
330329
<CmsisCodicon name='link-external' style={{ fontSize: '1em', display: 'inline' }} />
331330
</Button>

0 commit comments

Comments
 (0)