diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-14 21:12:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-14 21:12:06 +0300 |
commit | 30b01621d3e9e83f9f2d8a94dba6888eba7e8cc1 (patch) | |
tree | 309eb7898d9d73ab1d1c0cd65e43757a7201edfe /app/assets | |
parent | b119503b7039d1e79b87300a145afdcd1145c2d6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
9 files changed, 52 insertions, 3 deletions
diff --git a/app/assets/javascripts/batch_comments/components/review_bar.vue b/app/assets/javascripts/batch_comments/components/review_bar.vue index 158b5f45d1c..bce13751448 100644 --- a/app/assets/javascripts/batch_comments/components/review_bar.vue +++ b/app/assets/javascripts/batch_comments/components/review_bar.vue @@ -1,5 +1,6 @@ <script> import { mapActions, mapGetters } from 'vuex'; +import { REVIEW_BAR_VISIBLE_CLASS_NAME } from '../constants'; import PreviewDropdown from './preview_dropdown.vue'; import PublishButton from './publish_button.vue'; @@ -18,6 +19,12 @@ export default { } }, }, + mounted() { + document.body.classList.add(REVIEW_BAR_VISIBLE_CLASS_NAME); + }, + beforeDestroy() { + document.body.classList.remove(REVIEW_BAR_VISIBLE_CLASS_NAME); + }, methods: { ...mapActions('batchComments', ['expandAllDiscussions']), }, diff --git a/app/assets/javascripts/batch_comments/constants.js b/app/assets/javascripts/batch_comments/constants.js index b309c339fc8..5e026251e0b 100644 --- a/app/assets/javascripts/batch_comments/constants.js +++ b/app/assets/javascripts/batch_comments/constants.js @@ -1,3 +1,5 @@ export const CHANGES_TAB = 'diffs'; export const DISCUSSION_TAB = 'notes'; export const SHOW_TAB = 'show'; + +export const REVIEW_BAR_VISIBLE_CLASS_NAME = 'review-bar-visible'; diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue index 57162c46002..a2ea42e963c 100644 --- a/app/assets/javascripts/diffs/components/app.vue +++ b/app/assets/javascripts/diffs/components/app.vue @@ -229,7 +229,6 @@ export default { 'isBatchLoading', 'isBatchLoadingError', ]), - ...mapGetters('batchComments', ['draftsCount']), ...mapGetters(['isNotesFetched', 'getNoteableData']), diffs() { if (!this.viewDiffsFileByFile) { @@ -664,7 +663,6 @@ export default { <div v-if="renderFileTree" :style="{ width: `${treeWidth}px` }" - :class="{ 'review-bar-visible': draftsCount > 0 }" class="diff-tree-list js-diff-tree-list px-3 pr-md-0" > <panel-resizer diff --git a/app/assets/javascripts/lib/logger/hello.js b/app/assets/javascripts/lib/logger/hello.js new file mode 100644 index 00000000000..18fa35ab55b --- /dev/null +++ b/app/assets/javascripts/lib/logger/hello.js @@ -0,0 +1,16 @@ +const HANDSHAKE = String.fromCodePoint(0x1f91d); +const MAG = String.fromCodePoint(0x1f50e); + +export const logHello = () => { + // eslint-disable-next-line no-console + console.log( + `%cWelcome to GitLab!%c + +Does this page need fixes or improvements? Open an issue or contribute a merge request to help make GitLab more lovable. At GitLab, everyone can contribute! + +${HANDSHAKE} Contribute to GitLab: https://about.gitlab.com/community/contribute/ +${MAG} Create a new GitLab issue: https://gitlab.com/gitlab-org/gitlab/-/issues/new`, + `padding-top: 0.5em; font-size: 2em;`, + 'padding-bottom: 0.5em;', + ); +}; diff --git a/app/assets/javascripts/lib/logger/hello_deferred.js b/app/assets/javascripts/lib/logger/hello_deferred.js new file mode 100644 index 00000000000..ce1dd91cb37 --- /dev/null +++ b/app/assets/javascripts/lib/logger/hello_deferred.js @@ -0,0 +1,5 @@ +export const logHelloDeferred = async () => { + const { logHello } = await import(/* webpackChunkName: 'hello' */ './hello'); + + logHello(); +}; diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index 15c483485f1..b96a2607552 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -19,6 +19,7 @@ import initAlertHandler from './alert_handler'; import { removeFlashClickListener } from './flash'; import initTodoToggle from './header'; import initLayoutNav from './layout_nav'; +import { logHelloDeferred } from './lib/logger/hello_deferred'; import { handleLocationHash, addSelectOnFocusBehaviour } from './lib/utils/common_utils'; import { localTimeAgo } from './lib/utils/datetime/timeago_utility'; import { getLocationHash, visitUrl } from './lib/utils/url_utility'; @@ -40,6 +41,8 @@ import { initHeaderSearchApp } from '~/header_search'; import 'ee_else_ce/main_ee'; import 'jh_else_ce/main_jh'; +logHelloDeferred(); + applyGitLabUIConfig(); // expose jQuery as global (TODO: remove these) diff --git a/app/assets/javascripts/security_configuration/components/constants.js b/app/assets/javascripts/security_configuration/components/constants.js index ebe0138f046..6a282df99bf 100644 --- a/app/assets/javascripts/security_configuration/components/constants.js +++ b/app/assets/javascripts/security_configuration/components/constants.js @@ -10,6 +10,7 @@ import { REPORT_TYPE_CONTAINER_SCANNING, REPORT_TYPE_CLUSTER_IMAGE_SCANNING, REPORT_TYPE_COVERAGE_FUZZING, + REPORT_TYPE_CORPUS_MANAGEMENT, REPORT_TYPE_API_FUZZING, REPORT_TYPE_LICENSE_COMPLIANCE, } from '~/vue_shared/security_reports/constants'; @@ -104,6 +105,12 @@ export const COVERAGE_FUZZING_CONFIG_HELP_PATH = helpPagePath( { anchor: 'configuration' }, ); +export const CORPUS_MANAGEMENT_NAME = __('Corpus Management'); +export const CORPUS_MANAGEMENT_DESCRIPTION = s__( + 'SecurityConfiguration|Manage corpus files used as mutation sources in coverage fuzzing.', +); +export const CORPUS_MANAGEMENT_CONFIG_TEXT = s__('SecurityConfiguration|Manage corpus'); + export const API_FUZZING_NAME = __('API Fuzzing'); export const API_FUZZING_DESCRIPTION = __('Find bugs in your code with API fuzzing.'); export const API_FUZZING_HELP_PATH = helpPagePath('user/application_security/api_fuzzing/index'); @@ -202,6 +209,14 @@ export const securityFeatures = [ helpPath: COVERAGE_FUZZING_HELP_PATH, configurationHelpPath: COVERAGE_FUZZING_CONFIG_HELP_PATH, type: REPORT_TYPE_COVERAGE_FUZZING, + secondary: gon?.features?.corpusManagement + ? { + type: REPORT_TYPE_CORPUS_MANAGEMENT, + name: CORPUS_MANAGEMENT_NAME, + description: CORPUS_MANAGEMENT_DESCRIPTION, + configurationText: CORPUS_MANAGEMENT_CONFIG_TEXT, + } + : {}, }, ]; diff --git a/app/assets/javascripts/vue_shared/security_reports/constants.js b/app/assets/javascripts/vue_shared/security_reports/constants.js index 4a50dfbd82f..b024e92bd0e 100644 --- a/app/assets/javascripts/vue_shared/security_reports/constants.js +++ b/app/assets/javascripts/vue_shared/security_reports/constants.js @@ -24,6 +24,7 @@ export const REPORT_TYPE_DEPENDENCY_SCANNING = 'dependency_scanning'; export const REPORT_TYPE_CONTAINER_SCANNING = 'container_scanning'; export const REPORT_TYPE_CLUSTER_IMAGE_SCANNING = 'cluster_image_scanning'; export const REPORT_TYPE_COVERAGE_FUZZING = 'coverage_fuzzing'; +export const REPORT_TYPE_CORPUS_MANAGEMENT = 'corpus_management'; export const REPORT_TYPE_LICENSE_COMPLIANCE = 'license_scanning'; export const REPORT_TYPE_API_FUZZING = 'api_fuzzing'; diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss index 4e05775fca6..94912b1c641 100644 --- a/app/assets/stylesheets/pages/issuable.scss +++ b/app/assets/stylesheets/pages/issuable.scss @@ -122,7 +122,9 @@ .right-sidebar { position: fixed; top: $header-height; - bottom: 0; + // Default value for CSS var must contain a unit + // stylelint-disable-next-line length-zero-no-unit + bottom: var(--review-bar-height, 0px); right: 0; transition: width $sidebar-transition-duration; background: $gray-light; |