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

chore(null): strict null fixes for dialog-renderer deps #6223

Merged
merged 4 commits into from
Dec 1, 2022

Conversation

dbjorge
Copy link
Contributor

@dbjorge dbjorge commented Dec 1, 2022

Details

This PR adds a bunch of injected/visualization files to the strictNullCheck set. To do this, I introduced an interface seam for DialogRenderer (since it has dependencies on lots of non-null-clean components) and then did two rounds of yarn null:find/yarn null:autoadd.

I also included a few fixes for dialog-renderer-impl that I started making before deciding to introduce the interface seam. It is intentionally omitted from the strictNullChecks config since it still has non-clean dependencies.

Motivation

See #2869

Context

n/a

Pull request checklist

  • Addresses an existing issue: Codebase should use strict null checks #2869
  • Ran yarn null:autoadd
  • Ran yarn fastpass
  • Added/updated relevant unit test(s) (and ran yarn test)
  • Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). See CONTRIBUTING.md.
  • [n/a] (UI changes only) Added screenshots/GIFs to description above
  • [n/a] (UI changes only) Verified usability with NVDA/JAWS

@dbjorge dbjorge requested a review from a team as a code owner December 1, 2022 04:10
Copy link
Member

@sfoslund sfoslund left a comment

Choose a reason for hiding this comment

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

LGTM!

@dbjorge dbjorge merged commit 8807c7e into microsoft:main Dec 1, 2022
@dbjorge dbjorge deleted the null-20221130-2 branch December 1, 2022 17:21
dbjorge added a commit that referenced this pull request Dec 5, 2022
…#6234)

#### Details

This PR continues from #6223 and fixes another few layers of
`injected/visualization` files to be strict null check compatible. It
substantially refactors `accessibile-name-formatter` and somewhat
refactors `landmark-formatter` - I manually smoke tested those ad hoc
tools to verify that they still worked after the changes

##### Motivation

#2869

##### Context

n/a

#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a"
in the checkbox -->
- [x] Addresses an existing issue: #2869
- [x] Ran `yarn null:autoadd`
- [x] Ran `yarn fastpass`
- [x] Added/updated relevant unit test(s) (and ran `yarn test`)
- [x] Verified code coverage for the changes made. Check coverage report
at: `<rootDir>/test-results/unit/coverage`
- [x] PR title *AND* final merge commit title both start with a semantic
tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). See
`CONTRIBUTING.md`.
- [n/a] (UI changes only) Added screenshots/GIFs to description above
- [n/a] (UI changes only) Verified usability with NVDA/JAWS
dbjorge added a commit that referenced this pull request Dec 6, 2022
…, deps (#6244)

#### Details

This PR continues the work from #6226 and #6223, adding another layer of
injected files to the strict null check list.

The only case with a notable behavioral change is that axe-core
technically documents in its typings that it's allowed to omit a "how to
fix" section from results, but if it were to actually do so, our cards
UI would currently crash. I don't think axe-core actually omits that
info in practice (I suspect it's there to accomodate custom rules), but
now if it were to do so, we'd omit the section from the card rather than
crashing (similar to how we handle results with missing snippets).

This ended up enabling a *lot* of files to be autoadded! It brings us
from ~72% null-strict to ~78%

```markdown
## Web strict-null progress

**78%** complete (**1210**/1561 non-test files)

*Contribute at [#2869](#2869). Last update: Mon Dec 05 2022*
Done in 1.00s.
```

##### Motivation

#2869

##### Context

n/a

#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a"
in the checkbox -->
- [x] Addresses an existing issue: #2869
- [x] Ran `yarn null:autoadd`
- [x] Ran `yarn fastpass`
- [x] Added/updated relevant unit test(s) (and ran `yarn test`)
- [x] Verified code coverage for the changes made. Check coverage report
at: `<rootDir>/test-results/unit/coverage`
- [x] PR title *AND* final merge commit title both start with a semantic
tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). See
`CONTRIBUTING.md`.
- [n/a] (UI changes only) Added screenshots/GIFs to description above
- [n/a] (UI changes only) Verified usability with NVDA/JAWS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants