Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2024-06-18 06:18:12 +00:00
parent ea30868058
commit 47c3acc07e
14 changed files with 14 additions and 157 deletions

View File

@ -1,5 +0,0 @@
---
Cop/ExperimentsTestCoverage:
Exclude:
- 'app/controllers/groups/boards_controller.rb'
- 'app/controllers/projects/boards_controller.rb'

View File

@ -1,5 +1,6 @@
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import Translate from '~/vue_shared/translate';
import createDefaultClient from '~/lib/graphql';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
import csrf from '~/lib/utils/csrf';
@ -8,6 +9,7 @@ import AdminUsersFilterApp from './components/admin_users_filter_app.vue';
import DeleteUserModal from './components/modals/delete_user_modal.vue';
import UserActions from './components/user_actions.vue';
Vue.use(Translate);
Vue.use(VueApollo);
const apolloProvider = new VueApollo({

View File

@ -5,7 +5,6 @@ import IssueBoardFilteredSearch from 'ee_else_ce/boards/components/issue_board_f
import { getBoardQuery } from 'ee_else_ce/boards/boards_util';
import { setError } from '../graphql/cache_updates';
import ConfigToggle from './config_toggle.vue';
import NewBoardButton from './new_board_button.vue';
import ToggleFocus from './toggle_focus.vue';
import BoardOptions from './board_options.vue';
@ -15,7 +14,6 @@ export default {
BoardsSelector,
IssueBoardFilteredSearch,
ConfigToggle,
NewBoardButton,
ToggleFocus,
EpicBoardFilteredSearch: () =>
import('ee_component/boards/components/epic_filtered_search.vue'),
@ -105,7 +103,6 @@ export default {
@updateBoard="$emit('updateBoard', $event)"
@showBoardModal="setCurrentForm"
/>
<new-board-button @showBoardModal="setCurrentForm" />
<div class="gl-flex md:!gl-hidden gl-gap-2 gl-align-items-center">
<board-options
:show-epic-lane-option="swimlanesFeatureAvailable && isSignedIn"

View File

@ -1,49 +0,0 @@
<script>
import { GlButton, GlModalDirective } from '@gitlab/ui';
import { formType } from '~/boards/constants';
import { s__ } from '~/locale';
import Tracking from '~/tracking';
import GitlabExperiment from '~/experimentation/components/gitlab_experiment.vue';
export default {
components: {
GlButton,
GitlabExperiment,
},
directives: {
GlModalDirective,
},
mixins: [Tracking.mixin()],
inject: ['multipleIssueBoardsAvailable', 'canAdminBoard'],
computed: {
canShowCreateButton() {
return this.canAdminBoard && this.multipleIssueBoardsAvailable;
},
createButtonText() {
return s__('Boards|New board');
},
},
methods: {
showDialog() {
this.track('click_button', { label: 'create_board' });
this.$emit('showBoardModal', formType.new);
},
},
};
</script>
<template>
<gitlab-experiment name="prominent_create_board_btn">
<template #control> </template>
<template #candidate>
<div
v-if="canShowCreateButton"
class="gl-ml-1 gl-mr-3 gl-display-flex gl-align-items-flex-start"
>
<gl-button @click.prevent="showDialog">
{{ createButtonText }}
</gl-button>
</div>
</template>
</gitlab-experiment>
</template>

View File

@ -8,10 +8,6 @@ class Groups::BoardsController < Groups::ApplicationController
before_action do
push_frontend_feature_flag(:board_multi_select, group)
push_frontend_feature_flag(:display_work_item_epic_issue_sidebar, group)
experiment(:prominent_create_board_btn, subject: current_user) do |e|
e.control {}
e.candidate {}
end.run
end
feature_category :team_planning

View File

@ -8,10 +8,6 @@ class Projects::BoardsController < Projects::ApplicationController
before_action do
push_frontend_feature_flag(:board_multi_select, project)
push_frontend_feature_flag(:display_work_item_epic_issue_sidebar, project)
experiment(:prominent_create_board_btn, subject: current_user) do |e|
e.control {}
e.candidate {}
end.run
end
feature_category :team_planning

View File

@ -1,8 +0,0 @@
---
name: prominent_create_board_btn
introduced_by_url: "https://gitlab.com/gitlab-org/gitlab/-/merge_requests/72683"
rollout_issue_url: "https://gitlab.com/gitlab-org/gitlab/-/issues/343415"
milestone: "14.5"
type: experiment
group: group::product planning
default_enabled: false

View File

@ -361,7 +361,7 @@ With this configuration, GitLab adds **artifact 1** as a link to `file.txt` to t
## Keep artifacts from most recent successful jobs
> - Artifacts for [blocked](https://gitlab.com/gitlab-org/gitlab/-/issues/387087) or [failed](https://gitlab.com/gitlab-org/gitlab/-/issues/266958) pipelines no longer kept indefinitely in GitLab 16.7.
> - Artifacts for [blocked](https://gitlab.com/gitlab-org/gitlab/-/issues/387087) or [failed](https://gitlab.com/gitlab-org/gitlab/-/issues/266958) pipelines changed to no longer be kept indefinitely in GitLab 16.7.
By default artifacts are always kept for successful pipelines for the most recent commit on each ref.
Any [`expire_in`](#with-an-expiry) configuration does not apply to the most recent artifacts.

View File

@ -9024,9 +9024,6 @@ msgstr ""
msgid "Boards|Move to start of list"
msgstr ""
msgid "Boards|New board"
msgstr ""
msgid "Boards|No cadence matches current iteration filter"
msgstr ""

View File

@ -50,15 +50,17 @@ RSpec.describe 'Admin::Users', feature_category: :user_management do
expect(page).to have_content('Password')
end
it 'shows the user popover on hover', :js, quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/444684' do
it 'shows the user popover on hover', :js do
expect(has_testid?('user-popover', count: 0)).to eq(true)
find_link(user.email).hover
within('body.page-initialised') do
find_link(user.email).hover
within_testid('user-popover') do
expect(page).to have_content user.name
expect(page).to have_content user.username
expect(page).to have_button 'Follow'
within_testid('user-popover') do
expect(page).to have_content user.name
expect(page).to have_content user.username
expect(page).to have_button 'Follow'
end
end
end

View File

@ -9,7 +9,6 @@ import BoardTopBar from '~/boards/components/board_top_bar.vue';
import BoardsSelector from '~/boards/components/boards_selector.vue';
import ConfigToggle from '~/boards/components/config_toggle.vue';
import IssueBoardFilteredSearch from '~/boards/components/issue_board_filtered_search.vue';
import NewBoardButton from '~/boards/components/new_board_button.vue';
import ToggleFocus from '~/boards/components/toggle_focus.vue';
import * as cacheUpdates from '~/boards/graphql/cache_updates';
import { WORKSPACE_GROUP, WORKSPACE_PROJECT } from '~/issues/constants';
@ -85,10 +84,6 @@ describe('BoardTopBar', () => {
expect(wrapper.findComponent(IssueBoardFilteredSearch).exists()).toBe(true);
});
it('renders NewBoardButton component', () => {
expect(wrapper.findComponent(NewBoardButton).exists()).toBe(true);
});
it('renders ConfigToggle component', () => {
expect(wrapper.findComponent(ConfigToggle).exists()).toBe(true);
});

View File

@ -1,66 +0,0 @@
import { mount } from '@vue/test-utils';
import { GlButton } from '@gitlab/ui';
import NewBoardButton from '~/boards/components/new_board_button.vue';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import { stubExperiments } from 'helpers/experimentation_helper';
const FEATURE = 'prominent_create_board_btn';
describe('NewBoardButton', () => {
let wrapper;
const createComponent = (args = {}) =>
extendedWrapper(
mount(NewBoardButton, {
provide: {
canAdminBoard: true,
multipleIssueBoardsAvailable: true,
...args,
},
}),
);
describe('control variant', () => {
beforeAll(() => {
stubExperiments({ [FEATURE]: 'control' });
});
it('renders nothing', () => {
wrapper = createComponent();
expect(wrapper.text()).toBe('');
});
});
describe('candidate variant', () => {
beforeAll(() => {
stubExperiments({ [FEATURE]: 'candidate' });
});
it('renders New board button when `candidate` variant', () => {
wrapper = createComponent();
expect(wrapper.text()).toBe('New board');
});
it('renders nothing when `canAdminBoard` is `false`', () => {
wrapper = createComponent({ canAdminBoard: false });
expect(wrapper.findComponent(GlButton).exists()).toBe(false);
});
it('renders nothing when `multipleIssueBoardsAvailable` is `false`', () => {
wrapper = createComponent({ multipleIssueBoardsAvailable: false });
expect(wrapper.findComponent(GlButton).exists()).toBe(false);
});
it('emits `showBoardModal` when button is clicked', () => {
wrapper = createComponent();
wrapper.findComponent(GlButton).vm.$emit('click', { preventDefault: () => {} });
expect(wrapper.emitted('showBoardModal')).toEqual([['new']]);
});
});
});

View File

@ -30,7 +30,7 @@ require (
golang.org/x/image v0.17.0
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/net v0.25.0
golang.org/x/oauth2 v0.20.0
golang.org/x/oauth2 v0.21.0
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d
google.golang.org/grpc v1.64.0
google.golang.org/protobuf v1.34.2

View File

@ -640,8 +640,8 @@ golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo=
golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs=
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/sync v0.0.0-20170517211232-f52d1811a629/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=