Skip to content
This repository was archived by the owner on Feb 10, 2022. It is now read-only.

Commit 25f764a

Browse files
authored
Merge pull request #12 from sendbird/feature/calls-1289
[CALLS-1289] Sample design QA
2 parents 280155e + d6e2bec commit 25f764a

File tree

5 files changed

+47
-22
lines changed

5 files changed

+47
-22
lines changed

lib/components/Header.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export default class Header extends BaseElement {
4444

4545
const headerInfo = createDiv({ className: `${classes['headerInfo']}` });
4646
const nickname = createDiv({
47-
className: `${classes['headerNickname']} ${classes['fontMidBig']} ${classes['fontDemi']}`,
47+
className: (this.args.isWidget)
48+
? `${classes['headerNickname']} ${classes['fontMidBig']} ${classes['fontDemi']}`
49+
: `${classes['headerNickname']} ${classes['fontNormal']} ${classes['fontDemi']}`,
4850
innerText: this.args.user.nickname || '—'
4951
});
5052
const userId = createDiv({
@@ -66,7 +68,8 @@ export default class Header extends BaseElement {
6668
element: userDiv,
6769
items: [
6870
{
69-
element: userDetail
71+
element: userDetail,
72+
disabled: true,
7073
},
7174
{
7275
label: 'Sign out',

lib/components/Menu.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ export default class Menu extends BaseElement {
2323
this.menuItemsDiv = createDiv({ className: `${classes['menuItemsDiv']} ${classes['hidden']}` });
2424

2525
this.items.forEach((item, idx) => {
26-
const { label, element, callback } = item;
26+
const { label, element, disabled, callback } = item;
2727
const labelElem = element || createLabel({
2828
className: `${classes['fontNormal']} ${classes['fontHeavy']}`,
2929
innerText: label
3030
});
31-
const itemElem = createButton({ className: `${classes['btn']} ${classes['menuItem']}` });
31+
const itemElem = createButton({
32+
className: `${classes['btn']} ${disabled ? classes['disabledMenuItem'] : classes['menuItem']}`
33+
});
3234

3335
if (callback) {
3436
itemElem.onclick = () => {

lib/css/styles.js

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ const styles = {
171171
},
172172

173173
avatar: {
174+
flexShrink: '0',
174175
width: '32px',
175176
height: '32px',
176177
borderRadius: '50%',
@@ -1142,19 +1143,24 @@ const styles = {
11421143

11431144
headerUserId: {
11441145
display: 'none',
1145-
wordBreak: 'break-all',
1146+
whiteSpace: 'nowrap',
11461147
color: colors.purple50
11471148
},
11481149

11491150
headerNickname: {
1150-
wordBreak: 'break-all',
1151+
whiteSpace: 'nowrap',
11511152
color: colors.white
11521153
},
11531154

11541155
userDetail: {
11551156
display: 'flex',
11561157
flexDirection: 'row',
11571158
'& $profileSmall': {
1159+
width: '32px',
1160+
height: '32px',
1161+
marginLeft: '0px'
1162+
},
1163+
'& $avatar': {
11581164
marginLeft: '0px'
11591165
},
11601166
'& $headerNickname': {
@@ -1174,11 +1180,11 @@ const styles = {
11741180
paddingBottom: '8px',
11751181
paddingLeft: '0px',
11761182
paddingRight: '0px',
1177-
width: '200px',
1183+
minWidth: '248px',
11781184
borderRadius: '4px',
11791185
boxShadow: '0 3px 5px -3px rgba(33, 34, 66, 0.04), 0 3px 14px 2px rgba(33, 34, 66, 0.08), 0 8px 10px 1px rgba(33, 34, 66, 0.12)',
11801186
backgroundColor: colors.white,
1181-
zIndex: '1'
1187+
zIndex: '1',
11821188
},
11831189

11841190
menuItem: {
@@ -1197,6 +1203,20 @@ const styles = {
11971203
}
11981204
},
11991205

1206+
disabledMenuItem: {
1207+
display: 'block',
1208+
boxSizing: 'border-box',
1209+
cursor: 'default',
1210+
paddingTop: '0px',
1211+
paddingBottom: '0px',
1212+
paddingLeft: '16px',
1213+
paddingRight: '16px',
1214+
width: '100%',
1215+
height: 'auto',
1216+
minHeight: '32px',
1217+
textAlign: 'left',
1218+
},
1219+
12001220
menuDivider: {
12011221
width: '100%',
12021222
height: '1px',
@@ -1349,8 +1369,7 @@ const styles = {
13491369
width: '100%',
13501370
minHeight: '88px',
13511371
height: 'auto',
1352-
borderTop: 'solid 1px #dee2f2',
1353-
paddingBottom: '5px',
1372+
borderBottom: 'solid 1px #dee2f2',
13541373
},
13551374

13561375
callLogEmptyWrap: {
@@ -1387,7 +1406,7 @@ const styles = {
13871406

13881407
callLogProfileDiv: {
13891408
display: 'inline-flex',
1390-
width: '40px',
1409+
width: '32px',
13911410
height: '100%'
13921411
},
13931412

@@ -1412,15 +1431,15 @@ const styles = {
14121431
display: 'block',
14131432
width: '20px',
14141433
height: '20px',
1415-
marginLeft: '18px',
1416-
marginTop: '26px',
1434+
marginLeft: '16px',
1435+
marginTop: '24px',
14171436
},
14181437

14191438
callLogProfileImg: {
14201439
display: 'block',
1421-
width: '40px',
1422-
height: '40px',
1423-
marginTop: '16px',
1440+
width: '32px',
1441+
height: '32px',
1442+
marginTop: '18px',
14241443
borderRadius: '50%'
14251444
},
14261445

@@ -1439,14 +1458,15 @@ const styles = {
14391458
height: 'auto',
14401459
marginLeft: '12px',
14411460
wordBreak: 'break-all',
1461+
color: colors.navy600,
14421462
},
14431463

14441464
callLogEndInfo: {
14451465
display: 'inline-flex',
14461466
width: '100%',
14471467
height: '16px',
14481468
marginLeft: '12px',
1449-
marginTop: '4px',
1469+
marginTop: '8px',
14501470
color: colors.navy600
14511471
},
14521472

@@ -1455,7 +1475,7 @@ const styles = {
14551475
width: '120px',
14561476
height: '16px',
14571477
textAlign: 'right',
1458-
marginTop: '16px',
1478+
marginTop: '18px',
14591479
marginRight: '16px',
14601480
color: colors.navy600
14611481
},
@@ -1476,7 +1496,7 @@ const styles = {
14761496
backgroundPosition: 'center',
14771497
backgroundRepeat: 'no-repeat',
14781498
marginRight: '12px',
1479-
marginTop: '12px',
1499+
marginTop: '8px',
14801500
backgroundColor: colors.navy80,
14811501
cursor: 'pointer'
14821502
},
@@ -1488,7 +1508,7 @@ const styles = {
14881508
backgroundImage: `url(${thumbnailVoice})`,
14891509
backgroundPosition: 'center',
14901510
backgroundRepeat: 'no-repeat',
1491-
marginTop: '12px',
1511+
marginTop: '8px',
14921512
marginRight: '16px',
14931513
backgroundColor: colors.navy80,
14941514
cursor: 'pointer'

lib/views/CallLogItem.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class CallLogItem {
8383
innerText: displayName
8484
});
8585
const displayIdLabel = createLabel({
86-
className: `${classes['callLogDisplayId']} ${classes['fontNormal']} ${classes['fontHeavy']}`,
86+
className: `${classes['callLogDisplayId']} ${classes['fontSmall']}`,
8787
innerText: `User ID: ${displayId}`
8888
});
8989
const callEndInfo = createLabel({

lib/views/CallLogView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default class CallLogView extends BaseElement{
3434
const callLogDescription = createDiv({ id: 'call_log_desc', className: `${classes['callLogListDesc']}` });
3535
const callLogDescLogo = createDiv({ className: `${classes['callLogDescLogo']}` });
3636
const callLogDescTitle = createDiv({ innerText: 'Sendbird Calls Quickstart', className: `${classes['callLogDescTitle']} ${classes['font24']} ${classes['fontDemi']}` });
37-
const callLogDescLabel = createDiv({ innerText: 'This is the Sendbird Calls Quickstart page. Lorem ipsum', className: `${classes['callLogDescLabel']} ${classes['fontNormal']} ${classes['fontHeavy']}` });
37+
const callLogDescLabel = createDiv({ innerText: 'This is the Sendbird Calls Quickstart page.', className: `${classes['callLogDescLabel']} ${classes['fontNormal']} ${classes['fontHeavy']}` });
3838
callLogDescription.appendChild(callLogDescLogo);
3939
callLogDescription.appendChild(callLogDescTitle);
4040
callLogDescription.appendChild(callLogDescLabel);

0 commit comments

Comments
 (0)