From b84746f473e7ebfb1153a0d84c2b6935c61b9492 Mon Sep 17 00:00:00 2001 From: Paul Slaughter Date: Wed, 1 May 2024 02:48:41 -0500 Subject: [PATCH 1/7] Add Extensions Marketplace field to user preferences page - Adds `web_ide_extensions_marketplace` feature flag. - Adds integration view to user preferences with third-party acknowledgement warning. - Moves some Remote-Development calculation to CE --- .../javascripts/ide/init_gitlab_web_ide.js | 5 + .../extensions_marketplace_warning.vue | 113 ++++++++++++++++++ .../components/integration_view.vue | 22 +++- .../components/profile_preferences.vue | 53 +++++++- .../profile/preferences/constants.js | 7 ++ .../profiles/preferences_controller.rb | 1 + app/helpers/ide_helper.rb | 3 +- app/helpers/preferences_helper.rb | 14 +++ app/models/user.rb | 1 + app/models/user_preference.rb | 10 ++ app/views/profiles/preferences/show.html.haml | 7 +- .../beta/web_ide_extensions_marketplace.yml | 9 ++ doc/user/profile/preferences.md | 22 +++- doc/user/project/web_ide/index.md | 39 ++++++ .../extensions_gallery_metadata_generator.rb | 39 +----- lib/gitlab/web_ide/extensions_marketplace.rb | 108 +++++++++++++++++ locale/gitlab.pot | 27 +++++ spec/helpers/preferences_helper_spec.rb | 46 ++++--- spec/models/user_preference_spec.rb | 39 ++++++ spec/models/user_spec.rb | 3 + 20 files changed, 508 insertions(+), 60 deletions(-) create mode 100644 app/assets/javascripts/profile/preferences/components/extensions_marketplace_warning.vue create mode 100644 config/feature_flags/beta/web_ide_extensions_marketplace.yml create mode 100644 lib/gitlab/web_ide/extensions_marketplace.rb diff --git a/app/assets/javascripts/ide/init_gitlab_web_ide.js b/app/assets/javascripts/ide/init_gitlab_web_ide.js index 4581b508fe8b6f..beb79d027c4cee 100644 --- a/app/assets/javascripts/ide/init_gitlab_web_ide.js +++ b/app/assets/javascripts/ide/init_gitlab_web_ide.js @@ -46,6 +46,7 @@ export const initGitlabWebIDE = async (el) => { forkInfo: forkInfoJSON, editorFont: editorFontJSON, codeSuggestionsEnabled, + extensionsGallerySettings: extensionsGallerySettingsJSON, } = el.dataset; const rootEl = setupRootElement(el); @@ -53,6 +54,9 @@ export const initGitlabWebIDE = async (el) => { ? convertObjectPropsToCamelCase(JSON.parse(editorFontJSON), { deep: true }) : null; const forkInfo = forkInfoJSON ? JSON.parse(forkInfoJSON) : null; + const extensionsGallerySettings = extensionsGallerySettingsJSON + ? convertObjectPropsToCamelCase(JSON.parse(extensionsGallerySettingsJSON), { deep: true }) + : undefined; const oauthConfig = getOAuthConfig(el.dataset); const httpHeaders = oauthConfig @@ -85,6 +89,7 @@ export const initGitlabWebIDE = async (el) => { settingsSync: true, }, editorFont, + extensionsGallerySettings, codeSuggestionsEnabled, handleTracking, // See https://gitlab.com/gitlab-org/gitlab-web-ide/-/blob/main/packages/web-ide-types/src/config.ts#L86 diff --git a/app/assets/javascripts/profile/preferences/components/extensions_marketplace_warning.vue b/app/assets/javascripts/profile/preferences/components/extensions_marketplace_warning.vue new file mode 100644 index 00000000000000..3654215a6b7ff4 --- /dev/null +++ b/app/assets/javascripts/profile/preferences/components/extensions_marketplace_warning.vue @@ -0,0 +1,113 @@ + + + diff --git a/app/assets/javascripts/profile/preferences/components/integration_view.vue b/app/assets/javascripts/profile/preferences/components/integration_view.vue index 9924f248b891ab..b4a06c866eb6bd 100644 --- a/app/assets/javascripts/profile/preferences/components/integration_view.vue +++ b/app/assets/javascripts/profile/preferences/components/integration_view.vue @@ -2,6 +2,8 @@ import { GlIcon, GlLink, GlFormGroup, GlFormCheckbox } from '@gitlab/ui'; import IntegrationHelpText from '~/vue_shared/components/integrations_help_text.vue'; +const toCheckboxValue = (bool) => (bool ? '1' : false); + export default { name: 'IntegrationView', components: { @@ -11,7 +13,6 @@ export default { GlFormCheckbox, IntegrationHelpText, }, - inject: ['userFields'], props: { helpLink: { type: String, @@ -29,10 +30,14 @@ export default { type: Object, required: true, }, + value: { + type: Boolean, + required: true, + }, }, data() { return { - isEnabled: this.userFields[this.config.formName] ? '1' : '0', + checkboxValue: toCheckboxValue(this.value), }; }, computed: { @@ -43,6 +48,17 @@ export default { return `user_${this.config.formName}`; }, }, + watch: { + value: { + handler(val) { + this.checkboxValue = toCheckboxValue(val); + }, + immediate: true, + }, + checkboxValue(val) { + this.$emit('input', Boolean(val)); + }, + }, }; @@ -61,7 +77,7 @@ export default { value="0" data-testid="profile-preferences-integration-hidden-field" /> - {{ config.label }} diff --git a/app/assets/javascripts/profile/preferences/constants.js b/app/assets/javascripts/profile/preferences/constants.js index ea8464ba06544f..1da710fc08cf4e 100644 --- a/app/assets/javascripts/profile/preferences/constants.js +++ b/app/assets/javascripts/profile/preferences/constants.js @@ -1,5 +1,7 @@ import { s__, __ } from '~/locale'; +export const INTEGRATION_EXTENSIONS_MARKETPLACE = 'extensions_marketplace'; + export const INTEGRATION_VIEW_CONFIGS = { sourcegraph: { title: s__('Preferences|Sourcegraph'), @@ -11,6 +13,11 @@ export const INTEGRATION_VIEW_CONFIGS = { label: s__('Preferences|Enable Gitpod integration'), formName: 'gitpod_enabled', }, + [INTEGRATION_EXTENSIONS_MARKETPLACE]: { + title: s__('Preferences|Extensions Marketplace'), + label: s__('Preferences|Enable Extensions Marketplace'), + formName: 'extensions_marketplace_enabled', + }, }; export const i18n = { diff --git a/app/controllers/profiles/preferences_controller.rb b/app/controllers/profiles/preferences_controller.rb index 77ae313b5736e5..c793d866182164 100644 --- a/app/controllers/profiles/preferences_controller.rb +++ b/app/controllers/profiles/preferences_controller.rb @@ -56,6 +56,7 @@ def preferences_param_names :tab_width, :sourcegraph_enabled, :gitpod_enabled, + :extensions_marketplace_enabled, :render_whitespace_in_code, :project_shortcut_buttons, :keyboard_shortcuts_enabled, diff --git a/app/helpers/ide_helper.rb b/app/helpers/ide_helper.rb index 312807c004a547..3ba9c27962a6b6 100644 --- a/app/helpers/ide_helper.rb +++ b/app/helpers/ide_helper.rb @@ -71,7 +71,8 @@ def new_ide_data(project:) 'csp-nonce' => content_security_policy_nonce, # We will replace these placeholders in the FE 'ide-remote-path' => ide_remote_path(remote_host: ':remote_host', remote_path: ':remote_path'), - 'editor-font' => new_ide_fonts.to_json + 'editor-font' => new_ide_fonts.to_json, + 'extensions-gallery-settings' => ::Gitlab::WebIde::ExtensionsMarketplace.webide_extensions_gallery_settings(user: current_user).to_json }.merge(new_ide_code_suggestions_data).merge(new_ide_oauth_data) end diff --git a/app/helpers/preferences_helper.rb b/app/helpers/preferences_helper.rb index 53d6d35ba8cc44..7e7113ca82fc1f 100644 --- a/app/helpers/preferences_helper.rb +++ b/app/helpers/preferences_helper.rb @@ -128,11 +128,25 @@ def integration_views [].tap do |views| views << { name: 'gitpod', message: gitpod_enable_description, message_url: gitpod_url_placeholder, help_link: help_page_path('integration/gitpod') } if Gitlab::CurrentSettings.gitpod_enabled views << { name: 'sourcegraph', message: sourcegraph_url_message, message_url: Gitlab::CurrentSettings.sourcegraph_url, help_link: help_page_path('user/profile/preferences', anchor: 'sourcegraph') } if Gitlab::Sourcegraph.feature_available? && Gitlab::CurrentSettings.sourcegraph_enabled + views << extensions_marketplace_view if Gitlab::WebIde::ExtensionsMarketplace.feature_enabled?(user: current_user) end end private + def extensions_marketplace_view + # We handle the linkStart / linkEnd inside of a Vue sprintf + extensions_marketplace_home = "%{linkStart}#{::Gitlab::WebIde::ExtensionsMarketplace.marketplace_home_url}%{linkEnd}" + message = format(s_('PreferencesIntegrations|Use %{extensions_marketplace_home} as the Extensions Marketplace for the Web IDE.'), extensions_marketplace_home: extensions_marketplace_home) + + { + name: 'extensions_marketplace', + message: message, + message_url: Gitlab::WebIde::ExtensionsMarketplace.marketplace_home_url, + help_link: Gitlab::WebIde::ExtensionsMarketplace.help_preferences_url + } + end + def gitpod_url_placeholder Gitlab::CurrentSettings.gitpod_url.presence || 'https://gitpod.io/' end diff --git a/app/models/user.rb b/app/models/user.rb index 6edebb56a4cc35..74c9479f46efd9 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -410,6 +410,7 @@ def update_tracked_fields!(request) :gitpod_enabled, :gitpod_enabled=, :use_web_ide_extension_marketplace, :use_web_ide_extension_marketplace=, :extensions_marketplace_opt_in_status, :extensions_marketplace_opt_in_status=, + :extensions_marketplace_enabled, :extensions_marketplace_enabled=, :setup_for_company, :setup_for_company=, :project_shortcut_buttons, :project_shortcut_buttons=, :keyboard_shortcuts_enabled, :keyboard_shortcuts_enabled=, diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index 5845b521e14dba..6646165f74b050 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -131,6 +131,16 @@ def early_access_event_tracking? early_access_program_participant? && early_access_program_tracking? end + def extensions_marketplace_enabled + extensions_marketplace_opt_in_status == "enabled" + end + + def extensions_marketplace_enabled=(value) + status = ActiveRecord::Type::Boolean.new.cast(value) ? 'enabled' : 'disabled' + + self.extensions_marketplace_opt_in_status = status + end + private def user_belongs_to_home_organization diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 5065f27f40333b..61f63d5429ba39 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -3,12 +3,13 @@ - user_theme_id = Gitlab::Themes.for_user(@user).id - user_color_mode_id = Gitlab::ColorModes.for_user(@user).id - user_color_schema_id = Gitlab::ColorSchemes.for_user(@user).id -- user_fields = { color_mode_id: user_color_mode_id, theme: user_theme_id, gitpod_enabled: @user.gitpod_enabled, sourcegraph_enabled: @user.sourcegraph_enabled }.to_json +- user_fields = { color_mode_id: user_color_mode_id, theme: user_theme_id, gitpod_enabled: @user.gitpod_enabled, sourcegraph_enabled: @user.sourcegraph_enabled, extensions_marketplace_enabled: @user.extensions_marketplace_enabled }.to_json - fixed_help_text = s_('Preferences|Content will be a maximum of 1280 pixels wide.') - fluid_help_text = s_('Preferences|Content will span %{percentage} of the page width.').html_safe % { percentage: '100%' } - @color_modes = Gitlab::ColorModes::available_modes.to_json - @themes = Gitlab::Themes::available_themes.to_json -- data_attributes = { color_modes: @color_modes, themes: @themes, integration_views: integration_views.to_json, user_fields: user_fields, body_classes: Gitlab::Themes.body_classes, profile_preferences_path: profile_preferences_path } +- extensions_marketplace_url = ::Gitlab::WebIde::ExtensionsMarketplace.marketplace_home_url +- data_attributes = { color_modes: @color_modes, themes: @themes, integration_views: integration_views.to_json, user_fields: user_fields, body_classes: Gitlab::Themes.body_classes, profile_preferences_path: profile_preferences_path, extensions_marketplace_url: extensions_marketplace_url } - @force_desktop_expanded_sidebar = true = gitlab_ui_form_for @user, url: profile_preferences_path, remote: true, method: :put, html: { id: "profile-preferences-form" } do |f| @@ -186,4 +187,6 @@ s_('Preferences|Enable follow users') = render_if_exists 'profiles/preferences/zoekt_settings', form: f + -# Anchor used for linking straight to integrations part + %span#integrations #js-profile-preferences-app{ data: data_attributes } diff --git a/config/feature_flags/beta/web_ide_extensions_marketplace.yml b/config/feature_flags/beta/web_ide_extensions_marketplace.yml new file mode 100644 index 00000000000000..ba76b1d3fb598d --- /dev/null +++ b/config/feature_flags/beta/web_ide_extensions_marketplace.yml @@ -0,0 +1,9 @@ +--- +name: web_ide_extensions_marketplace +feature_issue_url: https://gitlab.com/groups/gitlab-org/-/epics/7685 +introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/151352 +rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/459028 +milestone: '17.0' +group: group::ide +type: beta +default_enabled: false diff --git a/doc/user/profile/preferences.md b/doc/user/profile/preferences.md index 78f18b2465528c..9a72508c615ac5 100644 --- a/doc/user/profile/preferences.md +++ b/doc/user/profile/preferences.md @@ -342,7 +342,7 @@ To access your **Followers** and **Following** tabs: ## Integrate your GitLab instance with third-party services -Give third-party services access to your GitLab account. +Give third-party services access to enhance the GitLab experience. ### Integrate your GitLab instance with Gitpod @@ -370,6 +370,26 @@ To integrate with Sourcegraph: You must be the administrator of the GitLab instance to configure GitLab with Sourcegraph. +### Integrate with Extensions Marketplace + +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/151352) in GitLab 17.0 [with a flag](../../administration/feature_flags.md) named `web_ide_extensions_marketplace`. Disabled by default. +> - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/459028) in GitLab 17.0. + +The [Extensions Marketplace](../project/web_ide/index.md#extensions-marketplace) enables users to +search and manage extensions for the Web IDE. + +If the GitLab instance is configured to use a third-party service for the Extensions +Marketplace, you must enable the marketplace in your user preferences. + +To enable the Extensions Marketplace for the Web IDE: + +1. On the left sidebar, select your avatar. +1. Select **Preferences**. +1. Find the **Integrations** section. +1. Select the **Enable Extensions Marketplace** checkbox. +1. Select **I understand** in the Third-Party Extensions Acknowledgement. +1. Select **Save changes**. + - ## Interactive web terminals DETAILS: @@ -235,7 +221,7 @@ However, you can use a terminal to install dependencies and compile and debug co For more information, see [Remote development](../remote_development/index.md). -## Extensions Marketplace +## Extension marketplace DETAILS: **Status**: Beta @@ -243,36 +229,39 @@ DETAILS: WARNING: This feature is in [Beta](../../../policy/experiment-beta-support.md#beta) and subject to change without notice. -> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/151352) in GitLab 17.0 [with a flag](../../../administration/feature_flags.md) named `web_ide_extensions_marketplace`. Disabled by default. +> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/151352) in GitLab 17.0 [with flags](../../../administration/feature_flags.md) named `web_ide_oauth` and `web_ide_extensions_marketplace`. Disabled by default. > - [Enabled on GitLab.com](https://gitlab.com/gitlab-org/gitlab/-/issues/459028) in GitLab 17.0. FLAG: -On self-managed GitLab, by default this feature is not available. To enable the feature, an administrator can [enable the feature flag](../../../administration/feature_flags.md) named `web_ide_oauth` **and** `web_ide_extensions_marketplace`. On GitLab.com and GitLab Dedicated, this feature is available. +The availability of this feature is controlled by a feature flag. +For more information, see the history. -The Web IDE Extensions Marketplace enables users to download and run VSCode -extensions that enhance the editing experience. +Prerequisites: -To search for and install extensions: +- You must enable the extension marketplace in your [user preferences](../../profile/preferences.md#integrate-with-the-extension-marketplace). -1. On the top menu bar, select **View > Extensions**, - or press Command+Shift+X. -1. Enter text to search for an extension (like `vim`). -1. Select an extension to view information. -1. To install the extensions, click **Install** in the extension information page. +You can use the extension marketplace to download and run VS Code extensions in the Web IDE. + +The extension marketplace is preconfigured at the GitLab instance level +and is hardcoded to [`https://open-vsx.org/`](https://open-vsx.org/). +[Epic 11770](https://gitlab.com/groups/gitlab-org/-/epics/11770) proposes to change this behavior. + +### Install an extension -To uninstall extensions: +To install an extension in the Web IDE: 1. On the top menu bar, select **View > Extensions**, or press Command+Shift+X. -1. You should see a list of **Installed** extensions. If not, on the menu - in the extensions sidebar, select **Views > Installed** and make sure - it is checked. -1. Click on an extension to view its information. -1. To uninstall the extension, click **Uninstall** in the extension information page. - -The marketplace is preconfigured at the GitLab instance level. For now, this is -hardcoded to [`https://open-vsx.org/`](https://open-vsx.org/), but this will -soon be configurable by GitLab administrators (See [this epic](https://gitlab.com/groups/gitlab-org/-/epics/11770)). +1. In the search box, enter the extension name. +1. Select the extension you want to install. +1. Select **Install**. + +### Uninstall an extension + +To uninstall an extension in the Web IDE: + +1. From the list of installed extensions, select the extension you want to uninstall. +1. Select **Uninstall**. ## Related topics diff --git a/lib/gitlab/web_ide/extensions_marketplace.rb b/lib/gitlab/web_ide/extensions_marketplace.rb index 903a2ecc00776a..36a8db999fefc5 100644 --- a/lib/gitlab/web_ide/extensions_marketplace.rb +++ b/lib/gitlab/web_ide/extensions_marketplace.rb @@ -46,12 +46,12 @@ def marketplace_home_url end def help_url - ::Gitlab::Routing.url_helpers.help_page_url('user/project/web_ide/index', anchor: 'extensions-marketplace') + ::Gitlab::Routing.url_helpers.help_page_url('user/project/web_ide/index', anchor: 'extension-marketplace') end def help_preferences_url ::Gitlab::Routing.url_helpers.help_page_url('user/profile/preferences', - anchor: 'integrate-with-extensions-marketplace') + anchor: 'integrate-with-the-extension-marketplace') end def user_preferences_url diff --git a/locale/gitlab.pot b/locale/gitlab.pot index d03d413ca43038..2dd08c3d57ceb7 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -38780,7 +38780,7 @@ msgstr "" msgid "PreferencesIntegrations|Third-party extensions are now available in the Web IDE. While each extension runs in a secure browser sandbox, %{boldStart}third-party extensions%{boldEnd} may have access to the contents of the files opened in the Web IDE, %{boldStart}including any personal data in those files%{boldEnd}, and may communicate with external servers." msgstr "" -msgid "PreferencesIntegrations|Use %{extensions_marketplace_home} as the Extensions Marketplace for the Web IDE." +msgid "PreferencesIntegrations|Uses %{extensions_marketplace_home} as the extension marketplace for the Web IDE." msgstr "" msgid "Preferences|%{link_start}List of keyboard shortcuts%{link_end}" @@ -38843,15 +38843,15 @@ msgstr "" msgid "Preferences|Enable %{link_start}Code Suggestions%{link_end} for the following groups.%{br_tag}Only groups that have purchased the Code Suggestion add-on and have available seats are listed here.%{br_tag} If you were expecting to see a group and it is missing from the list, please contact the group owner." msgstr "" -msgid "Preferences|Enable Extensions Marketplace" -msgstr "" - msgid "Preferences|Enable Gitpod integration" msgstr "" msgid "Preferences|Enable Zoekt code search" msgstr "" +msgid "Preferences|Enable extension marketplace" +msgstr "" + msgid "Preferences|Enable follow users" msgstr "" @@ -38864,9 +38864,6 @@ msgstr "" msgid "Preferences|Enable keyboard shortcuts" msgstr "" -msgid "Preferences|Extensions Marketplace" -msgstr "" - msgid "Preferences|Failed to save preferences." msgstr "" @@ -38945,6 +38942,9 @@ msgstr "" msgid "Preferences|Use relative times" msgstr "" +msgid "Preferences|Web IDE" +msgstr "" + msgid "Preferences|When you type in a description or comment box, pressing %{kbdOpen}Enter%{kbdClose} in a list adds a new item below." msgstr "" diff --git a/spec/helpers/preferences_helper_spec.rb b/spec/helpers/preferences_helper_spec.rb index e6934d8b8989f9..5306b86d08f2e2 100644 --- a/spec/helpers/preferences_helper_spec.rb +++ b/spec/helpers/preferences_helper_spec.rb @@ -283,11 +283,11 @@ def stub_user(messages = {}) allow(Gitlab::WebIde::ExtensionsMarketplace).to receive(:feature_enabled?).with(user: user).and_return(true) end - it 'includes Extensions Marketplace integration' do + it 'includes extension marketplace integration' do expect(helper.integration_views).to include( a_hash_including({ name: 'extensions_marketplace', - message: 'Use %{linkStart}https://open-vsx.org%{linkEnd} as the Extensions Marketplace for the Web IDE.', + message: 'Uses %{linkStart}https://open-vsx.org%{linkEnd} as the extension marketplace for the Web IDE.', message_url: 'https://open-vsx.org' }) ) diff --git a/spec/lib/gitlab/web_ide/extensions_marketplace_spec.rb b/spec/lib/gitlab/web_ide/extensions_marketplace_spec.rb index fd3050be7bfb53..7c9ba0553a6033 100644 --- a/spec/lib/gitlab/web_ide/extensions_marketplace_spec.rb +++ b/spec/lib/gitlab/web_ide/extensions_marketplace_spec.rb @@ -42,13 +42,13 @@ end describe '#help_url' do - it { expect(described_class.help_url).to match('/help/user/project/web_ide/index#extensions-marketplace') } + it { expect(described_class.help_url).to match('/help/user/project/web_ide/index#extension-marketplace') } end describe '#help_preferences_url' do it do expect(described_class.help_preferences_url).to match( - '/help/user/profile/preferences#integrate-with-extensions-marketplace' + '/help/user/profile/preferences#integrate-with-the-extension-marketplace' ) end end -- GitLab From 2c894b52b4ed38c6a0f036b21eebd0fa347d62ac Mon Sep 17 00:00:00 2001 From: Paul Slaughter Date: Tue, 7 May 2024 09:04:35 -0500 Subject: [PATCH 6/7] FE review updates - Add helper in extensions_marketplace_warning_spec - Move integrations anchor into Vue component - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/151352#note_1896173797 --- .../components/profile_preferences.vue | 6 ++++- app/views/profiles/preferences/show.html.haml | 2 -- .../extensions_marketplace_warning_spec.js | 27 +++++++++---------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/app/assets/javascripts/profile/preferences/components/profile_preferences.vue b/app/assets/javascripts/profile/preferences/components/profile_preferences.vue index 119e4efd82d1a1..f42ca4cf569d98 100644 --- a/app/assets/javascripts/profile/preferences/components/profile_preferences.vue +++ b/app/assets/javascripts/profile/preferences/components/profile_preferences.vue @@ -134,7 +134,11 @@ export default { >
-

+

{{ $options.i18n.integrations }}

diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 61f63d5429ba39..a7a44db96cd6a4 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -187,6 +187,4 @@ s_('Preferences|Enable follow users') = render_if_exists 'profiles/preferences/zoekt_settings', form: f - -# Anchor used for linking straight to integrations part - %span#integrations #js-profile-preferences-app{ data: data_attributes } diff --git a/spec/frontend/profile/preferences/components/extensions_marketplace_warning_spec.js b/spec/frontend/profile/preferences/components/extensions_marketplace_warning_spec.js index 507ffbba0f47c1..c037b406633caf 100644 --- a/spec/frontend/profile/preferences/components/extensions_marketplace_warning_spec.js +++ b/spec/frontend/profile/preferences/components/extensions_marketplace_warning_spec.js @@ -38,6 +38,11 @@ describe('profile/preferences/components/extensions_marketplace_warning', () => await nextTick(); }; + const setValue = async (value) => { + wrapper.setProps({ value }); + await nextTick(); + }; + describe('when initializes with value: false', () => { beforeEach(() => { createComponent({ value: false }); @@ -49,9 +54,7 @@ describe('profile/preferences/components/extensions_marketplace_warning', () => describe('when value changes to true', () => { beforeEach(async () => { - wrapper.setProps({ value: true }); - - await nextTick(); + await setValue(true); }); it('shows modal with props', () => { @@ -95,13 +98,11 @@ describe('profile/preferences/components/extensions_marketplace_warning', () => }); it('opens modal again when value changes', async () => { - wrapper.setProps({ value: false }); - await nextTick(); + await setValue(false); expect(findModal().props('visible')).toBe(false); - wrapper.setProps({ value: true }); - await nextTick(); + await setValue(true); expect(findModal().props('visible')).toBe(true); }); @@ -119,13 +120,11 @@ describe('profile/preferences/components/extensions_marketplace_warning', () => }); it('does not open modal when value changes', async () => { - wrapper.setProps({ value: false }); - await nextTick(); + await setValue(false); expect(findModal().props('visible')).toBe(false); - wrapper.setProps({ value: true }); - await nextTick(); + await setValue(true); expect(findModal().props('visible')).toBe(false); }); @@ -143,13 +142,11 @@ describe('profile/preferences/components/extensions_marketplace_warning', () => }); it('does not open modal when value changes', async () => { - wrapper.setProps({ value: false }); - await nextTick(); + await setValue(false); expect(findModal().props('visible')).toBe(false); - wrapper.setProps({ value: true }); - await nextTick(); + await setValue(true); expect(findModal().props('visible')).toBe(false); }); -- GitLab From f9e4a102acf74a472ce766f93d74d8daa99afcd0 Mon Sep 17 00:00:00 2001 From: Paul Slaughter Date: Tue, 7 May 2024 14:16:26 +0000 Subject: [PATCH 7/7] Doc update - fix first step in uninstall extension --- doc/user/project/web_ide/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/user/project/web_ide/index.md b/doc/user/project/web_ide/index.md index beb7186448c246..eb2f64332c09d3 100644 --- a/doc/user/project/web_ide/index.md +++ b/doc/user/project/web_ide/index.md @@ -260,6 +260,8 @@ To install an extension in the Web IDE: To uninstall an extension in the Web IDE: +1. On the top menu bar, select **View > Extensions**, + or press Command+Shift+X. 1. From the list of installed extensions, select the extension you want to uninstall. 1. Select **Uninstall**. -- GitLab