Browse Source

feat(Dialog): Make dialog close button more mobile friendly.

* Remove pointless custom headers, fall back to ModalHeader instead.
j8
Mihai-Andrei Uscat 4 years ago
parent
commit
4aab5e2054
No account linked to committer's email address

+ 16
- 1
css/_atlaskit_overrides.scss View File

20
  * Override @atlaskit/modal-dialog header styling
20
  * Override @atlaskit/modal-dialog header styling
21
  */
21
  */
22
 .atlaskit-portal [role="dialog"] header {
22
 .atlaskit-portal [role="dialog"] header {
23
+    .jitsi-icon {
24
+        cursor: pointer;
25
+    }
26
+
23
     .jitsi-icon svg {
27
     .jitsi-icon svg {
24
         fill: #B8C7E0;
28
         fill: #B8C7E0;
25
-        cursor: pointer;
26
     }
29
     }
27
 }
30
 }
28
 
31
 
32
+/**
33
+ * Make header close button more easily tappable on mobile.
34
+ */
35
+.mobile-browser .atlaskit-portal [role="dialog"] header .jitsi-icon {
36
+    display: grid;
37
+    place-items: center;
38
+    height: 48px;
39
+    width: 48px;
40
+    background: #2a3a4b;
41
+    border-radius: 3px;
42
+}
43
+
29
 /**
44
 /**
30
  * Override @atlaskit/theme styling for the top toolbar so it displays over
45
  * Override @atlaskit/theme styling for the top toolbar so it displays over
31
  * the video thumbnail while obscuring as little as possible.
46
  * the video thumbnail while obscuring as little as possible.

+ 21
- 2
css/_chat.scss View File

113
     font-size: 24px;
113
     font-size: 24px;
114
     line-height: 32px;
114
     line-height: 32px;
115
 
115
 
116
-    .jitsi-icon > svg {
116
+    .jitsi-icon {
117
         cursor: pointer;
117
         cursor: pointer;
118
+    }
119
+
120
+    .jitsi-icon > svg {
118
         fill: #A4B8D1;
121
         fill: #A4B8D1;
119
     }
122
     }
120
 }
123
 }
387
     &-header {
390
     &-header {
388
         display: flex;
391
         display: flex;
389
         justify-content: space-between;
392
         justify-content: space-between;
393
+        align-items: center;
390
         margin: 16px 16px 24px;
394
         margin: 16px 16px 24px;
391
         width: calc(100% - 32px);
395
         width: calc(100% - 32px);
392
         box-sizing: border-box;
396
         box-sizing: border-box;
395
         font-size: 24px;
399
         font-size: 24px;
396
         line-height: 32px;
400
         line-height: 32px;
397
 
401
 
398
-        .jitsi-icon > svg {
402
+        .jitsi-icon {
399
             cursor: pointer;
403
             cursor: pointer;
404
+        }
405
+
406
+        .jitsi-icon > svg {
400
             fill: #A4B8D1;
407
             fill: #A4B8D1;
401
         }
408
         }
402
     }
409
     }
405
         width: 100%;
412
         width: 100%;
406
     }
413
     }
407
 }
414
 }
415
+
416
+/**
417
+ * Make header close button more easily tappable on mobile.
418
+ */
419
+.mobile-browser .chat-dialog-header .jitsi-icon {
420
+    display: grid;
421
+    place-items: center;
422
+    height: 48px;
423
+    width: 48px;
424
+    background: #2a3a4b;
425
+    border-radius: 3px;
426
+}

+ 0
- 16
css/modals/embed-meeting/_embed-meeting.scss View File

2
     &-dialog {
2
     &-dialog {
3
         display: flex;
3
         display: flex;
4
         flex-direction: column;
4
         flex-direction: column;
5
-
6
-        &-header {
7
-            display: flex;
8
-            justify-content: space-between;
9
-            margin: 16px 16px 24px;
10
-            width: calc(100% - 32px);
11
-            color: #fff;
12
-            font-weight: 600;
13
-            font-size: 24px;
14
-            line-height: 32px;
15
-
16
-            & > div > svg {
17
-                cursor: pointer;
18
-                fill: #A4B8D1;
19
-            }
20
-        }
21
     }
5
     }
22
 
6
 
23
     &-copy {
7
     &-copy {

+ 0
- 16
css/modals/invite/_invite_more.scss View File

47
         font-size: 15px;
47
         font-size: 15px;
48
         line-height: 24px;
48
         line-height: 24px;
49
 
49
 
50
-        &.header {
51
-            display: flex;
52
-            justify-content: space-between;
53
-            margin: 16px 16px 24px;
54
-            width: calc(100% - 32px);
55
-            color: #fff;
56
-            font-weight: 600;
57
-            font-size: 24px;
58
-            line-height: 32px;
59
-
60
-            & > div > svg {
61
-                cursor: pointer;
62
-                fill: #A4B8D1;
63
-            }
64
-        }
65
-
66
         &.separator {
50
         &.separator {
67
             margin: 24px 0 24px -20px;
51
             margin: 24px 0 24px -20px;
68
             padding: 0 20px;
52
             padding: 0 20px;

+ 1
- 3
react/features/embed-meeting/components/EmbedMeetingDialog.js View File

8
 import { Dialog } from '../../base/dialog';
8
 import { Dialog } from '../../base/dialog';
9
 import { translate } from '../../base/i18n';
9
 import { translate } from '../../base/i18n';
10
 
10
 
11
-import Header from './Header';
12
-
13
 type Props = {
11
 type Props = {
14
 
12
 
15
     /**
13
     /**
40
 
38
 
41
     return (
39
     return (
42
         <Dialog
40
         <Dialog
43
-            customHeader = { Header }
44
             hideCancelButton = { true }
41
             hideCancelButton = { true }
45
             submitDisabled = { true }
42
             submitDisabled = { true }
43
+            titleKey = { 'embedMeeting.title' }
46
             width = 'small'>
44
             width = 'small'>
47
             <div className = 'embed-meeting-dialog'>
45
             <div className = 'embed-meeting-dialog'>
48
                 <textarea
46
                 <textarea

+ 0
- 38
react/features/embed-meeting/components/Header.js View File

1
-// @flow
2
-
3
-import React from 'react';
4
-
5
-import { translate } from '../../base/i18n';
6
-import { Icon, IconClose } from '../../base/icons';
7
-
8
-type Props = {
9
-
10
-    /**
11
-     * The {@link ModalDialog} closing function.
12
-     */
13
-    onClose: Function,
14
-
15
-    /**
16
-     * Invoked to obtain translated strings.
17
-     */
18
-    t: Function
19
-};
20
-
21
-/**
22
- * Custom header of the {@code EmbedMeetingDialog}.
23
- *
24
- * @returns {React$Element<any>}
25
- */
26
-function Header({ onClose, t }: Props) {
27
-    return (
28
-        <div
29
-            className = 'embed-meeting-dialog-header'>
30
-            { t('embedMeeting.title') }
31
-            <Icon
32
-                onClick = { onClose }
33
-                src = { IconClose } />
34
-        </div>
35
-    );
36
-}
37
-
38
-export default translate(Header);

+ 0
- 2
react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js View File

18
 
18
 
19
 import CopyMeetingLinkSection from './CopyMeetingLinkSection';
19
 import CopyMeetingLinkSection from './CopyMeetingLinkSection';
20
 import DialInSection from './DialInSection';
20
 import DialInSection from './DialInSection';
21
-import Header from './Header';
22
 import InviteByEmailSection from './InviteByEmailSection';
21
 import InviteByEmailSection from './InviteByEmailSection';
23
 import InviteContactsSection from './InviteContactsSection';
22
 import InviteContactsSection from './InviteContactsSection';
24
 import LiveStreamSection from './LiveStreamSection';
23
 import LiveStreamSection from './LiveStreamSection';
148
     return (
147
     return (
149
         <Dialog
148
         <Dialog
150
             cancelKey = { 'dialog.close' }
149
             cancelKey = { 'dialog.close' }
151
-            customHeader = { Header }
152
             hideCancelButton = { true }
150
             hideCancelButton = { true }
153
             submitDisabled = { true }
151
             submitDisabled = { true }
154
             titleKey = 'addPeople.inviteMorePrompt'
152
             titleKey = 'addPeople.inviteMorePrompt'

+ 0
- 38
react/features/invite/components/add-people-dialog/web/Header.js View File

1
-// @flow
2
-
3
-import React from 'react';
4
-
5
-import { translate } from '../../../../base/i18n';
6
-import { Icon, IconClose } from '../../../../base/icons';
7
-
8
-type Props = {
9
-
10
-    /**
11
-     * The {@link ModalDialog} closing function.
12
-     */
13
-    onClose: Function,
14
-
15
-    /**
16
-     * Invoked to obtain translated strings.
17
-     */
18
-    t: Function
19
-};
20
-
21
-/**
22
- * Custom header of the {@code AddPeopleDialog}.
23
- *
24
- * @returns {React$Element<any>}
25
- */
26
-function Header({ onClose, t }: Props) {
27
-    return (
28
-        <div
29
-            className = 'invite-more-dialog header'>
30
-            { t('addPeople.inviteMorePrompt') }
31
-            <Icon
32
-                onClick = { onClose }
33
-                src = { IconClose } />
34
-        </div>
35
-    );
36
-}
37
-
38
-export default translate(Header);

+ 0
- 38
react/features/security/components/security-dialog/Header.js View File

1
-// @flow
2
-
3
-import React from 'react';
4
-
5
-import { translate } from '../../../base/i18n';
6
-import { Icon, IconClose } from '../../../base/icons';
7
-
8
-type Props = {
9
-
10
-    /**
11
-     * The {@link ModalDialog} closing function.
12
-     */
13
-    onClose: Function,
14
-
15
-    /**
16
-     * Invoked to obtain translated strings.
17
-     */
18
-    t: Function
19
-};
20
-
21
-/**
22
- * Custom header of the {@code SecurityDialog}.
23
- *
24
- * @returns {React$Element<any>}
25
- */
26
-function Header({ onClose, t }: Props) {
27
-    return (
28
-        <div
29
-            className = 'invite-more-dialog header'>
30
-            { t('security.securityOptions') }
31
-            <Icon
32
-                onClick = { onClose }
33
-                src = { IconClose } />
34
-        </div>
35
-    );
36
-}
37
-
38
-export default translate(Header);

+ 0
- 2
react/features/security/components/security-dialog/SecurityDialog.js View File

10
 import { E2EESection } from '../../../e2ee/components';
10
 import { E2EESection } from '../../../e2ee/components';
11
 import { LobbySection } from '../../../lobby';
11
 import { LobbySection } from '../../../lobby';
12
 
12
 
13
-import Header from './Header';
14
 import PasswordSection from './PasswordSection';
13
 import PasswordSection from './PasswordSection';
15
 
14
 
16
 type Props = {
15
 type Props = {
82
 
81
 
83
     return (
82
     return (
84
         <Dialog
83
         <Dialog
85
-            customHeader = { Header }
86
             hideCancelButton = { true }
84
             hideCancelButton = { true }
87
             submitDisabled = { true }
85
             submitDisabled = { true }
88
             titleKey = 'security.securityOptions'
86
             titleKey = 'security.securityOptions'

Loading…
Cancel
Save