Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/forksync #70

Merged
merged 47 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3b7fd88
Update babel monorepo to v7.23.9
renovate[bot] Feb 2, 2024
c19737b
Improve client metadata used for OIDC dynamic registration
t3chguy Feb 15, 2024
aa5024a
Fix Native OIDC for Element Desktop by including ssoid in the url_sta…
t3chguy Feb 15, 2024
b40db8a
Improve client metadata used for OIDC dynamic registration
t3chguy Feb 15, 2024
c73548c
Merge branch 't3chguy/oidc-metadata' into t3chguy/oidc-desktop
t3chguy Feb 16, 2024
c47f8c8
Remove allchange dependency
t3chguy Feb 16, 2024
de46ba0
Remove stale release scripts
t3chguy Feb 16, 2024
9f450c8
Update pull request template to remove allchange behaviours
t3chguy Feb 16, 2024
5880943
Merge pull request #27019 from element-hq/t3chguy/oidc-metadata
t3chguy Feb 19, 2024
88d6340
Merge branch 'develop' into t3chguy/oidc-desktop
t3chguy Feb 19, 2024
7da5e48
Merge pull request #27020 from element-hq/t3chguy/allchange
t3chguy Feb 19, 2024
35fe447
Merge pull request #27017 from element-hq/t3chguy/oidc-desktop
t3chguy Feb 19, 2024
77b9cc1
Bump follow-redirects from 1.15.3 to 1.15.5
dependabot[bot] Feb 20, 2024
4bd9f41
Merge pull request #27039 from element-hq/dependabot/npm_and_yarn/fol…
t3chguy Feb 20, 2024
fea4ae5
Add label to track issues that will be fixed by OIDC
langleyd Feb 20, 2024
3ac0966
Merge pull request #27041 from element-hq/langleyd/add_solved_by_oidc…
langleyd Feb 20, 2024
854a810
add job to automate adding new issues to the new project
langleyd Feb 21, 2024
f372a92
lint
langleyd Feb 21, 2024
bf99ab2
actually lint
langleyd Feb 21, 2024
0e7ee62
Merge pull request #27044 from element-hq/langleyd/add_issues_to_new_…
langleyd Feb 21, 2024
4fb185a
Update dependency @types/jest to v29.5.12
renovate[bot] Feb 21, 2024
4126d68
Update dependency stylelint to v16.2.1
renovate[bot] Feb 21, 2024
0bf0794
Update dependency eslint-plugin-unicorn to v51
renovate[bot] Feb 21, 2024
3b4bc60
Update typescript-eslint monorepo to v7
renovate[bot] Feb 21, 2024
0788253
Merge pull request #26960 from element-hq/renovate/babel-monorepo
t3chguy Feb 21, 2024
31a0dca
Merge branch 'develop' into renovate/stylelint
t3chguy Feb 22, 2024
6e5f2ad
Merge pull request #27052 from element-hq/renovate/eslint-plugin-unic…
t3chguy Feb 22, 2024
ab0c396
Update build_develop.yml
t3chguy Feb 22, 2024
8a71a98
Merge pull request #27049 from element-hq/renovate/jest
t3chguy Feb 22, 2024
1d429cc
Merge pull request #27054 from element-hq/renovate/major-typescript-e…
t3chguy Feb 22, 2024
4b09348
Merge pull request #27050 from element-hq/renovate/stylelint
t3chguy Feb 22, 2024
3e38fd7
Update dependency css-minimizer-webpack-plugin to v6
renovate[bot] Feb 22, 2024
4f5e1bb
Merge pull request #27059 from element-hq/renovate/css-minimizer-webp…
t3chguy Feb 22, 2024
1ead4e1
Update dependency css-loader to v6
renovate[bot] Feb 22, 2024
e03b52b
Update all non-major dependencies
renovate[bot] Feb 23, 2024
ad696bc
Remove unused dependency proxy-agent
t3chguy Feb 23, 2024
03b7aee
prettier
t3chguy Feb 23, 2024
b44719a
Hold back postcss updates
t3chguy Feb 23, 2024
e35d040
Merge pull request #27057 from element-hq/renovate/all-minor-patch
t3chguy Feb 23, 2024
c022ae2
Update config
t3chguy Feb 23, 2024
ade8f79
Merge branch 'develop' of https://github.com/vector-im/element-web in…
t3chguy Feb 23, 2024
432bd34
prettier
t3chguy Feb 23, 2024
465131a
Merge pull request #27058 from element-hq/renovate/css-loader-6.x
t3chguy Feb 23, 2024
282d717
Gather validated OIDC config during autodiscovery (#27047)
t3chguy Feb 23, 2024
f41d468
Update variants/openDesk/build_config.yaml
Feb 26, 2024
4a77466
Merge pull request #27071 from nordeck/charlynguyen/opendesk-widget-t…
dbkr Feb 26, 2024
33f0316
Merge remote-tracking branch 'upstream/develop' into develop
ifaouibadi Feb 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,3 @@
- [ ] Tests written for new code (and old code if feasible)
- [ ] Linter and other CI checks pass
- [ ] Sign-off given on the changes (see [CONTRIBUTING.md](https://github.com/element-hq/element-web/blob/develop/CONTRIBUTING.md))

<!--
If you would like to specify text for the changelog entry other than your PR title, add the following:

Notes: Add super cool feature

For PRs which *only* affect the desktop version, please use:

Notes: none
element-desktop notes: Add super cool feature
-->
3 changes: 3 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@
- name: "Z-Fixed by Element Call"
description: "Issues which can be closed when we move to Element Call"
color: "ededed"
- name: "Z-Fixed-By-OIDC"
description: "Issues which can be closed when we move to OIDC"
color: "ededed"
- name: "Z-Flaky-Test"
description: "A test is raising false alarms"
color: "ededed"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
running-workflow-name: "Build & Deploy develop.element.io"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
check-regexp: ^((?!SonarCloud|SonarQube|issue|board|label|Release).)*$
check-regexp: ^((?!SonarCloud|SonarQube|issue|board|label|Release|prepare).)*$

# We keep the latest develop.tar.gz on R2 instead of relying on the github artifact uploaded earlier
# as the expires after 24h and requires auth to download.
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/triage-incoming.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ jobs:
project: Issue triage
column: Incoming
repo-token: ${{ secrets.ELEMENT_BOT_TOKEN }}

automate-project-columns-next:
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/element-hq/projects/120
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
18 changes: 8 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,8 @@
"@types/tar-js": "^0.3.5",
"@types/ua-parser-js": "^0.7.36",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"allchange": "^1.0.6",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"babel-jest": "^29.0.0",
"babel-loader": "^9.0.0",
"babel-plugin-jsx-remove-data-test-id": "^3.0.0",
Expand All @@ -148,8 +147,8 @@
"concurrently": "^8.0.0",
"copy-webpack-plugin": "^12.0.0",
"cronstrue": "^2.41.0",
"css-loader": "^5.2.7",
"css-minimizer-webpack-plugin": "^5.0.1",
"css-loader": "^6.0.0",
"css-minimizer-webpack-plugin": "^6.0.0",
"dotenv": "^16.0.2",
"eslint": "8.56.0",
"eslint-config-google": "^0.14.0",
Expand All @@ -159,7 +158,7 @@
"eslint-plugin-matrix-org": "^1.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-unicorn": "^50.0.0",
"eslint-plugin-unicorn": "^51.0.0",
"fake-indexeddb": "^5.0.0",
"fetch-mock": "9.11.0",
"fetch-mock-jest": "^1.5.1",
Expand All @@ -177,19 +176,18 @@
"mkdirp": "^3.0.0",
"modernizr": "^3.12.0",
"node-fetch": "^2.6.7",
"postcss": "^8.4.31",
"postcss": "8.4.33",
"postcss-easings": "^2.0.0",
"postcss-hexrgba": "2.0.1",
"postcss-import": "^16.0.0",
"postcss-import": "16.0.0",
"postcss-loader": "^8.1.0",
"postcss-mixins": "^6.2.3",
"postcss-nested": "^4.2.3",
"postcss-preset-env": "^9.3.0",
"postcss-scss": "^4.0.4",
"postcss-simple-vars": "^7.0.1",
"prettier": "3.2.4",
"prettier": "3.2.5",
"process": "^0.11.10",
"proxy-agent": "^6.3.0",
"raw-loader": "^4.0.2",
"react-beautiful-dnd": "^13.1.0",
"rimraf": "^5.0.0",
Expand Down
9 changes: 0 additions & 9 deletions release.sh

This file was deleted.

2 changes: 1 addition & 1 deletion src/vector/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ async function verifyServerConfig(): Promise<IConfigOptions> {
}
}

validatedConfig = AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, true);
validatedConfig = await AutoDiscoveryUtils.buildValidatedConfigFromDiscovery(serverName, discoveryResult, true);
} catch (e) {
const { hsUrl, isUrl, userId } = await Lifecycle.getStoredSessionVars();
if (hsUrl && userId) {
Expand Down
24 changes: 23 additions & 1 deletion src/vector/platform/ElectronPlatform.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import { BreadcrumbsStore } from "matrix-react-sdk/src/stores/BreadcrumbsStore";
import { UPDATE_EVENT } from "matrix-react-sdk/src/stores/AsyncStore";
import { avatarUrlForRoom, getInitialLetter } from "matrix-react-sdk/src/Avatar";
import DesktopCapturerSourcePicker from "matrix-react-sdk/src/components/views/elements/DesktopCapturerSourcePicker";
import { OidcRegistrationClientMetadata } from "matrix-js-sdk/src/matrix";

import VectorBasePlatform from "./VectorBasePlatform";
import { SeshatIndexManager } from "./SeshatIndexManager";
Expand All @@ -56,6 +57,8 @@ interface SquirrelUpdate {
updateURL: string;
}

const SSO_ID_KEY = "element-desktop-ssoid";

const isMac = navigator.platform.toUpperCase().includes("MAC");

function platformFriendlyName(): string {
Expand Down Expand Up @@ -377,7 +380,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
public getSSOCallbackUrl(fragmentAfterLogin: string): URL {
const url = super.getSSOCallbackUrl(fragmentAfterLogin);
url.protocol = "element";
url.searchParams.set("element-desktop-ssoid", this.ssoID);
url.searchParams.set(SSO_ID_KEY, this.ssoID);
return url;
}

Expand Down Expand Up @@ -435,4 +438,23 @@ export default class ElectronPlatform extends VectorBasePlatform {
await this.ipc.call("clearStorage");
} catch (e) {}
}

public get baseUrl(): string {
// This configuration is element-desktop specific so the types here do not know about it
return (SdkConfig.get() as unknown as Record<string, string>)["web_base_url"] ?? "https://app.element.io";
}

public async getOidcClientMetadata(): Promise<OidcRegistrationClientMetadata> {
const baseMetadata = await super.getOidcClientMetadata();
return {
...baseMetadata,
applicationType: "native",
// XXX: This should be overridable in config
clientUri: "https://element.io",
};
}

public getOidcClientState(): string {
return `:${SSO_ID_KEY}:${this.ssoID}`;
}
}
3 changes: 3 additions & 0 deletions test/app-tests/loading-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ describe("loading:", function () {
// Pass the liveliness checks
httpBackend.when("GET", "/versions").respond(200, { versions: SERVER_SUPPORTED_MATRIX_VERSIONS });
httpBackend.when("GET", "/_matrix/identity/v2").respond(200, {});
httpBackend
.when("GET", "/_matrix/client/unstable/org.matrix.msc2965/auth_issuer")
.respond(404, { errcode: "M_UNRECOGNIZED", error: "Unrecognized request" });

return sleep(1)
.then(async () => {
Expand Down
10 changes: 5 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"declaration": true,
"jsx": "react",
"lib": ["es2021", "dom", "dom.iterable"],
"strict": true,
"strict": true
},
"include": [
"./node_modules/matrix-js-sdk/src/@types/*.d.ts",
Expand All @@ -26,12 +26,12 @@
"./src/**/*.tsx",
"./test/**/*.ts",
"./test/**/*.tsx",
"./scripts/*.ts",
"./scripts/*.ts"
],
"ts-node": {
"files": true,
"moduleTypes": {
"*": "cjs",
},
},
"*": "cjs"
}
}
}
3 changes: 2 additions & 1 deletion variants/openDesk/build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
# The values of this are provided to `yarn add` for inclusion.
modules:
- "@nordeck/element-web-guest-module@1.0.0"
- "@nordeck/element-web-opendesk-module@0.3.0"
- "@nordeck/element-web-opendesk-module@0.4.0"
- "@nordeck/element-web-widget-lifecycle-module@1.0.1"
- "@nordeck/element-web-widget-toggles-module@0.1.0"
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ module.exports = (env, argv) => {
options: {
importLoaders: 1,
sourceMap: true,
esModule: false,
},
},
{
Expand Down Expand Up @@ -409,6 +410,7 @@ module.exports = (env, argv) => {
options: {
importLoaders: 1,
sourceMap: true,
esModule: false,
},
},
{
Expand Down
Loading