Skip to content

Commit 46ea226

Browse files
committed
Styling changes
- make ability to click items during facilitation more obvious - do not blur popup background until end of animation (performance) - increase size of invite QR code as much as possible
1 parent 5e4efad commit 46ea226

File tree

5 files changed

+42
-14
lines changed

5 files changed

+42
-14
lines changed

src/frontend/src/components/common/Popup.less

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
bottom: 0;
77
background: rgba(128, 128, 128, 0.5);
88
z-index: 10;
9-
backdrop-filter: blur(2px);
109

11-
animation: 0.2s ease popup-fade-in;
10+
animation: 0.2s ease popup-fade-in, 0.05s 0.2s step-end forwards popup-blur-background;
1211

1312
.popup-content {
1413
position: absolute;
@@ -34,18 +33,31 @@
3433
font-size: 1.5em;
3534
text-align: center;
3635
margin-bottom: 16px;
36+
37+
&.hidden {
38+
/* still visible to screen readers due to aria-labelledby */
39+
display: none;
40+
}
3741
}
3842
}
3943
}
4044

4145
@keyframes popup-fade-in {
4246
from {
4347
opacity: 0;
44-
backdrop-filter: none;
4548
}
4649

4750
to {
4851
opacity: 1;
52+
}
53+
}
54+
55+
@keyframes popup-blur-background {
56+
from {
57+
backdrop-filter: none;
58+
}
59+
60+
to {
4961
backdrop-filter: blur(2px);
5062
}
5163
}

src/frontend/src/components/common/Popup.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ import useParameterlessCallback from '../../hooks/useParameterlessCallback';
44
import useListener from '../../hooks/useListener';
55
import './Popup.less';
66

7+
export interface PopupData {
8+
title: string;
9+
hideTitle?: boolean;
10+
content: React.ReactNode;
11+
keys?: Record<string, () => void>;
12+
}
13+
714
interface PropsT {
8-
data: null | {
9-
title: string;
10-
content: React.ReactNode;
11-
keys?: Record<string, () => void>;
12-
};
15+
data: PopupData | null;
1316
onClose?: () => void;
1417
}
1518

@@ -66,7 +69,7 @@ export default ({
6669
contentRef={setModal}
6770
aria={{ labelledby: 'modal-heading' }}
6871
>
69-
<h1 id="modal-heading">{ data.title }</h1>
72+
<h1 id="modal-heading" className={data.hideTitle ? 'hidden' : ''}>{ data.title }</h1>
7073
{ data.content }
7174
</Modal>
7275
);

src/frontend/src/components/retro-formats/mood/categories/MoodItem.less

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,16 @@
171171

172172
.has-focused .mood-item:not(.focused):not(.editing):not(.done) {
173173
opacity: 0.7;
174+
transition: transform 0.1s ease, box-shadow 0.1s ease;
175+
176+
.message:not(:disabled) {
177+
cursor: pointer;
178+
}
179+
}
180+
181+
.multi-column.has-focused .mood-item:not(.focused):not(.editing):not(.done):hover {
182+
transform: translate(0, -1px);
183+
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
174184
}
175185

176186
.archive .mood-item.done {

src/frontend/src/components/retro/InvitePopup.less

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@
1818

1919
.qr-code {
2020
display: block;
21-
width: 350px;
22-
max-width: ~"calc(min(100%, 50vh))";
21+
width: ~"calc(80vh - 52px - 3.2em)";
22+
min-width: 350px;
23+
max-width: ~"calc(100vw - 96px)";
2324
margin: 0 auto;
2425
}
2526

2627
.dialog-options {
28+
margin-top: 0;
2729
text-align: center;
2830
}
2931

src/frontend/src/components/retro/RetroPage.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import type { Retro } from 'refacto-entities';
88
import type { RetroPagePropsT } from '../RetroRouter';
99
import ArchivePopup from './ArchivePopup';
1010
import Header from '../common/Header';
11-
import Popup from '../common/Popup';
11+
import Popup, { PopupData } from '../common/Popup';
1212
import useBoundCallback from '../../hooks/useBoundCallback';
1313
import useWindowSize from '../../hooks/env/useWindowSize';
1414
import { clearCovered } from '../../actions/retro';
@@ -76,7 +76,7 @@ export default memo(({
7676
(OPTIONS.enableMobileFacilitation.read(retro.options))
7777
);
7878

79-
let archivePopup = null;
79+
let archivePopup: PopupData | null = null;
8080
if (retroDispatch && archivePopupVisible) {
8181
archivePopup = {
8282
title: 'Create Archive',
@@ -93,10 +93,11 @@ export default memo(({
9393
};
9494
}
9595

96-
let invitePopup = null;
96+
let invitePopup: PopupData | null = null;
9797
if (invitePopupVisible) {
9898
invitePopup = {
9999
title: 'Invite',
100+
hideTitle: true,
100101
content: (<InvitePopup onClose={hideInvitePopup} />),
101102
keys: {
102103
Enter: hideInvitePopup,

0 commit comments

Comments
 (0)