Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Apply strictNullChecks to src/components/views/spaces/* #10517

Merged
merged 22 commits into from
Jun 28, 2023

Conversation

weeman1337
Copy link
Contributor

@weeman1337 weeman1337 commented Apr 5, 2023

closes element-hq/element-web#24942

Checklist

  • 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)

This change is marked as an internal change (Task), so will not be included in the changelog.

src/components/structures/ContextMenu.tsx Outdated Show resolved Hide resolved
src/accessibility/RovingTabIndex.tsx Outdated Show resolved Hide resolved
@t3chguy
Copy link
Member

t3chguy commented Apr 11, 2023

@weeman1337 test failures look legit

@weeman1337 weeman1337 marked this pull request as draft April 11, 2023 12:20
@weeman1337 weeman1337 force-pushed the weeman1337/strictify-spaces-views branch from fb6eadf to 3ee5c14 Compare April 18, 2023 08:29
@weeman1337 weeman1337 changed the title Strictify src/components/views/spaces/* Apply strictNullChecks to src/components/views/spaces/* Apr 18, 2023
@weeman1337 weeman1337 force-pushed the weeman1337/strictify-spaces-views branch from 3ee5c14 to f6eb04f Compare April 18, 2023 09:43
@weeman1337 weeman1337 marked this pull request as ready for review April 18, 2023 11:01
@alunturner
Copy link
Contributor

Approved with the assumption that the TS error in the Modal.createDialog call isn't in scope for this work

@@ -95,9 +95,9 @@ export const SpaceButton = forwardRef<HTMLElement, IButtonProps>(
}

let notifBadge;
if (notificationState) {
if (space && notificationState) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this interests you, but there's now a Typeguards.ts file that has an isNotUndefined helper typeguard for situations like this.

@@ -662,7 +662,7 @@ export const SETTINGS: { [setting: string]: ISetting } = {
},
"custom_themes": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
default: [],
default: false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default: false,
default: [] as ICustomTheme[],

and export ICustomTheme from theme.ts and add its name: string field which seems to be missing

src/settings/Settings.tsx Outdated Show resolved Hide resolved
@t3chguy
Copy link
Member

t3chguy commented Jun 28, 2023

Thanks!!

@t3chguy t3chguy merged commit c0db739 into develop Jun 28, 2023
19 of 20 checks passed
@t3chguy t3chguy deleted the weeman1337/strictify-spaces-views branch June 28, 2023 14:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Apply strictNullChecks to src/components/views/spaces/*
3 participants