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

IE is not a modern browser #8768

Merged
merged 1 commit into from
Nov 22, 2021

Conversation

indirectlylit
Copy link
Contributor

@indirectlylit indirectlylit commented Nov 22, 2021

Summary

The passesRequirements function was returning true because IE was not included in the requirements.

References

fixes #5939

Reviewer guidance

The behavior of passesRequirements was surprising at first, but it makes sense.

That said, the solution feels like a hack. Is there a better way?


Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

PR process

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@indirectlylit indirectlylit mentioned this pull request Nov 22, 2021
9 tasks
@indirectlylit indirectlylit added this to the 0.15.0 milestone Nov 22, 2021
@indirectlylit indirectlylit added the TODO: needs review Waiting for review label Nov 22, 2021
@@ -30,6 +30,9 @@ const modernFontBrowsers = {
major: 11,
minor: 4,
},
IE: {
major: 100, // specify impossible IE version, forcing passesRequirements to fail
Copy link
Member

Choose a reason for hiding this comment

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

Hrm, maybe the alternative is to cause passesRequirements to return false as the else to this clause?
https://github.com/learningequality/kolibri/blob/release-v0.15.x/kolibri/core/assets/src/utils/browserInfo.js#L21

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's what I did at first, until I read that the docstring which says

It does this in a permissive way, whereby if no specification is made for a particular browser name, then it will return true.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think the guy who wrote might have meant it to, because of this use of the same function:

if (!passesRequirements(browser, minimumBrowserRequirements)) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this makes sense to handle unknown or strange new browsers

Copy link
Member

Choose a reason for hiding this comment

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

I think this is probably fine for now, but we can update the behaviour of passesRequirements when we move to using this explicit allowed list of supported browsers: https://github.com/learningequality/kolibri/blob/release-v0.15.x/packages/browserslist-config-kolibri/index.js#L1

@rtibbles rtibbles merged commit d5eca36 into learningequality:release-v0.15.x Nov 22, 2021
@indirectlylit
Copy link
Contributor Author

indirectlylit commented Nov 23, 2021

@radinamatic would you mind verifying this fix for the IE font loading issue #5939? It should be present in the latest force-pushed version of #8756

@indirectlylit indirectlylit deleted the ie branch November 23, 2021 15:35
@radinamatic
Copy link
Member

True, I can confirm in the build from this PR that non-Latin fonts are not loading anymore by default on every refresh, and all language labels are present in IE11.

Win7 (start)  Running  - Oracle VM VirtualBox_002

These issues were still extant in the latest build from #8756 that I tested yesterday, but I could repeat the test to be sure 👍🏽

@indirectlylit
Copy link
Contributor Author

all language labels are present in IE11

nice! I did not expect that to be addressed yet 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TODO: needs review Waiting for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

All noto-full Non-Latin Families are downloaded on IE11
3 participants