mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-06 04:36:21 +02:00
More cleanup
This commit is contained in:
parent
c595acc3fb
commit
3270e876d7
@ -35,7 +35,7 @@ test.describe("Audio player", { tag: ["@no-firefox", "@no-webkit"] }, () => {
|
||||
await page.locator(".mx_Dialog").getByRole("button", { name: "Upload" }).click();
|
||||
|
||||
// Wait until the file is sent
|
||||
await expect(page.locator(".mx_RoomView_statusArea_expanded")).not.toBeVisible();
|
||||
await expect(page.locator(".mx_RoomView_statusArea")).not.toBeVisible();
|
||||
await expect(page.locator(".mx_EventTile.mx_EventTile_last .mx_EventTile_receiptSent")).toBeVisible();
|
||||
// wait for the tile to finish loading
|
||||
await expect(
|
||||
|
||||
@ -22,7 +22,7 @@ async function uploadFile(page: Page, file: string) {
|
||||
await page.locator(".mx_Dialog").getByRole("button", { name: "Upload" }).click();
|
||||
|
||||
// Wait until the file is sent
|
||||
await expect(page.locator(".mx_RoomView_statusArea_expanded")).not.toBeVisible();
|
||||
await expect(page.locator(".mx_RoomView_statusArea")).not.toBeVisible();
|
||||
await expect(page.locator(".mx_EventTile.mx_EventTile_last .mx_EventTile_receiptSent")).toBeVisible();
|
||||
}
|
||||
|
||||
|
||||
@ -771,7 +771,7 @@ test.describe("Timeline", () => {
|
||||
await page.locator(".mx_Dialog").getByRole("button", { name: "Upload" }).click();
|
||||
|
||||
// Wait until the file is sent
|
||||
await expect(page.locator(".mx_RoomView_statusArea_expanded")).not.toBeVisible();
|
||||
await expect(page.locator(".mx_RoomView_statusArea")).not.toBeVisible();
|
||||
await expect(page.locator(".mx_EventTile.mx_EventTile_last .mx_EventTile_receiptSent")).toBeVisible();
|
||||
|
||||
// Assert that the file size is displayed in kibibytes (1024 bytes), not kilobytes (1000 bytes)
|
||||
|
||||
@ -99,15 +99,11 @@ Please see LICENSE files in the repository root for full details.
|
||||
width: 100%;
|
||||
flex: 0 0 auto;
|
||||
|
||||
max-height: 0px;
|
||||
background-color: $background;
|
||||
z-index: 1000;
|
||||
overflow: hidden;
|
||||
|
||||
transition: all 0.2s ease-out;
|
||||
}
|
||||
|
||||
.mx_RoomView_statusArea_expanded {
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
|
||||
@ -243,7 +243,6 @@ export interface IRoomState {
|
||||
// 'scroll to bottom' knob, among a couple of other things.
|
||||
atEndOfLiveTimeline?: boolean;
|
||||
showTopUnreadMessagesBar: boolean;
|
||||
statusBarVisible: boolean;
|
||||
// We load this later by asking the js-sdk to suggest a version for us.
|
||||
// This object is the result of Room#getRecommendedVersion()
|
||||
|
||||
@ -462,7 +461,6 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||
showRightPanel: false,
|
||||
joining: false,
|
||||
showTopUnreadMessagesBar: false,
|
||||
statusBarVisible: false,
|
||||
canReact: false,
|
||||
canSendMessages: false,
|
||||
resizing: false,
|
||||
@ -2366,7 +2364,6 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||
}
|
||||
|
||||
let statusBar: JSX.Element | undefined;
|
||||
const isStatusAreaExpanded = true;
|
||||
|
||||
if (ContentMessages.sharedInstance().getCurrentUploads().length > 0) {
|
||||
statusBar = <UploadBar room={this.state.room} />;
|
||||
@ -2374,14 +2371,10 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||
statusBar = <RoomStatusBar room={this.state.room} />;
|
||||
}
|
||||
|
||||
const statusBarAreaClass = classNames("mx_RoomView_statusArea", {
|
||||
mx_RoomView_statusArea_expanded: isStatusAreaExpanded,
|
||||
});
|
||||
|
||||
// if statusBar does not exist then statusBarArea is blank and takes up unnecessary space on the screen
|
||||
// show statusBarArea only if statusBar is present
|
||||
const statusBarArea = statusBar && (
|
||||
<div role="region" className={statusBarAreaClass} aria-label={_t("a11y|room_status_bar")}>
|
||||
<div role="region" className="mx_RoomView_statusArea" aria-label={_t("a11y|room_status_bar")}>
|
||||
<div className="mx_RoomView_statusAreaBox">
|
||||
<div className="mx_RoomView_statusAreaBox_line" />
|
||||
{statusBar}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user