Skip to content

Commit adaa308

Browse files
committed
better guidance for setting sync
1 parent 948c4aa commit adaa308

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/remoteConnector.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -945,21 +945,15 @@ export default class RemoteConnector extends Disposable {
945945
} catch (e) {
946946
if (e instanceof NoSyncStoreError) {
947947
const addSyncProvider = 'Settings Sync: Enable Sign In with Gitpod';
948-
const config = 'Configure';
949-
const action = await this.notifications.showInformationMessage(`Could not install local extensions on remote workspace. Please enable Settings Sync with Gitpod.`, { flow, id: 'no_sync_store' }, addSyncProvider, config);
948+
const action = await this.notifications.showInformationMessage(`Could not install local extensions on remote workspace. Please enable [Settings Sync](https://www.gitpod.io/docs/ides-and-editors/settings-sync#enabling-settings-sync-in-vs-code-desktop) with Gitpod.`, { flow, id: 'no_sync_store' }, addSyncProvider);
950949
if (action === addSyncProvider) {
951950
vscode.commands.executeCommand('gitpod.syncProvider.add');
952-
} else if (action === config) {
953-
vscode.commands.executeCommand('workbench.action.openSettings', `@ext:${this.context.extension.id} sync extensions`);
954951
}
955952
} else if (e instanceof NoSettingsSyncSession) {
956953
const enableSettingsSync = 'Enable Settings Sync';
957-
const config = 'Configure';
958-
const action = await this.notifications.showInformationMessage(`Could not install local extensions on remote workspace. Please enable Settings Sync.`, { flow, id: 'no_settings_sync' }, enableSettingsSync, config);
954+
const action = await this.notifications.showInformationMessage(`Could not install local extensions on remote workspace. Please enable [Settings Sync](https://www.gitpod.io/docs/ides-and-editors/settings-sync#enabling-settings-sync-in-vs-code-desktop).`, { flow, id: 'no_settings_sync' }, enableSettingsSync);
959955
if (action === enableSettingsSync) {
960956
vscode.commands.executeCommand('workbench.userDataSync.actions.turnOn');
961-
} else if (action === config) {
962-
vscode.commands.executeCommand('workbench.action.openSettings', `@ext:${this.context.extension.id} sync extensions`);
963957
}
964958
} else {
965959
this.logger.error('Error while fetching settings sync extension data:', e);

src/settingsSync.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class SettingsSync extends Disposable {
121121
const addedSyncProvider = await this.updateSyncContext();
122122
if (!addedSyncProvider) {
123123
const action = 'Settings Sync: Enable Sign In with Gitpod';
124-
const result = await this.notifications.showInformationMessage('Gitpod Settings Sync configuration invalidated. Settings Sync is disabled.', { flow, id: 'invalid' }, action);
124+
const result = await this.notifications.showInformationMessage(`[Settings Sync](https://www.gitpod.io/docs/ides-and-editors/settings-sync#enabling-settings-sync-in-vs-code-desktop) with ${gitpodHost} is disabled.`, { flow, id: 'invalid' }, action);
125125
if (result === action) {
126126
vscode.commands.executeCommand('gitpod.syncProvider.add');
127127
}
@@ -187,7 +187,14 @@ export class SettingsSync extends Disposable {
187187
await config.update('settingsSync.ignoredSettings', newIgnoredSettingsConfig, vscode.ConfigurationTarget.Global);
188188
await config.update('configurationSync.store', newSyncProviderConfig, vscode.ConfigurationTarget.Global);
189189

190-
await this.notifications.showInformationMessage('Quit VS Code for the new Settings Sync configuration to take effect.', { flow, modal: true, id: 'quit_to_apply' });
190+
const learnMore: vscode.MessageItem = {
191+
title: 'Learn More',
192+
isCloseAffordance: true
193+
};
194+
const action = await this.notifications.showInformationMessage('Please entirely quit VS Code for the Settings Sync configuration to take effect.', { flow, modal: true, id: 'quit_to_apply' }, learnMore);
195+
if (action === learnMore) {
196+
vscode.env.openExternal(vscode.Uri.parse("https://www.gitpod.io/docs/ides-and-editors/settings-sync#enabling-settings-sync-in-vs-code-desktop"));
197+
}
191198
} catch (e) {
192199
const outputMessage = `Error setting up Settings Sync with Gitpod: ${e}`;
193200
this.notifications.showErrorMessage(outputMessage, { flow, id: 'failed' });

0 commit comments

Comments
 (0)