diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index dd793898eca..7252c27b5fb 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -10,7 +10,7 @@ on: jobs: backport: name: Backport - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 # Only react to merged PRs for security reasons. # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. if: > diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 84bb3d263d2..55f5c1f4a38 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,15 +18,15 @@ jobs: fail-fast: false matrix: image: - - ubuntu-latest - - windows-latest - - macos-latest + - ubuntu-24.04 + - windows-2022 + - macos-14 isDevelop: - ${{ github.event_name == 'push' && github.ref_name == 'develop' }} - # Skip the ubuntu-latest build for the develop branch as the dedicated CD build_develop workflow handles that + # Skip the ubuntu-24.04 build for the develop branch as the dedicated CD build_develop workflow handles that exclude: - isDevelop: true - image: ubuntu-latest + image: ubuntu-24.04 runs-on: ${{ matrix.image }} defaults: run: diff --git a/.github/workflows/build_debian.yaml b/.github/workflows/build_debian.yaml index 254b99d261a..319dccd9f2f 100644 --- a/.github/workflows/build_debian.yaml +++ b/.github/workflows/build_debian.yaml @@ -7,7 +7,7 @@ jobs: build: name: Build package environment: packages.element.io - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 env: R2_INCOMING_BUCKET: ${{ vars.R2_INCOMING_BUCKET }} R2_URL: ${{ vars.CF_R2_S3_API }} diff --git a/.github/workflows/build_develop.yml b/.github/workflows/build_develop.yml index 2407d2e6f1a..b4c96c4eef4 100644 --- a/.github/workflows/build_develop.yml +++ b/.github/workflows/build_develop.yml @@ -14,7 +14,7 @@ jobs: name: "Build & Deploy develop.element.io" # Only respect triggers from our develop branch, ignore that of forks if: github.repository == 'element-hq/element-web' - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 environment: develop env: R2_BUCKET: "element-web-develop" diff --git a/.github/workflows/dockerhub.yaml b/.github/workflows/dockerhub.yaml index c8bec61feaf..2fdc66fb338 100644 --- a/.github/workflows/dockerhub.yaml +++ b/.github/workflows/dockerhub.yaml @@ -13,7 +13,7 @@ permissions: jobs: buildx: name: Docker Buildx - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 environment: dockerhub strategy: fail-fast: false diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e0bf8a6b8ec..c3f08deb1d4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,7 +17,7 @@ concurrency: jobs: build: name: GitHub Pages - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Fetch element-desktop uses: actions/checkout@v4 @@ -99,7 +99,7 @@ jobs: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: build steps: - name: Deploy to GitHub Pages diff --git a/.github/workflows/issue_closed.yml b/.github/workflows/issue_closed.yml index ddcd3d12bd9..191f345cc9b 100644 --- a/.github/workflows/issue_closed.yml +++ b/.github/workflows/issue_closed.yml @@ -7,7 +7,7 @@ on: jobs: tidy: name: Tidy closed issues - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/github-script@v7 id: main diff --git a/.github/workflows/pending-reviews.yaml b/.github/workflows/pending-reviews.yaml index f22483547d9..499da6a9b3b 100644 --- a/.github/workflows/pending-reviews.yaml +++ b/.github/workflows/pending-reviews.yaml @@ -9,7 +9,7 @@ concurrency: ${{ github.workflow }} jobs: bot: name: Pending reviews bot - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 environment: Matrix env: URL: "https://github.com/pulls?q=is%3Apr+is%3Aopen+repo%3Amatrix-org%2Fmatrix-js-sdk+repo%3Amatrix-org%2Fmatrix-react-sdk+repo%3Aelement-hq%2Felement-web+repo%3Aelement-hq%2Felement-desktop+review-requested%3A%40me+sort%3Aupdated-desc+" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 799c439f739..0e8c21e7869 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: notify-downstream: name: Trigger release drafter downstream needs: release - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Notify element-desktop repo that element-web release has completed to re-trigger release-drafter uses: benc-uk/workflow-dispatch@e2e5e9a103e331dad343f381a29e654aea3cf8fc # v1 @@ -41,7 +41,7 @@ jobs: check: name: Post release checks needs: release - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Wait for dockerhub uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork diff --git a/.github/workflows/release_prepare.yml b/.github/workflows/release_prepare.yml index f88e10493d6..ce088a93276 100644 --- a/.github/workflows/release_prepare.yml +++ b/.github/workflows/release_prepare.yml @@ -19,7 +19,7 @@ on: default: true jobs: prepare: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout Element Desktop uses: actions/checkout@v4 diff --git a/.github/workflows/static_analysis.yaml b/.github/workflows/static_analysis.yaml index 470e0728925..536f78e18dd 100644 --- a/.github/workflows/static_analysis.yaml +++ b/.github/workflows/static_analysis.yaml @@ -19,7 +19,7 @@ env: jobs: ts_lint: name: "Typescript Syntax Check" - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -81,7 +81,7 @@ jobs: js_lint: name: "ESLint" - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -99,7 +99,7 @@ jobs: style_lint: name: "Style Lint" - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -117,7 +117,7 @@ jobs: workflow_lint: name: "Workflow Lint" - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -135,7 +135,7 @@ jobs: analyse_dead_code: name: "Analyse Dead Code" - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/triage-assigned.yml b/.github/workflows/triage-assigned.yml index 98112d556f2..81d1dff80fd 100644 --- a/.github/workflows/triage-assigned.yml +++ b/.github/workflows/triage-assigned.yml @@ -6,7 +6,7 @@ on: jobs: web-app-team: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: | contains(github.event.issue.assignees.*.login, 't3chguy') || contains(github.event.issue.assignees.*.login, 'andybalaam') || diff --git a/.github/workflows/triage-incoming.yml b/.github/workflows/triage-incoming.yml index 47ed03efe35..e63017dc3be 100644 --- a/.github/workflows/triage-incoming.yml +++ b/.github/workflows/triage-incoming.yml @@ -6,7 +6,7 @@ on: jobs: automate-project-columns: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/add-to-project@main with: diff --git a/.github/workflows/triage-labelled.yml b/.github/workflows/triage-labelled.yml index 0ee40b987ff..0112f180c19 100644 --- a/.github/workflows/triage-labelled.yml +++ b/.github/workflows/triage-labelled.yml @@ -11,7 +11,7 @@ on: jobs: apply_Z-Labs_label: name: Add Z-Labs label for features behind labs flags - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'A-Maths') || contains(github.event.issue.labels.*.name, 'A-Location-Sharing') || @@ -37,7 +37,7 @@ jobs: apply_Help-Wanted_label: name: Add "Help Wanted" label to all "good first issue" and Hacktoberfest - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'good first issue') || contains(github.event.issue.labels.*.name, 'Hacktoberfest') @@ -54,7 +54,7 @@ jobs: move_needs_info_issues: name: X-Needs-Info issues to Need info column on triage board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'X-Needs-Info') steps: @@ -77,7 +77,7 @@ jobs: move_flakey_test_issues: name: Z-Flaky-Test issues to Sized for maintainer column on triage board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'Z-Flaky-Test') steps: @@ -100,7 +100,7 @@ jobs: add_priority_design_issues_to_project: name: P1 X-Needs-Design to Design project board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'X-Needs-Design') && (contains(github.event.issue.labels.*.name, 'S-Critical') && @@ -117,7 +117,7 @@ jobs: add_product_issues: name: X-Needs-Product to product project board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'X-Needs-Product') steps: @@ -128,7 +128,7 @@ jobs: Search_issues_to_board: name: Search issues to project board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'A-New-Search-Experience') steps: @@ -139,7 +139,7 @@ jobs: voip: name: Add labelled issues to VoIP project board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'Team: VoIP') steps: @@ -150,7 +150,7 @@ jobs: verticals_feature: name: Add labelled issues to Verticals Feature project - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'Team: Verticals Feature') steps: @@ -161,7 +161,7 @@ jobs: tech_debt: name: Add labelled issues to tech debt project - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > contains(github.event.issue.labels.*.name, 'A-Developer-Experience') || contains(github.event.issue.labels.*.name, 'A-Documentation') || diff --git a/.github/workflows/triage-move-review-requests.yml b/.github/workflows/triage-move-review-requests.yml index 9d2924c1a92..72d9786a4a9 100644 --- a/.github/workflows/triage-move-review-requests.yml +++ b/.github/workflows/triage-move-review-requests.yml @@ -6,7 +6,7 @@ on: jobs: add_design_pr_to_project: name: Move PRs asking for design review to the design board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: octokit/graphql-action@v2.x id: find_team_members @@ -73,7 +73,7 @@ jobs: add_product_pr_to_project: name: Move PRs asking for design review to the design board - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: octokit/graphql-action@v2.x id: find_team_members diff --git a/.github/workflows/triage-stale-flaky-tests.yml b/.github/workflows/triage-stale-flaky-tests.yml index ab6693675f6..d339a136cd4 100644 --- a/.github/workflows/triage-stale-flaky-tests.yml +++ b/.github/workflows/triage-stale-flaky-tests.yml @@ -4,7 +4,7 @@ on: - cron: "30 1 * * *" jobs: close: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: actions: write issues: write diff --git a/.github/workflows/triage-unlabelled.yml b/.github/workflows/triage-unlabelled.yml index 59d1bf471d1..1cd1c80afc3 100644 --- a/.github/workflows/triage-unlabelled.yml +++ b/.github/workflows/triage-unlabelled.yml @@ -7,7 +7,7 @@ on: jobs: Move_Unabeled_Issue_On_Project_Board: name: Move no longer X-Needs-Info issues to Triaged - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > ${{ !contains(github.event.issue.labels.*.name, 'X-Needs-Info') }} @@ -44,7 +44,7 @@ jobs: remove_Z-Labs_label: name: Remove Z-Labs label when features behind labs flags are removed - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 if: > !(contains(github.event.issue.labels.*.name, 'A-Maths') || contains(github.event.issue.labels.*.name, 'A-Message-Pinning') || diff --git a/.github/workflows/update-jitsi.yml b/.github/workflows/update-jitsi.yml index 71405177d27..68dbf22e631 100644 --- a/.github/workflows/update-jitsi.yml +++ b/.github/workflows/update-jitsi.yml @@ -6,7 +6,7 @@ on: - cron: "0 3 * * 0" # 3am every Sunday jobs: update: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/update-topics.yaml b/.github/workflows/update-topics.yaml index b24c84ad264..a984fc4f038 100644 --- a/.github/workflows/update-topics.yaml +++ b/.github/workflows/update-topics.yaml @@ -18,7 +18,7 @@ concurrency: ${{ github.workflow }} jobs: bot: name: Release topic update - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 environment: Matrix steps: - uses: actions/github-script@v7 @@ -56,7 +56,7 @@ jobs: headers, body: "{}", }); - + let res = await fetch(apiUrl, { method: "GET", headers, @@ -69,7 +69,7 @@ jobs: const data = await res.json(); console.log(roomId, "got event", data); - + const topic = data.topic.replace(regex, releaseTopic); if (topic === data.topic) { console.log(roomId, "nothing to do"); @@ -89,7 +89,7 @@ jobs: }), headers, }); - + if (res.ok) { console.log(roomId, "topic updated:", topic); } else { diff --git a/playwright/e2e/login/login.spec.ts b/playwright/e2e/login/login.spec.ts index 696ecb183c8..e1307f7402d 100644 --- a/playwright/e2e/login/login.spec.ts +++ b/playwright/e2e/login/login.spec.ts @@ -217,7 +217,7 @@ test.describe("Login", () => { const h1 = await page.getByRole("heading", { name: "Verify this device", level: 1 }); await expect(h1).toBeVisible(); - expect(h1.locator(".mx_CompleteSecurity_skip")).not.toBeVisible(); + await expect(h1.locator(".mx_CompleteSecurity_skip")).toHaveCount(0); }); }); }); diff --git a/src/components/structures/GenericDropdownMenu.tsx b/src/components/structures/GenericDropdownMenu.tsx index 3e3d415371c..b323d9b8ade 100644 --- a/src/components/structures/GenericDropdownMenu.tsx +++ b/src/components/structures/GenericDropdownMenu.tsx @@ -106,6 +106,10 @@ type IProps = WithKeyFunction & { AdditionalOptions?: FunctionComponent; }; +function calculateKey(value: T, toKey: ((key: T) => Key) | undefined): Key { + return toKey ? toKey(value) : (value as Key); +} + export function GenericDropdownMenu({ value, onChange, @@ -119,23 +123,24 @@ export function GenericDropdownMenu({ }: IProps): JSX.Element { const [menuDisplayed, button, openMenu, closeMenu] = useContextMenu(); + const valueKey = calculateKey(value, toKey); const selected: GenericDropdownMenuItem | undefined = options .flatMap((it) => (isGenericDropdownMenuGroup(it) ? [it, ...it.options] : [it])) - .find((option) => (toKey ? toKey(option.key) === toKey(value) : option.key === value)); + .find((option) => calculateKey(option.key, toKey) === valueKey); let contextMenuOptions: JSX.Element; if (options && isGenericDropdownMenuGroupArray(options)) { contextMenuOptions = ( <> {options.map((group) => ( {group.options.map((option) => ( { @@ -144,7 +149,7 @@ export function GenericDropdownMenu({ onClose?.(ev); }} adornment={option.adornment} - isSelected={option === selected} + isSelected={calculateKey(option.key, toKey) === valueKey} /> ))} @@ -156,7 +161,7 @@ export function GenericDropdownMenu({ <> {options.map((option) => ( { @@ -165,7 +170,7 @@ export function GenericDropdownMenu({ onClose?.(ev); }} adornment={option.adornment} - isSelected={option === selected} + isSelected={calculateKey(option.key, toKey) === valueKey} /> ))} diff --git a/src/stores/right-panel/RightPanelStore.ts b/src/stores/right-panel/RightPanelStore.ts index 94637b9cd45..9da06580dc5 100644 --- a/src/stores/right-panel/RightPanelStore.ts +++ b/src/stores/right-panel/RightPanelStore.ts @@ -80,6 +80,7 @@ export default class RightPanelStore extends ReadyWatchingStore { if (this.currentCard.phase !== RightPanelPhases.RoomSummary) { this.setCard({ phase: RightPanelPhases.RoomSummary, state: { focusRoomSearch: true } }); } + this.show(null); } } } diff --git a/src/stores/right-panel/RightPanelStoreIPanelState.ts b/src/stores/right-panel/RightPanelStoreIPanelState.ts index deffe045e64..afb74425636 100644 --- a/src/stores/right-panel/RightPanelStoreIPanelState.ts +++ b/src/stores/right-panel/RightPanelStoreIPanelState.ts @@ -40,6 +40,8 @@ export interface IRightPanelCardStateStored { initialEventId?: string; isInitialEventHighlighted?: boolean; initialEventScrollIntoView?: boolean; + // room summary card + focusRoomSearch?: boolean; } export interface IRightPanelCard { @@ -85,6 +87,7 @@ export function convertCardToStore(panelState: IRightPanelCard): IRightPanelCard memberInfoEventId: !!state?.memberInfoEvent?.getId() ? state.memberInfoEvent.getId() : undefined, initialEventId: !!state?.initialEvent?.getId() ? state.initialEvent.getId() : undefined, memberId: !!state?.member?.userId ? state.member.userId : undefined, + focusRoomSearch: state.focusRoomSearch, }; return { state: stateStored, phase: panelState.phase }; @@ -105,6 +108,7 @@ function convertStoreToCard(panelStateStore: IRightPanelCardStored, room: Room): : undefined, initialEvent: !!stateStored?.initialEventId ? room.findEventById(stateStored.initialEventId) : undefined, member: (!!stateStored?.memberId && room.getMember(stateStored.memberId)) || undefined, + focusRoomSearch: stateStored?.focusRoomSearch, }; return { state: state, phase: panelStateStore.phase };