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

Prevent Cypress typechecking react-sdk components without strict mode#12053

Merged
t3chguy merged 2 commits intodevelopfrom
t3chguy/cr/157-1
Dec 14, 2023
Merged

Prevent Cypress typechecking react-sdk components without strict mode#12053
t3chguy merged 2 commits intodevelopfrom
t3chguy/cr/157-1

Conversation

@t3chguy
Copy link
Member

@t3chguy t3chguy commented Dec 14, 2023

For https://github.com/element-hq/customer-retainer/issues/157

This prevented us from switching to forwardRef in a bunch of places due to it behaving different with & without strict mode.


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

This prevented us from switching to `forwardRef` in a bunch of places
due to it behaving different with & without strict mode.

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy t3chguy added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Dec 14, 2023
Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

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

Looks perfectly sensible, but I don't really understand it. Does this just remove things that fail the without-strict type check? Or does it turn off a check in some way?

@t3chguy
Copy link
Member Author

t3chguy commented Dec 14, 2023

The important bit is it ditches the SettingsStore import by ditching most of the code that needed it and stubbing the types for the rest. SettingsStore imports half the app which means that a load of our code (critically AccessibleButton) gets typechecked without strict mode if you import SettingsStore in Cypress.

@t3chguy t3chguy added this pull request to the merge queue Dec 14, 2023
Merged via the queue into develop with commit f8d87f0 Dec 14, 2023
@t3chguy t3chguy deleted the t3chguy/cr/157-1 branch December 14, 2023 18:18
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.

2 participants