Add latest changes from gitlab-org/gitlab@18-0-stable-ee

This commit is contained in:
GitLab Bot
2025-06-16 13:30:53 +00:00
parent 978b7583ca
commit 121bea116c
2 changed files with 8 additions and 2 deletions

View File

@ -32,6 +32,7 @@ export default {
return {
hasError: false,
blobSearch: {},
loaded: false,
};
},
apollo: {
@ -65,6 +66,7 @@ export default {
},
result({ data }) {
this.hasError = false;
this.loaded = true;
this.blobSearch = data?.blobSearch;
this.$store.commit(RECEIVE_NAVIGATION_COUNT, {
key: 'blobs',
@ -74,6 +76,7 @@ export default {
debounce: 500,
error(error) {
logError(error);
this.loaded = true;
this.hasError = true;
},
},
@ -84,6 +87,9 @@ export default {
return this.query?.page ? parseInt(this.query?.page, 10) : 1;
},
isLoading() {
if (!this.loaded && !this.$apollo?.queries?.blobSearch?.loading) {
return true;
}
return this.$apollo.queries.blobSearch.loading;
},
hasResults() {
@ -98,13 +104,13 @@ export default {
<error-result v-if="hasError" />
<section v-else>
<status-bar v-if="!isLoading" :blob-search="blobSearch" />
<empty-result v-if="!hasResults && !isLoading" />
<zoekt-blob-results
v-if="hasResults || isLoading"
:blob-search="blobSearch"
:has-results="hasResults"
:is-loading="isLoading"
/>
<empty-result v-else />
</section>
</div>
</template>

View File

@ -101,7 +101,7 @@ describe('GlobalSearchResultsApp', () => {
beforeEach(async () => {
createComponent({
initialState: {
query: { scope: 'blobs' },
query: { scope: 'blobs', search: 'foo' },
searchType: 'zoekt',
navigation: MOCK_NAVIGATION_DATA,
},