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

Usage of window.MSStream preventing typescript upgrade #19046

Closed
dbkr opened this issue Sep 15, 2021 · 3 comments
Closed

Usage of window.MSStream preventing typescript upgrade #19046

dbkr opened this issue Sep 15, 2021 · 3 comments
Labels
A-Developer-Experience good first issue Good for newcomers S-Tolerable Low/no impact on users T-Task Tasks for the team like planning

Comments

@dbkr
Copy link
Member

dbkr commented Sep 15, 2021

We use window.MSStream in https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/toasts/MobileGuideToast.ts#L33 which has been removed by typescript: microsoft/TypeScript-DOM-lib-generator#1029

There's no documentation of why we use this, so we need to either find something else if this isn't appropriate any more, or add it to our types.

@dbkr dbkr added the T-Task Tasks for the team like planning label Sep 15, 2021
@germain-gg germain-gg added this to In discussion in Developer experience via automation Sep 20, 2021
@germain-gg germain-gg moved this from In discussion to Ready to develop in Developer experience Sep 20, 2021
@germain-gg germain-gg added the good first issue Good for newcomers label Sep 20, 2021
@t-moennich
Copy link

t-moennich commented Oct 29, 2021

@dbkr the MSStream check is a common workaround to prevent a false positive detection of IE11.
Microsoft used a silly hack to force websites to show there real look instead of an IE fallback back in 2014, after they improved the rendering on there Windows Phone OS.
See here for an article about it.

This is still somewhat valid, if a user really uses an Windows Phone OS in version 8.1+ nowadays.
But as this OS is more or less dead, I think it's safe to remove the additional check.

@UwUnyaa
Copy link

UwUnyaa commented Dec 22, 2021

It could be possible to use an interface that extends window and defines the type of this value to keep the check in place if necessary.

I don't think that's the case though, as IE isn't in the supported list, and neither is Windows Phone.

@t3chguy
Copy link
Member

t3chguy commented Dec 23, 2021

I added this to the Window interface as part of the upgrade. https://github.com/matrix-org/matrix-react-sdk/blob/7033f8696ae2a82a1fe23eefff6e3bf33ecc4e95/src/@types/global.d.ts#L71

I don't think that's the case though, as IE isn't in the supported list, and neither is Windows Phone.

Yes, but this is used in the MobileGuideToast & permalink handling for mobile_guide - so has to work on more browsers.

@t3chguy t3chguy closed this as completed Dec 23, 2021
Developer experience automation moved this from Ready to develop to Done Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Developer-Experience good first issue Good for newcomers S-Tolerable Low/no impact on users T-Task Tasks for the team like planning
Projects
No open projects
Development

No branches or pull requests

5 participants