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

Commit 1639016

Browse files
committed
Update UI by design QA
1 parent 280155e commit 1639016

File tree

5 files changed

+38
-9
lines changed

5 files changed

+38
-9
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: 27 additions & 3 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%',
@@ -1155,8 +1156,16 @@ const styles = {
11551156
display: 'flex',
11561157
flexDirection: 'row',
11571158
'& $profileSmall': {
1159+
width: '32px',
1160+
height: '32px',
1161+
marginLeft: '0px'
1162+
},
1163+
'& $avatar': {
11581164
marginLeft: '0px'
11591165
},
1166+
'& $headerInfo': {
1167+
width: '164px'
1168+
},
11601169
'& $headerNickname': {
11611170
color: colors.navy900
11621171
},
@@ -1174,11 +1183,11 @@ const styles = {
11741183
paddingBottom: '8px',
11751184
paddingLeft: '0px',
11761185
paddingRight: '0px',
1177-
width: '200px',
1186+
width: '248px',
11781187
borderRadius: '4px',
11791188
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)',
11801189
backgroundColor: colors.white,
1181-
zIndex: '1'
1190+
zIndex: '1',
11821191
},
11831192

11841193
menuItem: {
@@ -1197,6 +1206,20 @@ const styles = {
11971206
}
11981207
},
11991208

1209+
disabledMenuItem: {
1210+
display: 'block',
1211+
boxSizing: 'border-box',
1212+
cursor: 'default',
1213+
paddingTop: '0px',
1214+
paddingBottom: '0px',
1215+
paddingLeft: '16px',
1216+
paddingRight: '16px',
1217+
width: '100%',
1218+
height: 'auto',
1219+
minHeight: '32px',
1220+
textAlign: 'left',
1221+
},
1222+
12001223
menuDivider: {
12011224
width: '100%',
12021225
height: '1px',
@@ -1439,14 +1462,15 @@ const styles = {
14391462
height: 'auto',
14401463
marginLeft: '12px',
14411464
wordBreak: 'break-all',
1465+
color: colors.navy600,
14421466
},
14431467

14441468
callLogEndInfo: {
14451469
display: 'inline-flex',
14461470
width: '100%',
14471471
height: '16px',
14481472
marginLeft: '12px',
1449-
marginTop: '4px',
1473+
marginTop: '8px',
14501474
color: colors.navy600
14511475
},
14521476

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)