diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8e58120dc6f..301695a2ff3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -254,6 +254,10 @@ variables: BUILD_ASSETS_IMAGE: "true" # Set it to "false" to disable assets image building, used in `build-assets-image` SIMPLECOV: "true" + # Temporary variable to enable new CSS compiler + # See: https://gitlab.com/gitlab-org/gitlab/-/issues/438278 + USE_NEW_CSS_PIPELINE: "true" + include: - local: .gitlab/ci/_skip.yml rules: diff --git a/app/assets/javascripts/lib/utils/constants.js b/app/assets/javascripts/lib/utils/constants.js index 77986539403..f2bdb1bb6af 100644 --- a/app/assets/javascripts/lib/utils/constants.js +++ b/app/assets/javascripts/lib/utils/constants.js @@ -10,9 +10,6 @@ export const BV_SHOW_TOOLTIP = 'bv::show::tooltip'; export const BV_DROPDOWN_SHOW = 'bv::dropdown::show'; export const BV_DROPDOWN_HIDE = 'bv::dropdown::hide'; -export const DEFAULT_TH_CLASSES = - 'gl-bg-transparent! gl-border-b-solid! gl-border-b-gray-100! gl-p-5! gl-border-b-1!'; - // We set the drawer's z-index to 252 to clear flash messages that might // be displayed in the page and that have a z-index of 251. export const DRAWER_Z_INDEX = 252; diff --git a/app/assets/javascripts/lib/utils/table_utility.js b/app/assets/javascripts/lib/utils/table_utility.js index 5d3aba9f4ed..f5a814c8fdc 100644 --- a/app/assets/javascripts/lib/utils/table_utility.js +++ b/app/assets/javascripts/lib/utils/table_utility.js @@ -1,14 +1,4 @@ import { convertToSnakeCase, convertToCamelCase } from '~/lib/utils/text_utility'; -import { DEFAULT_TH_CLASSES } from './constants'; - -/** - * Deprecated: use thWidthPercent instead - * Generates the table header classes to be used for GlTable fields. - * - * @param {Number} width - The column width as a percentage. - * @returns {String} The classes to be used in GlTable fields object. - */ -export const thWidthClass = (width) => `gl-w-${width}p ${DEFAULT_TH_CLASSES}`; /** * Generates the table header class for width to be used for GlTable fields. diff --git a/app/assets/javascripts/organizations/show/components/association_count_card.vue b/app/assets/javascripts/organizations/show/components/association_count_card.vue index 0567f43132f..5ea8701cf9b 100644 --- a/app/assets/javascripts/organizations/show/components/association_count_card.vue +++ b/app/assets/javascripts/organizations/show/components/association_count_card.vue @@ -1,6 +1,5 @@ @@ -48,7 +42,7 @@ export default { {{ formattedCount }}{{ count }} diff --git a/app/assets/javascripts/search/sidebar/constants/index.js b/app/assets/javascripts/search/sidebar/constants/index.js index e3b0db670b5..ae77638abdd 100644 --- a/app/assets/javascripts/search/sidebar/constants/index.js +++ b/app/assets/javascripts/search/sidebar/constants/index.js @@ -8,6 +8,8 @@ export const SCOPE_NOTES = 'notes'; export const SCOPE_COMMITS = 'commits'; export const SCOPE_MILESTONES = 'milestones'; export const SCOPE_WIKI_BLOBS = 'wiki_blobs'; +export const SCOPE_EPICS = 'epics'; +export const SCOPE_USERS = 'users'; export const LABEL_DEFAULT_CLASSES = [ 'gl-display-flex', diff --git a/app/assets/javascripts/search/topbar/components/search_type_indicator.vue b/app/assets/javascripts/search/topbar/components/search_type_indicator.vue index 362139bf64d..68049f35347 100644 --- a/app/assets/javascripts/search/topbar/components/search_type_indicator.vue +++ b/app/assets/javascripts/search/topbar/components/search_type_indicator.vue @@ -9,6 +9,8 @@ import { ADVANCED_SEARCH_TYPE, BASIC_SEARCH_TYPE, SEARCH_LEVEL_PROJECT, + SEARCH_LEVEL_GLOBAL, + SEARCH_LEVEL_GROUP, } from '~/search/store/constants'; import { ZOEKT_HELP_PAGE, @@ -17,6 +19,8 @@ import { ZOEKT_HELP_PAGE_SYNTAX_ANCHOR, } from '../constants'; +import { SCOPE_BLOB } from '../../sidebar/constants'; + export default { name: 'SearchTypeIndicator', directives: { @@ -40,7 +44,7 @@ export default { GlLink, }, computed: { - ...mapState(['searchType', 'defaultBranchName', 'query', 'searchLevel']), + ...mapState(['searchType', 'defaultBranchName', 'query', 'searchLevel', 'query']), zoektHelpUrl() { return helpPagePath(ZOEKT_HELP_PAGE); }, @@ -58,17 +62,39 @@ export default { }); }, isZoekt() { - return this.searchType === ZOEKT_SEARCH_TYPE; + return this.searchType === ZOEKT_SEARCH_TYPE && this.query.scope === SCOPE_BLOB; }, isAdvancedSearch() { - return this.searchType === ADVANCED_SEARCH_TYPE; + return ( + this.searchType === ADVANCED_SEARCH_TYPE || + (this.searchType === ZOEKT_SEARCH_TYPE && this.query.scope !== SCOPE_BLOB) + ); }, - isEnabled() { - if (this.searchLevel !== SEARCH_LEVEL_PROJECT) { - return true; + searchTypeTestId() { + if (this.isZoekt) { + return ZOEKT_SEARCH_TYPE; + } + if (this.isAdvancedSearch) { + return ADVANCED_SEARCH_TYPE; } - return !this.query.repository_ref || this.query.repository_ref === this.defaultBranchName; + return BASIC_SEARCH_TYPE; + }, + isEnabled() { + const repoRef = this.query.repository_ref; + switch (this.searchLevel) { + case SEARCH_LEVEL_GLOBAL: + case SEARCH_LEVEL_GROUP: + return true; + case SEARCH_LEVEL_PROJECT: { + if (this.query.scope !== SCOPE_BLOB) { + return true; + } + return !repoRef || repoRef === this.defaultBranchName; + } + default: + return false; + } }, isBasicSearch() { return this.searchType === BASIC_SEARCH_TYPE; @@ -94,14 +120,14 @@ export default {