Skip to content

Commit 6781910

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent b095d90 commit 6781910

File tree

114 files changed

+5892
-662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+5892
-662
lines changed

.eslint_todo/vue-no-unused-properties.mjs

-5
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,6 @@ export default {
482482
'ee/app/assets/javascripts/vue_merge_request_widget/components/widget/app.vue',
483483
'ee/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue',
484484
'ee/app/assets/javascripts/vue_merge_request_widget/widgets/status_checks/index.vue',
485-
'ee/app/assets/javascripts/vue_shared/components/code_flow/code_flow_steps_section.vue',
486-
'ee/app/assets/javascripts/vue_shared/components/code_flow/vulnerability_code_flow.vue',
487-
'ee/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/epic_token.vue',
488-
'ee/app/assets/javascripts/vue_shared/discover/card_security_discover_app.vue',
489-
'ee/app/assets/javascripts/vue_shared/security_reports/components/security_training_promo.vue',
490485
'ee/app/assets/javascripts/vulnerabilities/components/header.vue',
491486
'ee/app/assets/javascripts/vulnerabilities/components/new_vulnerability/section_details.vue',
492487
'ee/app/assets/javascripts/vulnerabilities/components/vulnerability_details.vue',

.gitlab/ci/rails/shared.gitlab-ci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ include:
109109
# in unit tests again.
110110
- rspec_section rspec_parallelized_job "--fail-fast=${RSPEC_FAIL_FAST_THRESHOLD} --tag ~quarantine --tag ~level:background_migration --tag ~click_house"
111111
after_script:
112+
# We need this at the very top, because the section_start/section_end logic is defined there.
112113
- source scripts/utils.sh
114+
- |
115+
section_start "failure-analyzer" "Report failure category"
116+
tooling/lib/tooling/glci/failure_analyzer.rb $CI_JOB_ID || true
117+
section_end "failure-analyzer"
113118
- log_disk_usage # https://gitlab.com/gitlab-org/gitlab/-/issues/478880
114119
- bundle exec gem list gitlab_quality-test_tooling
115120
- |

.gitlab/issue_templates/Feature Flag Roll Out.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Title suggestion: [Feature flag] Enable <feature-flag-name> -->
1+
<!-- Title suggestion: [FF] `<feature-flag-name>` -- <short description> -->
22

33
## Summary
44

@@ -104,7 +104,7 @@ To do so, follow these steps:
104104
- [ ] Close [the feature issue](<feature-issue-link>) to indicate the feature will be released in the current milestone.
105105
- [ ] Set the next milestone to this rollout issue for scheduling [the flag removal](#release-the-feature).
106106
- [ ] (Optional) You can [create a separate issue](https://gitlab.com/gitlab-org/gitlab/-/issues/new?issuable_template=Feature%20Flag%20Cleanup) for scheduling the steps below to [Release the feature](#release-the-feature).
107-
- [ ] Set the title to "[Feature flag] Cleanup `<feature-flag-name>`".
107+
- [ ] Set the title to "[FF] `<feature-flag-name>` - Cleanup".
108108
- [ ] Execute the `/copy_metadata <this-rollout-issue-link>` quick action to copy the labels from this rollout issue.
109109
- [ ] Link this rollout issue as a related issue.
110110
- [ ] Close this rollout issue.

GITALY_SERVER_VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a588d34c7e1cc71a5038efa9745ee637b23bf8c7
1+
d5b6a529fbff95ae2f8479a95ae375abaa497ae1

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ group :test do
602602
gem 'rspec_junit_formatter', feature_category: :shared
603603
gem 'guard-rspec', feature_category: :shared
604604
gem 'axe-core-rspec', '~> 4.10.0', feature_category: :tooling
605+
gem 'state_machines-rspec', '~> 0.6', feature_category: :shared
605606

606607
# Moved in `test` because https://gitlab.com/gitlab-org/gitlab/-/issues/217527
607608
gem 'derailed_benchmarks', require: false, feature_category: :shared

Gemfile.checksum

+1
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,7 @@
712712
{"name":"state_machines","version":"0.5.0","platform":"ruby","checksum":"23e6249d374a920b528dccade403518b4abbd83841a3e2c9ef13e6f1a009b102"},
713713
{"name":"state_machines-activemodel","version":"0.8.0","platform":"ruby","checksum":"e932dab190d4be044fb5f9cab01a3ea0b092c5f113d4676c6c0a0d49bf738d2c"},
714714
{"name":"state_machines-activerecord","version":"0.8.0","platform":"ruby","checksum":"072fb701b8ab03de0608297f6c55dc34ed096e556fa8f77e556f3c461c71aab6"},
715+
{"name":"state_machines-rspec","version":"0.6.0","platform":"ruby","checksum":"2ba57a45df57d0c97f79146e2e0f65f519b52e65e182805ef79cb73b1fe5c0bd"},
715716
{"name":"strings","version":"0.2.1","platform":"ruby","checksum":"933293b3c95cf85b81eb44b3cf673e3087661ba739bbadfeadf442083158d6fb"},
716717
{"name":"strings-ansi","version":"0.2.0","platform":"ruby","checksum":"90262d760ea4a94cc2ae8d58205277a343409c288cbe7c29416b1826bd511c88"},
717718
{"name":"swd","version":"2.0.3","platform":"ruby","checksum":"4cdbe2a4246c19f093fce22e967ec3ebdd4657d37673672e621bf0c7eb770655"},

Gemfile.lock

+5
Original file line numberDiff line numberDiff line change
@@ -1827,6 +1827,10 @@ GEM
18271827
state_machines-activerecord (0.8.0)
18281828
activerecord (>= 5.1)
18291829
state_machines-activemodel (>= 0.8.0)
1830+
state_machines-rspec (0.6.0)
1831+
activesupport
1832+
rspec (~> 3.3)
1833+
state_machines
18301834
strings (0.2.1)
18311835
strings-ansi (~> 0.2)
18321836
unicode-display_width (>= 1.5, < 3.0)
@@ -2337,6 +2341,7 @@ DEPENDENCIES
23372341
ssh_data (~> 1.3)
23382342
stackprof (~> 0.2.26)
23392343
state_machines-activerecord (~> 0.8.0)
2344+
state_machines-rspec (~> 0.6)
23402345
sys-filesystem (~> 1.4.3)
23412346
tanuki_emoji (~> 0.13)
23422347
telesignenterprise (~> 2.2)

Gemfile.next.checksum

+1
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,7 @@
723723
{"name":"state_machines","version":"0.5.0","platform":"ruby","checksum":"23e6249d374a920b528dccade403518b4abbd83841a3e2c9ef13e6f1a009b102"},
724724
{"name":"state_machines-activemodel","version":"0.8.0","platform":"ruby","checksum":"e932dab190d4be044fb5f9cab01a3ea0b092c5f113d4676c6c0a0d49bf738d2c"},
725725
{"name":"state_machines-activerecord","version":"0.8.0","platform":"ruby","checksum":"072fb701b8ab03de0608297f6c55dc34ed096e556fa8f77e556f3c461c71aab6"},
726+
{"name":"state_machines-rspec","version":"0.6.0","platform":"ruby","checksum":"2ba57a45df57d0c97f79146e2e0f65f519b52e65e182805ef79cb73b1fe5c0bd"},
726727
{"name":"stringio","version":"3.1.6","platform":"java","checksum":"dbdb1ee4e6d75782bbc7e8cc7d84cd05e592df50494f363011cc7cd48153bbf7"},
727728
{"name":"stringio","version":"3.1.6","platform":"ruby","checksum":"292c495d1657adfcdf0a32eecf12a60e6691317a500c3112ad3b2e31068274f5"},
728729
{"name":"strings","version":"0.2.1","platform":"ruby","checksum":"933293b3c95cf85b81eb44b3cf673e3087661ba739bbadfeadf442083158d6fb"},

Gemfile.next.lock

+5
Original file line numberDiff line numberDiff line change
@@ -1860,6 +1860,10 @@ GEM
18601860
state_machines-activerecord (0.8.0)
18611861
activerecord (>= 5.1)
18621862
state_machines-activemodel (>= 0.8.0)
1863+
state_machines-rspec (0.6.0)
1864+
activesupport
1865+
rspec (~> 3.3)
1866+
state_machines
18631867
stringio (3.1.6)
18641868
strings (0.2.1)
18651869
strings-ansi (~> 0.2)
@@ -2371,6 +2375,7 @@ DEPENDENCIES
23712375
ssh_data (~> 1.3)
23722376
stackprof (~> 0.2.26)
23732377
state_machines-activerecord (~> 0.8.0)
2378+
state_machines-rspec (~> 0.6)
23742379
sys-filesystem (~> 1.4.3)
23752380
tanuki_emoji (~> 0.13)
23762381
telesignenterprise (~> 2.2)

app/assets/javascripts/ci/runner/components/runner_delete_button.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default {
7272
<gl-button
7373
v-gl-tooltip="loading ? '' : tooltip"
7474
:aria-label="ariaLabel"
75-
:icon="icon"
75+
:icon="loading ? '' : icon"
7676
:class="buttonClass"
7777
:loading="loading"
7878
variant="danger"

app/assets/javascripts/diffs/components/diffs_file_tree.vue

+31-21
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import PanelResizer from '~/vue_shared/components/panel_resizer.vue';
55
import { getCookie, setCookie } from '~/lib/utils/common_utils';
66
import * as types from '~/diffs/store/mutation_types';
77
import { useLegacyDiffs } from '~/diffs/stores/legacy_diffs';
8+
import FileBrowserHeight from '~/diffs/components/file_browser_height.vue';
89
import {
910
INITIAL_TREE_WIDTH,
1011
MIN_TREE_WIDTH,
@@ -15,7 +16,7 @@ import TreeList from './tree_list.vue';
1516
1617
export default {
1718
name: 'DiffsFileTree',
18-
components: { TreeList, PanelResizer },
19+
components: { FileBrowserHeight, TreeList, PanelResizer },
1920
minTreeWidth: MIN_TREE_WIDTH,
2021
maxTreeWidth: window.innerWidth / 2,
2122
props: {
@@ -36,18 +37,13 @@ export default {
3637
},
3738
},
3839
data() {
39-
const treeWidth =
40-
parseInt(
41-
getCookie(TREE_LIST_WIDTH_STORAGE_KEY) || localStorage.getItem(TREE_LIST_WIDTH_STORAGE_KEY),
42-
10,
43-
) || INITIAL_TREE_WIDTH;
44-
4540
return {
46-
treeWidth,
47-
newWidth: null,
48-
cachedHeight: null,
49-
cachedTop: null,
41+
treeWidth: INITIAL_TREE_WIDTH,
42+
rowHeight: 0,
5043
floating: false,
44+
newWidth: 0,
45+
cachedHeight: 0,
46+
cachedTop: 0,
5147
};
5248
},
5349
computed: {
@@ -57,10 +53,12 @@ export default {
5753
applyNewWidthDebounced() {
5854
return debounce(this.applyNewWidth, 250);
5955
},
60-
rootStyle() {
56+
floatingWrapperStyles() {
57+
if (!this.floating) return undefined;
6158
return {
62-
width: `${this.treeWidth}px`,
63-
height: this.cachedHeight ? `${this.cachedHeight}px` : undefined,
59+
height: `${this.cachedHeight}px`,
60+
width: `${this.newWidth}px`,
61+
top: `${this.cachedTop}px`,
6462
};
6563
},
6664
},
@@ -69,10 +67,23 @@ export default {
6967
this.applyNewWidthDebounced();
7068
},
7169
},
70+
created() {
71+
this.restoreTreeWidthUserPreference();
72+
},
73+
mounted() {
74+
const computedStyles = getComputedStyle(this.$refs.root.$el);
75+
this.rowHeight = parseInt(computedStyles.getPropertyValue('--file-row-height'), 10);
76+
},
7277
methods: {
7378
...mapActions(useLegacyDiffs, {
7479
setCurrentDiffFile: types.SET_CURRENT_DIFF_FILE,
7580
}),
81+
restoreTreeWidthUserPreference() {
82+
const userPreference =
83+
getCookie(TREE_LIST_WIDTH_STORAGE_KEY) || localStorage.getItem(TREE_LIST_WIDTH_STORAGE_KEY);
84+
if (!userPreference) return;
85+
this.treeWidth = parseInt(userPreference, 10);
86+
},
7687
onFileClick(file) {
7788
this.setCurrentDiffFile(file.fileHash);
7889
this.$emit('clickFile', file);
@@ -111,19 +122,17 @@ export default {
111122
</script>
112123

113124
<template>
114-
<div
125+
<file-browser-height
126+
ref="root"
115127
data-testid="file-browser-tree"
116-
:style="rootStyle"
128+
:style="{ width: `${treeWidth}px` }"
117129
class="rd-app-sidebar diff-tree-list"
118130
:class="{ 'diff-tree-list-floating': floating }"
119131
>
120132
<div
121133
data-testid="file-browser-floating-wrapper"
122134
class="diff-tree-list-floating-wrapper"
123-
:style="{
124-
width: newWidth ? `${newWidth}px` : undefined,
125-
top: cachedTop ? `${cachedTop}px` : undefined,
126-
}"
135+
:style="floatingWrapperStyles"
127136
>
128137
<panel-resizer
129138
class="diff-tree-list-resizer"
@@ -139,8 +148,9 @@ export default {
139148
:hide-file-stats="hideFileStats"
140149
:loaded-files="loadedFiles"
141150
:total-files-count="totalFilesCount"
151+
:row-height="rowHeight"
142152
@clickFile="onFileClick"
143153
/>
144154
</div>
145-
</div>
155+
</file-browser-height>
146156
</template>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<script>
2+
import { mapState } from 'pinia';
3+
import StickyViewportFillerHeight from '~/diffs/components/sticky_viewport_filler_height.vue';
4+
import { useBatchComments } from '~/batch_comments/store';
5+
import { observeElementOnce } from '~/lib/utils/dom_utils';
6+
7+
export default {
8+
name: 'FileBrowserHeight',
9+
components: { StickyViewportFillerHeight },
10+
data() {
11+
return {
12+
minHeight: 0,
13+
bottomPadding: 0,
14+
stickyTopOffset: 0,
15+
reviewBarCachedHeight: 0,
16+
mediaQueryMatch: null,
17+
isNarrowScreen: false,
18+
};
19+
},
20+
computed: {
21+
...mapState(useBatchComments, ['reviewBarRendered', 'draftsCount']),
22+
reviewBarEnabled() {
23+
return this.draftsCount > 0;
24+
},
25+
stickyBottomOffset() {
26+
return this.reviewBarEnabled
27+
? this.bottomPadding + this.reviewBarCachedHeight
28+
: this.bottomPadding;
29+
},
30+
},
31+
watch: {
32+
reviewBarRendered: {
33+
handler(rendered) {
34+
if (!rendered || this.reviewBarCachedHeight) return;
35+
observeElementOnce(document.querySelector('.js-review-bar'), ([bar]) => {
36+
this.reviewBarCachedHeight = bar.boundingClientRect.height;
37+
});
38+
},
39+
immediate: true,
40+
},
41+
},
42+
mounted() {
43+
const styles = getComputedStyle(this.$el);
44+
const largeBreakpointSize = parseInt(styles.getPropertyValue('--breakpoint-lg'), 10);
45+
this.stickyTopOffset = parseInt(styles.getPropertyValue('top'), 10);
46+
this.minHeight = parseInt(styles.getPropertyValue('--file-tree-min-height'), 10);
47+
this.bottomPadding = parseInt(styles.getPropertyValue('--file-tree-bottom-padding'), 10);
48+
this.mediaQueryMatch = window.matchMedia(`(max-width: ${largeBreakpointSize - 1}px)`);
49+
this.handleMediaMatch(this.mediaQueryMatch);
50+
this.mediaQueryMatch.addEventListener('change', this.handleMediaMatch);
51+
},
52+
beforeDestroy() {
53+
this.mediaQueryMatch.removeEventListener('change', this.handleMediaMatch);
54+
this.mediaQueryMatch = null;
55+
},
56+
methods: {
57+
handleMediaMatch({ matches }) {
58+
this.isNarrowScreen = matches;
59+
},
60+
},
61+
};
62+
</script>
63+
64+
<template>
65+
<sticky-viewport-filler-height
66+
v-if="!isNarrowScreen"
67+
ref="root"
68+
:min-height="minHeight"
69+
:sticky-top-offset="stickyTopOffset"
70+
:sticky-bottom-offset="stickyBottomOffset"
71+
>
72+
<slot></slot>
73+
</sticky-viewport-filler-height>
74+
<div v-else>
75+
<slot></slot>
76+
</div>
77+
</template>

0 commit comments

Comments
 (0)