Skip to content

Commit

Permalink
Iterate
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Oct 18, 2024
1 parent 4896f01 commit e98b54d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 13 deletions.
6 changes: 3 additions & 3 deletions playwright/e2e/register/register.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ test.describe("Registration", () => {
});
});
await page.getByRole("textbox", { name: "Username", exact: true }).fill("_alice");
await expect(page.getByRole("alert").filter({ hasText: "Some characters not allowed" })).toBeVisible();
await expect(page.getByRole("tooltip").filter({ hasText: "Some characters not allowed" })).toBeVisible();

await page.route("**/_matrix/client/*/register/available?username=bob", async (route) => {
await route.fulfill({
Expand All @@ -108,9 +108,9 @@ test.describe("Registration", () => {
});
});
await page.getByRole("textbox", { name: "Username", exact: true }).fill("bob");
await expect(page.getByRole("alert").filter({ hasText: "Someone already has that username" })).toBeVisible();
await expect(page.getByRole("tooltip").filter({ hasText: "Someone already has that username" })).toBeVisible();

await page.getByRole("textbox", { name: "Username", exact: true }).fill("foobar");
await expect(page.getByRole("alert")).not.toBeVisible();
await expect(page.getByRole("tooltip")).not.toBeVisible();
});
});
2 changes: 0 additions & 2 deletions res/css/views/rooms/_EventTile.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -878,8 +878,6 @@ $left-gutter: 64px;
}

.mx_EventTile_body {
width: 100%;

a:hover {
text-decoration: underline;
}
Expand Down
1 change: 0 additions & 1 deletion src/components/structures/ContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import React, { CSSProperties, RefObject, SyntheticEvent, useRef, useState } fro
import ReactDOM from "react-dom";
import classNames from "classnames";
import FocusLock from "react-focus-lock";
import { TooltipProvider } from "@vector-im/compound-web";

import { Writeable } from "../../@types/common";
import UIStore from "../../stores/UIStore";
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/elements/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ interface IProps {
forceValidity?: boolean;
// If specified, contents will appear as a tooltip on the element and
// validation feedback tooltips will be suppressed.
tooltipContent?: JSX.Element;
tooltipContent?: JSX.Element | string;
// If specified the tooltip will be shown regardless of feedback
forceTooltipVisible?: boolean;
// If specified, the tooltip with be aligned accorindly with the field, defaults to Right.
Expand Down Expand Up @@ -111,7 +111,7 @@ type PropShapes = IInputProps | ISelectProps | ITextareaProps | INativeOnChangeI

interface IState {
valid?: boolean;
feedback?: JSX.Element;
feedback?: JSX.Element | string;
feedbackVisible: boolean;
focused: boolean;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/elements/MiniAvatarUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const MiniAvatarUploader: React.FC<IProps> = ({
accept="image/*"
/>

<Tooltip label={label} open={visible} onOpenChange={setHover}>
<Tooltip label={label!} open={visible} onOpenChange={setHover}>
<AccessibleButton
className={classNames("mx_MiniAvatarUploader", {
mx_MiniAvatarUploader_busy: busy,
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/elements/Validation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface IFieldState {

export interface IValidationResult {
valid?: boolean;
feedback?: JSX.Element;
feedback?: JSX.Element | string;
}

/**
Expand Down
4 changes: 1 addition & 3 deletions src/components/views/messages/TextualBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { getParentEventId } from "../../../utils/Reply";
import { EditWysiwygComposer } from "../rooms/wysiwyg_composer";
import { IEventTileOps } from "../rooms/EventTile";
import { MatrixClientPeg } from "../../../MatrixClientPeg";
import CodeBlock from "./CodeBlock.tsx";
import CodeBlock from "./CodeBlock";

interface IState {
// the URLs (if any) to be previewed with a LinkPreviewWidget inside this TextualBody.
Expand All @@ -48,7 +48,6 @@ interface IState {
export default class TextualBody extends React.Component<IBodyProps, IState> {
private readonly contentRef = createRef<HTMLDivElement>();

private unmounted = false;
private pills: Element[] = [];
private tooltips: Element[] = [];
private reactRoots: Element[] = [];
Expand Down Expand Up @@ -131,7 +130,6 @@ export default class TextualBody extends React.Component<IBodyProps, IState> {
}

public componentWillUnmount(): void {
this.unmounted = true;
unmountPills(this.pills);
unmountTooltips(this.tooltips);

Expand Down

0 comments on commit e98b54d

Please sign in to comment.