Migrate admin push rules alert to Pajamas ViewComponent
requested to merge 325401-migrate-to-pajamas-alertcomponent-viewcomponent-in-ee-app-views-admin-push_rules-_push_rules into master
What does this MR do and why?
Migrate admin push rules alert to Pajamas ViewComponent
Related to #325401 (closed)
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
Snapshot before
<div class="gl-alert gl-alert-danger">
<p>Some error</p>
</div>
Snapshot after
<div class="gl-alert gl-alert-danger gl-alert-not-dismissible" role="alert">
<svg class="s16 gl-alert-icon gl-alert-icon-no-title" data-testid="error-icon"><use href="/assets/icons-f305926186cfc3bb530f27269d545937c385578ba62adb0088d74f0d2d02cb56.svg#error"></use></svg>
<div class="gl-alert-content" role="alert">
<div class="gl-alert-body">
<p>Some error</p>
</div>
</div>
</div>
How to set up and validate locally
To make this work without extensive setup
- You need ultimate license on your local instance
- Go to
http://gdk.test:3000/admin/push_rule
- You may trick the UI to create the following alert
- - if @push_rule.errors.any?
+ - if true
+ - #if @push_rule.errors.any?
.gl-alert.gl-alert-danger
- - @push_rule.errors.full_messages.each do |msg|
+ - #@push_rule.errors.full_messages.each do |msg|
+ - ['Some error'].each do |msg|
Tests
Edited by Alper Akgun