Skip to content

Commit fae8f7c

Browse files
authored
Merge pull request #1655 from code-corps/fix-modal-css
Fix modal CSS and remove modal-confirm
2 parents a746979 + f97b110 commit fae8f7c

File tree

10 files changed

+35
-231
lines changed

10 files changed

+35
-231
lines changed

app/components/modal-confirm.js

-90
This file was deleted.

app/styles/app.scss

+4-13
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,13 @@
1717
// http://neat.bourbon.io/
1818
@import "neat";
1919

20-
//ember-modal-dialog
21-
//The ember-modal-dialog addon provides components to implement modal dialogs throughout an Ember application using a simple, consistent pattern.
22-
//https://github.com/yapplabs/ember-modal-dialog
20+
// ember-modal-dialog
21+
// The ember-modal-dialog addon provides components to implement modal dialogs
22+
// throughout an Ember application using a simple, consistent pattern.
23+
// https://github.com/yapplabs/ember-modal-dialog
2324
@import "ember-modal-dialog/ember-modal-structure";
2425
@import "ember-modal-dialog/ember-modal-appearance";
2526

26-
.ember-modal-overlay.translucent {
27-
background: rgba(0,0,0, 0.70)
28-
}
29-
30-
.ember-modal-dialog {
31-
border-radius: 4px;
32-
box-shadow: 0 3px 12px rgba(0,0,0,0.15);
33-
}
34-
3527
//
3628
// HELPERS
3729
//
@@ -99,7 +91,6 @@
9991
@import "components/image-drop";
10092
@import "components/loading-bar";
10193
@import "components/loading-spinner";
102-
@import "components/modal-confirm";
10394
@import "components/pager-control";
10495
@import "components/progress-bar";
10596
@import "components/settings-menu";

app/styles/components/conversations/new-conversation-modal.scss

-7
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,5 @@
88
}
99

1010
.new-conversation-modal {
11-
padding: 0 1em;
1211
width: 450px;
13-
14-
h3 {
15-
font-size: $header-font-size-small;
16-
margin: 0.7em;
17-
text-align: center;
18-
}
1912
}

app/styles/components/modal-confirm.scss

-14
This file was deleted.

app/styles/layout/_modals.scss

+20-15
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
.modal {
2-
padding: 0;
3-
width: 400px;
1+
.ember-modal-overlay.translucent {
2+
background: rgba(0,0,0, 0.70)
3+
}
44

5-
h2 {
6-
font-size: 1.2em;
7-
font-weight: 500;
8-
margin: 0;
9-
}
5+
.ember-modal-dialog {
6+
border-radius: 4px;
7+
box-shadow: 0 3px 12px rgba(0,0,0,0.15);
8+
}
9+
10+
.modal {
11+
padding: 0 1em;
1012
}
1113

1214
.modal-close {
@@ -18,24 +20,26 @@
1820
}
1921

2022
.modal__header {
21-
margin-top: 10px;
22-
padding: 10px;
23+
h3 {
24+
font-size: $header-font-size-small;
25+
margin: 0.7em;
26+
text-align: center;
27+
}
2328
}
2429

2530
.modal__warning {
2631
background: $red--light;
2732
border-top: 1px solid $red;
2833
border-bottom: 1px solid $red;
2934
padding: 0 20px;
30-
margin-top: 9px;
31-
margin-bottom: -10px;
35+
margin: 9px -1em -10px -1em;
3236
}
3337

3438
.modal__content {
35-
margin-top: 10px;
36-
padding: 1em;
3739
border-bottom: 1px solid $border-gray;
3840
border-top: 1px solid $border-gray;
41+
margin: 10px -1em 0 -1em;
42+
padding: 1em;
3943

4044
&--no-vertical-padding {
4145
padding-top: 0;
@@ -66,6 +70,7 @@
6670
padding: 1em;
6771

6872
span {
73+
display: flex;
6974
padding-right: 5px;
7075
}
7176

@@ -76,7 +81,7 @@
7681
}
7782

7883
.modal__actions {
79-
padding: 10px;
84+
padding: 10px 0;
8085

8186
p {
8287
margin-top: 0;

app/templates/components/conversations/new-conversation-modal.hbs

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
{{#if showModal}}
66
{{#modal-dialog
7-
containerClassNames="new-conversation-modal"
7+
containerClassNames="modal new-conversation-modal"
88
onClose=(action (pipe (action discardConversation) (action (mut showModal) false)))
99
targetAttachment="center"
1010
translucentOverlay=true
@@ -13,7 +13,9 @@
1313
{{fa-icon "close"}}
1414
</span>
1515

16-
<h3>New Conversation</h3>
16+
<div class="modal__header">
17+
<h3>New Conversation</h3>
18+
</div>
1719

1820
<form data-test-message-form>
1921
<div class="modal__target-user">

app/templates/components/github/repo-disconnect-confirm-modal.hbs

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
targetAttachment="center"
77
translucentOverlay=true
88
}}
9+
<span {{action (mut showModal) false}} class="modal-close">
10+
{{fa-icon "close"}}
11+
</span>
12+
913
<div class="modal__header">
10-
<h2>Stop syncing this repository</h2>
14+
<h3>Stop syncing this repository</h3>
1115
</div>
1216
<div class="modal__warning">
1317
<p>Heads up! This is a potentially destructive action.</p>

app/templates/components/modal-confirm.hbs

-13
This file was deleted.

app/templates/components/project-user-role-modal.hbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{{/tooltip-on-element}}
1313
{{#if showModal}}
1414
{{#modal-dialog
15-
containerClassNames="project-user-role-modal"
15+
containerClassNames="modal project-user-role-modal"
1616
onClose=(action (mut showModal) false)
1717
targetAttachment="center"
1818
translucentOverlay=true
@@ -22,7 +22,7 @@
2222
</span>
2323

2424
<div class="modal__header">
25-
<h2>Change role</h2>
25+
<h3>Change role</h3>
2626
</div>
2727
<div class="modal__content modal__content--no-vertical-padding modal__content--without-top-border">
2828
<div class="modal__target-user">

tests/integration/components/modal-confirm-test.js

-74
This file was deleted.

0 commit comments

Comments
 (0)