diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index 3ef03c689..5e9798836 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -1,17 +1,8 @@
const COPYRIGHT_HEADER = `/*
-Copyright %%CURRENT_YEAR%% New Vector Ltd
+Copyright %%CURRENT_YEAR%% New Vector Ltd.
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+SPDX-License-Identifier: AGPL-3.0-only
+Please see LICENSE in the repository root for full details.
*/
`;
diff --git a/.github/workflows/element-call.yaml b/.github/workflows/element-call.yaml
index c6485e7f2..d41df03ba 100644
--- a/.github/workflows/element-call.yaml
+++ b/.github/workflows/element-call.yaml
@@ -39,7 +39,7 @@ jobs:
VITE_APP_VERSION: ${{ inputs.vite_app_version }}
NODE_OPTIONS: "--max-old-space-size=4096"
- name: Upload Artifact
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4
+ uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
with:
name: build-output
path: dist
diff --git a/.github/workflows/translations-download.yaml b/.github/workflows/translations-download.yaml
index 42a1cc69f..8bcc51814 100644
--- a/.github/workflows/translations-download.yaml
+++ b/.github/workflows/translations-download.yaml
@@ -39,7 +39,7 @@ jobs:
- name: Create Pull Request
id: cpr
- uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
+ uses: peter-evans/create-pull-request@d121e62763d8cc35b5fb1710e887d6e69a52d3a4 # v7.0.2
with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
branch: actions/localazy-download
diff --git a/src/analytics/AnalyticsNotice.tsx b/src/analytics/AnalyticsNotice.tsx
index 8df2d742e..9ba78f0d2 100644
--- a/src/analytics/AnalyticsNotice.tsx
+++ b/src/analytics/AnalyticsNotice.tsx
@@ -8,14 +8,20 @@ Please see LICENSE in the repository root for full details.
import { FC } from "react";
import { Trans } from "react-i18next";
-import { Link } from "../typography/Typography";
+import { ExternalLink } from "../button/Link";
export const AnalyticsNotice: FC = () => (
By participating in this beta, you consent to the collection of anonymous
data, which we use to improve the product. You can find more information
about which data we track in our{" "}
- Privacy Policy and our{" "}
- Cookie Policy.
+
+ Privacy Policy
+ {" "}
+ and our{" "}
+
+ Cookie Policy
+
+ .
);
diff --git a/src/auth/RegisterPage.tsx b/src/auth/RegisterPage.tsx
index 5ee1c9eb9..392f8a7ab 100644
--- a/src/auth/RegisterPage.tsx
+++ b/src/auth/RegisterPage.tsx
@@ -19,7 +19,7 @@ import { captureException } from "@sentry/react";
import { sleep } from "matrix-js-sdk/src/utils";
import { Trans, useTranslation } from "react-i18next";
import { logger } from "matrix-js-sdk/src/logger";
-import { Button } from "@vector-im/compound-web";
+import { Button, Text } from "@vector-im/compound-web";
import { FieldRow, InputField, ErrorMessage } from "../input/Input";
import { useClientLegacy } from "../ClientContext";
@@ -28,10 +28,10 @@ import styles from "./LoginPage.module.css";
import Logo from "../icons/LogoLarge.svg?react";
import { LoadingView } from "../FullScreenView";
import { useRecaptcha } from "./useRecaptcha";
-import { Caption, Link } from "../typography/Typography";
import { usePageTitle } from "../usePageTitle";
import { PosthogAnalytics } from "../analytics/PosthogAnalytics";
import { Config } from "../config/Config";
+import { ExternalLink, Link } from "../button/Link";
export const RegisterPage: FC = () => {
const { t } = useTranslation();
@@ -201,24 +201,24 @@ export const RegisterPage: FC = () => {
data-testid="register_confirm_password"
/>
-
+
This site is protected by ReCAPTCHA and the Google{" "}
-
+
Privacy Policy
- {" "}
+ {" "}
and{" "}
-
+
Terms of Service
- {" "}
+ {" "}
apply.
By clicking "Register", you agree to our{" "}
-
+
End User Licensing Agreement (EULA)
-
+
-
+
{error && (
diff --git a/src/button/Link.module.css b/src/button/Link.module.css
new file mode 100644
index 000000000..6248bc407
--- /dev/null
+++ b/src/button/Link.module.css
@@ -0,0 +1,13 @@
+/*
+Copyright 2024 New Vector Ltd.
+
+SPDX-License-Identifier: AGPL-3.0-only
+Please see LICENSE in the repository root for full details.
+*/
+
+.external {
+ /* By default links will be blue/purple (or whatever the user agent does), but
+ in our designs we generally want external links to be the same color as the
+ surrounding text */
+ color: inherit;
+}
diff --git a/src/button/Link.tsx b/src/button/Link.tsx
index 35c9af984..68c4dd136 100644
--- a/src/button/Link.tsx
+++ b/src/button/Link.tsx
@@ -15,10 +15,16 @@ import {
import { Link as CpdLink } from "@vector-im/compound-web";
import { useHistory } from "react-router-dom";
import { createPath, LocationDescriptor, Path } from "history";
+import classNames from "classnames";
+
+import { useLatest } from "../useLatest";
+import styles from "./Link.module.css";
export function useLink(
to: LocationDescriptor,
+ state?: unknown,
): [Path, (e: MouseEvent) => void] {
+ const latestState = useLatest(state);
const history = useHistory();
const path = useMemo(
() => (typeof to === "string" ? to : createPath(to)),
@@ -27,9 +33,9 @@ export function useLink(
const onClick = useCallback(
(e: MouseEvent) => {
e.preventDefault();
- history.push(to);
+ history.push(to, latestState.current);
},
- [history, to],
+ [history, to, latestState],
);
return [path, onClick];
@@ -38,15 +44,37 @@ export function useLink(
type Props = Omit<
ComponentPropsWithoutRef,
"href" | "onClick"
-> & { to: LocationDescriptor };
+> & { to: LocationDescriptor; state?: unknown };
/**
* A version of Compound's link component that integrates with our router setup.
+ * This is only for app-internal links.
*/
export const Link = forwardRef(function Link(
- { to, ...props },
+ { to, state, ...props },
ref,
) {
- const [path, onClick] = useLink(to);
+ const [path, onClick] = useLink(to, state);
return ;
});
+
+/**
+ * A link to an external web page, made to fit into blocks of text more subtly
+ * than the normal Compound link component.
+ */
+export const ExternalLink = forwardRef<
+ HTMLAnchorElement,
+ ComponentPropsWithoutRef<"a">
+>(function ExternalLink({ className, children, ...props }, ref) {
+ return (
+
+ {children}
+
+ );
+});
diff --git a/src/home/CallList.module.css b/src/home/CallList.module.css
index c7441b4a8..faa5bf2d7 100644
--- a/src/home/CallList.module.css
+++ b/src/home/CallList.module.css
@@ -50,6 +50,12 @@ Please see LICENSE in the repository root for full details.
margin-bottom: 0;
}
+.callName {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
.facePile {
margin-top: 8px;
}
diff --git a/src/home/CallList.tsx b/src/home/CallList.tsx
index 526bb7e84..72b7356a1 100644
--- a/src/home/CallList.tsx
+++ b/src/home/CallList.tsx
@@ -11,14 +11,13 @@ import { RoomMember } from "matrix-js-sdk/src/models/room-member";
import { Room } from "matrix-js-sdk/src/models/room";
import { FC, useCallback, MouseEvent, useState } from "react";
import { useTranslation } from "react-i18next";
-import { IconButton } from "@vector-im/compound-web";
+import { IconButton, Text } from "@vector-im/compound-web";
import { CloseIcon } from "@vector-im/compound-design-tokens/assets/web/icons";
import classNames from "classnames";
import { Avatar, Size } from "../Avatar";
import styles from "./CallList.module.css";
import { getRelativeRoomUrl } from "../utils/matrix";
-import { Body } from "../typography/Typography";
import { GroupCallRoom } from "./useGroupCallRooms";
import { useRoomEncryptionSystem } from "../e2ee/sharedKeyManagement";
@@ -78,9 +77,9 @@ const CallTile: FC = ({ name, avatarUrl, room, client }) => {
<>