Skip to content

Commit

Permalink
Fix UI regressions (#17)
Browse files Browse the repository at this point in the history
* Fix UI regressions

* Fix type

* Fix border
  • Loading branch information
streamer45 committed Mar 10, 2022
1 parent ece978a commit fa811fe
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions e2e/tests/join_call.spec.ts
Expand Up @@ -58,6 +58,8 @@ test.describe('join call', () => {
const joinCallButton = page.locator('.post__body').last().locator('button:has-text("Join call")');
await expect(joinCallButton).toBeVisible();

await expect(page.locator('.call-thread').last()).toBeVisible();

expect(await page.locator('.call-thread').last().screenshot()).toMatchSnapshot('call-thread-join.png');

await joinCallButton.click();
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions webapp/src/components/channel_call_toast/component.tsx
Expand Up @@ -97,6 +97,7 @@ export default class ChannelCallToast extends React.PureComponent<Props, State>
pictures={this.props.pictures}
size={24}
fontSize={10}
border={false}
maxShowedProfiles={2}
/>
</div>
Expand Down
5 changes: 4 additions & 1 deletion webapp/src/components/connected_profiles.tsx
Expand Up @@ -11,9 +11,10 @@ interface Props {
maxShowedProfiles: number,
size: number;
fontSize: number;
border?: boolean;
}

const ConnectedProfiles = ({pictures, profiles, maxShowedProfiles, size, fontSize}: Props) => {
const ConnectedProfiles = ({pictures, profiles, maxShowedProfiles, size, fontSize, border}: Props) => {
maxShowedProfiles = maxShowedProfiles || 2;
const diff = profiles.length - maxShowedProfiles;
profiles = diff > 0 ? profiles.slice(0, maxShowedProfiles) : profiles;
Expand All @@ -35,6 +36,7 @@ const ConnectedProfiles = ({pictures, profiles, maxShowedProfiles, size, fontSiz
size={size}
fontSize={fontSize}
url={pictures[idx]}
border={Boolean(border)}
style={{position: 'relative', left: `${margin + off}px`}}
/>
</OverlayTrigger>
Expand All @@ -47,6 +49,7 @@ const ConnectedProfiles = ({pictures, profiles, maxShowedProfiles, size, fontSiz
size={size}
text={`+${diff}`}
style={{position: 'relative', left: `${margin}px`}}
border={Boolean(border)}
key='call_thread_more_profiles'
/>,
);
Expand Down
1 change: 1 addition & 0 deletions webapp/src/components/post_type/component.tsx
Expand Up @@ -148,6 +148,7 @@ export default class PostType extends React.PureComponent<Props> {
pictures={this.props.pictures}
size={32}
fontSize={12}
border={true}
maxShowedProfiles={2}
/>
</div>
Expand Down

0 comments on commit fa811fe

Please sign in to comment.