Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into dbkr/refactor_crea…
Browse files Browse the repository at this point in the history
…tecrosssigningdialog
  • Loading branch information
dbkr committed Oct 21, 2024
2 parents 65fffd8 + 46d1392 commit 9003167
Show file tree
Hide file tree
Showing 286 changed files with 1,166 additions and 1,618 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ karma-reports/
.idea/
.tmp/
config.json*
# Exclude the playwright directory as much as we can as the snapshots are huge and we bind mount it in
playwright/
!playwright/docker-entrypoint.sh
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ module.exports = {
"@typescript-eslint/ban-ts-comment": "off",
// We're okay with assertion errors when we ask for them
"@typescript-eslint/no-non-null-assertion": "off",
// We do this sometimes to brand interfaces
"@typescript-eslint/no-empty-object-type": "off",
},
},
// temporary override for offending icon require files
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/dockerhub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ jobs:
name: Docker Buildx
runs-on: ubuntu-24.04
environment: dockerhub
strategy:
fail-fast: false
matrix:
include:
- variant: vanilla
# Variant we ship to aid ESS in providing a build on the OpenCoDE platform including specific modules
- variant: opendesk
flavor: suffix=-opendesk,onlatest=true
prepare: mv variants/openDesk/* .
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -32,10 +23,6 @@ jobs:
- name: Install Cosign
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3

- name: Prepare
if: matrix.prepare
run: ${{ matrix.prepare }}

- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3

Expand All @@ -61,7 +48,6 @@ jobs:
type=ref,event=tag
flavor: |
latest=${{ contains(github.ref_name, '-rc.') && 'false' || 'auto' }}
${{ matrix.flavor }}
- name: Build and push
id: build-and-push
Expand All @@ -85,7 +71,6 @@ jobs:
cosign sign --yes ${images}
- name: Update repo description
if: matrix.variant == 'vanilla'
uses: peter-evans/dockerhub-description@e98e4d1628a5f3be2be7c231e50981aee98723ae # v4
continue-on-error: true
with:
Expand Down
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"test:playwright:open": "yarn test:playwright --ui",
"test:playwright:screenshots": "yarn test:playwright:screenshots:build && yarn test:playwright:screenshots:run",
"test:playwright:screenshots:build": "docker build playwright -t element-web-playwright",
"test:playwright:screenshots:run": "docker run --rm --network host -e BASE_URL -e CI -v $(pwd):/work/ -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/:/tmp/ -it element-web-playwright",
"test:playwright:screenshots:run": "docker run --rm --network host -e BASE_URL -e CI -v $(pwd):/work/ -v $(node -e 'console.log(require(`path`).dirname(require.resolve(`matrix-js-sdk/package.json`)))'):/work/node_modules/matrix-js-sdk -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/:/tmp/ -it element-web-playwright",
"coverage": "yarn test --coverage",
"analyse:unused-exports": "ts-node ./scripts/analyse_unused_exports.ts",
"analyse:webpack-bundles": "webpack-bundle-analyzer webpack-stats.json webapp",
Expand All @@ -77,10 +77,8 @@
"@types/react-dom": "17.0.25",
"@types/react": "17.0.83",
"@types/seedrandom": "3.0.8",
"oidc-client-ts": "3.0.1",
"oidc-client-ts": "3.1.0",
"jwt-decode": "4.0.0",
"@vector-im/compound-design-tokens": "1.8.0",
"@vector-im/compound-web": "7.0.0",
"@floating-ui/react": "0.26.11",
"@radix-ui/react-id": "1.1.0",
"caniuse-lite": "1.0.30001668",
Expand All @@ -98,7 +96,7 @@
"@sentry/browser": "^8.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@vector-im/compound-design-tokens": "^1.8.0",
"@vector-im/compound-web": "^7.0.0",
"@vector-im/compound-web": "^7.1.0",
"@zxcvbn-ts/core": "^3.0.4",
"@zxcvbn-ts/language-common": "^3.0.4",
"@zxcvbn-ts/language-en": "^3.0.2",
Expand All @@ -115,7 +113,7 @@
"emojibase-regex": "15.3.2",
"escape-html": "^1.0.3",
"file-saver": "^2.0.5",
"filesize": "10.1.4",
"filesize": "10.1.6",
"github-markdown-css": "^5.5.1",
"glob-to-regexp": "^0.4.1",
"highlight.js": "^11.3.1",
Expand All @@ -142,7 +140,7 @@
"png-chunks-extract": "^1.0.0",
"posthog-js": "1.157.2",
"qrcode": "1.5.4",
"re-resizable": "^6.9.0",
"re-resizable": "6.9.17",
"react": "17.0.2",
"react-beautiful-dnd": "^13.1.0",
"react-blurhash": "^0.3.0",
Expand All @@ -151,7 +149,7 @@
"react-transition-group": "^4.4.1",
"rfc4648": "^1.4.0",
"sanitize-filename": "^1.6.3",
"sanitize-html": "2.13.0",
"sanitize-html": "2.13.1",
"tar-js": "^0.3.0",
"temporal-polyfill": "^0.2.5",
"ua-parser-js": "^1.0.2",
Expand Down Expand Up @@ -186,6 +184,7 @@
"@playwright/test": "^1.40.1",
"@principalstudio/html-webpack-inject-preload": "^1.2.7",
"@sentry/webpack-plugin": "^2.7.1",
"@stylistic/eslint-plugin": "^2.9.0",
"@svgr/webpack": "^8.0.0",
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
Expand Down Expand Up @@ -223,8 +222,8 @@
"@types/tar-js": "^0.3.5",
"@types/ua-parser-js": "^0.7.36",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"axe-core": "4.10.0",
"babel-jest": "^29.0.0",
"babel-loader": "^9.0.0",
Expand All @@ -246,7 +245,7 @@
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^28.0.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-matrix-org": "1.2.1",
"eslint-plugin-matrix-org": "^2.0.2",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-unicorn": "^56.0.0",
Expand Down
1 change: 1 addition & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export default defineConfig({
command: process.env.CI ? "npx serve -p 8080 -L ./webapp" : "yarn start",
url: `${baseURL}/config.json`,
reuseExistingServer: true,
timeout: (process.env.CI ? 30 : 120) * 1000,
},
testDir: "playwright/e2e",
outputDir: "playwright/test-results",
Expand Down
1 change: 1 addition & 0 deletions playwright/e2e/audio-player/audio-player.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ test.describe("Audio player", () => {

// Find and click "Reply" button
const clickButtonReply = async () => {
await tile.scrollIntoViewIfNeeded();
await tile.hover();
await tile.getByRole("button", { name: "Reply", exact: true }).click();
};
Expand Down
11 changes: 5 additions & 6 deletions playwright/e2e/composer/RTE.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ test.describe("Composer", () => {
},
});

// https://github.com/vector-im/element-web/issues/26037
test.skip("autocomplete behaviour tests", async ({ page, app, bot: bob }) => {
test("autocomplete behaviour tests", async ({ page, app, bot: bob }) => {
// Set up a private room so we have another user to mention
await app.client.createRoom({
is_direct: true,
Expand Down Expand Up @@ -138,10 +137,10 @@ test.describe("Composer", () => {
.pressSequentially(`initial text @${bob.credentials.displayName.slice(0, 1)} abc`);
await expect(page.getByTestId("autocomplete-wrapper")).toBeEmpty();
// Move the cursor left by 4 to put it to: `@B| abc`, check autocomplete displays
await page.getByRole("textbox").press("LeftArrow");
await page.getByRole("textbox").press("LeftArrow");
await page.getByRole("textbox").press("LeftArrow");
await page.getByRole("textbox").press("LeftArrow");
await page.getByRole("textbox").press("ArrowLeft");
await page.getByRole("textbox").press("ArrowLeft");
await page.getByRole("textbox").press("ArrowLeft");
await page.getByRole("textbox").press("ArrowLeft");
await expect(page.getByTestId("autocomplete-wrapper")).not.toBeEmpty();

// Selecting the autocomplete option using Enter inserts it into the composer
Expand Down
1 change: 0 additions & 1 deletion playwright/e2e/editing/editing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ test.describe("Editing", () => {
checkA11y,
}) => {
axe.disableRules("color-contrast"); // XXX: We have some known contrast issues here
axe.exclude(".mx_Tooltip_visible"); // XXX: this is fine but would be good to fix

await page.goto(`#/room/${room.roomId}`);

Expand Down
2 changes: 1 addition & 1 deletion playwright/e2e/read-receipts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class MessageBuilder {
/**
* Map of message content -> event.
*/
messages = new Map<String, Promise<JSHandle<MatrixEvent>>>();
messages = new Map<string, Promise<JSHandle<MatrixEvent>>>();

/**
* Utility to find a MatrixEvent by its body content
Expand Down
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();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ test.describe("Appearance user settings tab", () => {
await expect(util.getThemePanel()).toMatchScreenshot("theme-panel-custom-theme-added.png");

await util.removeCustomTheme();
await expect(util.getThemePanel()).toMatchScreenshot("theme-panel-custom-theme.png");
await expect(util.getThemePanel()).toMatchScreenshot("theme-panel-custom-theme-removed.png");
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion playwright/e2e/spaces/threads-activity-centre/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class MessageBuilder {
/**
* Map of message content -> event.
*/
messages = new Map<String, Promise<JSHandle<MatrixEvent>>>();
messages = new Map<string, Promise<JSHandle<MatrixEvent>>>();

/**
* Utility to find a MatrixEvent by its body content
Expand Down
2 changes: 1 addition & 1 deletion playwright/e2e/spotlight/spotlight.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ test.describe("Spotlight", () => {
*
* https://github.com/matrix-org/synapse/issues/16472
*/
test.skip("should find unknown people", async ({ page, app }) => {
test("should find unknown people", async ({ page, app }) => {
const spotlight = await app.openSpotlight();
await page.waitForTimeout(500); // wait for the dialog to settle
await spotlight.filter(Filter.People);
Expand Down
4 changes: 2 additions & 2 deletions playwright/e2e/timeline/timeline.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ test.describe("Timeline", () => {
const toggleEventButton = viewSourceEventExpanded.getByRole("button", { name: "toggle event" });
// Check size and position of toggle on expanded view source event
// See: _ViewSourceEvent.pcss
await expect(toggleEventButton).toHaveCSS("height", "12px"); // --ViewSourceEvent_toggle-size
await expect(toggleEventButton).toHaveCSS("height", "16px"); // --ViewSourceEvent_toggle-size
await expect(toggleEventButton).toHaveCSS("align-self", "flex-end");
// Click again to collapse the source
await toggleEventButton.click({ position: { x: 0, y: 0 } });
Expand All @@ -679,7 +679,7 @@ test.describe("Timeline", () => {
);

// Click view source event toggle
await viewSourceEventIrc.getByRole("button", { name: "toggle event" }).click({ position: { x: 0, y: 0 } });
await viewSourceEventIrc.getByRole("button", { name: "toggle event" }).click({ position: { x: 8, y: 8 } });

// Make sure the expand toggle worked
await expect(page.locator(".mx_EventTile[data-layout=irc] .mx_ViewSourceEvent_expanded")).toBeVisible();
Expand Down
3 changes: 1 addition & 2 deletions playwright/element-web-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,7 @@ export const expect = baseExpect.extend({

if (!options?.showTooltips) {
css += `
[role="tooltip"],
.mx_Tooltip_visible {
[role="tooltip"] {
visibility: hidden !important;
}
`;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified playwright/snapshots/widgets/layout.spec.ts/apps-drawer-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion res/css/_components.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@
@import "./views/elements/_TagComposer.pcss";
@import "./views/elements/_TextWithTooltip.pcss";
@import "./views/elements/_ToggleSwitch.pcss";
@import "./views/elements/_Tooltip.pcss";
@import "./views/elements/_UseCaseSelection.pcss";
@import "./views/elements/_UseCaseSelectionButton.pcss";
@import "./views/elements/_Validation.pcss";
Expand Down
2 changes: 1 addition & 1 deletion res/css/components/views/location/_ZoomButtons.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Please see LICENSE files in the repository root for full details.
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.25);

.mx_ZoomButtons_icon {
$ZoomButtons_icon-size: 10px;
$ZoomButtons_icon-size: 12px;

height: $ZoomButtons_icon-size;
width: $ZoomButtons_icon-size;
Expand Down
10 changes: 5 additions & 5 deletions res/css/structures/_GenericDropdownMenu.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ Please see LICENSE files in the repository root for full details.

&[aria-checked="true"]::before {
content: "";
width: 12px;
height: 12px;
margin-left: -20px;
margin-right: 8px;
mask-image: url("$(res)/img/feather-customised/check.svg");
width: 16px;
height: 16px;
margin-left: -22px;
margin-right: 6px;
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
mask-size: 100%;
mask-repeat: no-repeat;
background-color: $primary-content;
Expand Down
2 changes: 1 addition & 1 deletion res/css/structures/_RoomStatusBar.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Please see LICENSE files in the repository root for full details.
}

&.mx_RoomStatusBar_unsentCancelAllBtn::before {
mask-image: url("$(res)/img/element-icons/trashcan.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/delete.svg");
}

&.mx_RoomStatusBar_unsentRetry {
Expand Down
4 changes: 2 additions & 2 deletions res/css/structures/_SpacePanel.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Please see LICENSE files in the repository root for full details.
&.mx_SpaceButton_new .mx_SpaceButton_icon {
&::before {
background-color: $primary-content;
mask-image: url("$(res)/img/element-icons/plus.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/plus.svg");
transition: all 0.2s ease-in-out; /* TODO transition */
}
}
Expand Down Expand Up @@ -434,7 +434,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_SpacePanel_iconPlus::before {
mask-image: url("$(res)/img/element-icons/plus.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/plus.svg");
}

.mx_SpacePanel_iconExplore::before {
Expand Down
3 changes: 2 additions & 1 deletion res/css/views/auth/_PassphraseField.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ progress.mx_PassphraseField_progress {
border: 0;
height: 4px;
position: absolute;
top: -12px;
top: -10px;
left: 0;

@mixin ProgressBarBorderRadius "2px";
@mixin ProgressBarColour $PassphraseStrengthLow;
Expand Down
6 changes: 3 additions & 3 deletions res/css/views/context_menus/_MessageContextMenu.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_MessageContextMenu_iconCollapse::before {
mask-image: url("$(res)/img/element-icons/message/chevron-up.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/chevron-up.svg");
}

.mx_MessageContextMenu_iconReport::before {
Expand Down Expand Up @@ -57,7 +57,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_MessageContextMenu_iconRedact::before {
mask-image: url("$(res)/img/element-icons/trashcan.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/delete.svg");
}

.mx_MessageContextMenu_iconResend::before {
Expand Down Expand Up @@ -92,7 +92,7 @@ Please see LICENSE files in the repository root for full details.
}

.mx_MessageContextMenu_iconReply::before {
mask-image: url("$(res)/img/element-icons/room/message-bar/reply.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/reply.svg");
}

.mx_MessageContextMenu_iconReplyInThread::before {
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/dialogs/_InviteDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ Please see LICENSE files in the repository root for full details.
height: 24px;
grid-column: 1;
grid-row: 1;
mask-image: url("$(res)/img/feather-customised/check.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
mask-size: 100%;
mask-repeat: no-repeat;
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Please see LICENSE files in the repository root for full details.
color: $accent;

&::before {
mask-image: url("$(res)/img/feather-customised/check.svg");
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
background-color: $accent;
}
}
Expand Down
Loading

0 comments on commit 9003167

Please sign in to comment.