Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1ce06f62
Commit
1ce06f62
authored
4 years ago
by
Alex Buijs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don’t show close icon on flash warning
parent
1eee0c41
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
2 deletions
+38
-2
app/views/layouts/_flash.html.haml
app/views/layouts/_flash.html.haml
+3
-2
changelogs/unreleased/remove-close-button-from-flash-warning.yml
...ogs/unreleased/remove-close-button-from-flash-warning.yml
+5
-0
spec/views/layouts/_flash.html.haml_spec.rb
spec/views/layouts/_flash.html.haml_spec.rb
+30
-0
No files found.
app/views/layouts/_flash.html.haml
View file @
1ce06f62
...
@@ -8,5 +8,6 @@
...
@@ -8,5 +8,6 @@
%div
{
class:
"flash-#{key} mb-2"
}
%div
{
class:
"flash-#{key} mb-2"
}
=
sprite_icon
(
icons
[
key
],
size:
16
,
css_class:
'align-middle mr-1'
)
unless
icons
[
key
].
nil?
=
sprite_icon
(
icons
[
key
],
size:
16
,
css_class:
'align-middle mr-1'
)
unless
icons
[
key
].
nil?
%span
=
value
%span
=
value
%div
{
class:
"close-icon-wrapper js-close-icon"
}
-
if
%w(alert notice success)
.
include?
(
key
)
=
sprite_icon
(
'close'
,
size:
16
,
css_class:
'close-icon'
)
%div
{
class:
"close-icon-wrapper js-close-icon"
}
=
sprite_icon
(
'close'
,
size:
16
,
css_class:
'close-icon'
)
This diff is collapsed.
Click to expand it.
changelogs/unreleased/remove-close-button-from-flash-warning.yml
0 → 100644
View file @
1ce06f62
---
title
:
Don’t show close icon on flash warning
merge_request
:
36581
author
:
type
:
fixed
This diff is collapsed.
Click to expand it.
spec/views/layouts/_flash.html.haml_spec.rb
0 → 100644
View file @
1ce06f62
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'layouts/_flash'
do
before
do
allow
(
view
).
to
receive
(
:flash
).
and_return
(
flash
)
render
end
describe
'closable flash messages'
do
%w(alert notice success)
.
each
do
|
flash_type
|
let
(
:flash
)
{
{
flash_type
=>
'This is a closable flash message'
}
}
it
'shows a close button'
do
expect
(
rendered
).
to
include
(
'js-close-icon'
)
end
end
end
describe
'non closable flash messages'
do
%w(error message toast warning)
.
each
do
|
flash_type
|
let
(
:flash
)
{
{
flash_type
=>
'This is a non closable flash message'
}
}
it
'shows a close button'
do
expect
(
rendered
).
not_to
include
(
'js-close-icon'
)
end
end
end
end
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment