Skip to content

Make hidden files warning use GlAlert

Miranda Fluharty requested to merge 353429-migrate-hidden-files-warning into master

What does this MR do and why?

For #353429 (closed)

This MR replaces a div.alert.alert-warning with a <gl-alert> in diffs/components/hidden_files_warning.vue

Screenshots or screen recordings

before after
Screen_Shot_2022-03-10_at_14.36.37 Screen_Shot_2022-03-10_at_14.36.03

How to set up and validate locally

  1. git checkout 353429-migrate-hidden-files-warning
  2. open a merge request
  3. change lots of files in your merge request and/or apply this patch to make the alert show up:
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue
index 5707e4d67f9..6fd6ca61b2f 100644
--- a/app/assets/javascripts/diffs/components/app.vue
+++ b/app/assets/javascripts/diffs/components/app.vue
@@ -623,7 +623,7 @@ export default {
 
       <template v-if="!isBatchLoadingError">
         <hidden-files-warning
-          v-if="visibleWarning == $options.alerts.ALERT_OVERFLOW_HIDDEN"
+          v-if="true"
           :visible="numVisibleFiles"
           :total="numTotalFiles"
           :plain-diff-path="plainDiffPath"
  1. navigate to the Changes tab of your merge request

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Miranda Fluharty

Merge request reports

Loading