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

py27 ie11 deprecation warnings #10739

Conversation

nucleogenesis
Copy link
Member

@nucleogenesis nucleogenesis commented May 24, 2023

Summary

Implements banner for deprecation warnings in Device for py2.7 and IE11.

Follow-up Tasks

  • Probably can remove py27...() function and call to sys directly. I'd moved them out of the plugin_data method's scope trying to debug why the Device plugin was failing to enable - I'm wrapping for the day so I'll update this tomorrow
    ~- [ ] Looking to write front-end tests for the banner to put a bow on this ~
  • Not super sure right now on how to test the plugin_data from the backend side and it's fairly low-risk code so I'll probably skip

References

Closes #10482

Reviewer guidance

  • Use IE11 on your server and view content as a sign-in user (if you've used IE11 on this database before, skip this step)

  • Go to Device as super admin and see the warning re: IE11

  • Run the pex using Python 2.7

  • Go to Device as super admin and see the warning re: Python 2.7


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

@github-actions github-actions bot added APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) DEV: backend Python, databases, networking, filesystem... SIZE: medium labels May 24, 2023
@nucleogenesis nucleogenesis force-pushed the enhancement--py27-ie11-deprecation-warnings branch from c6fdbc5 to 0f41ff4 Compare June 5, 2023 20:05
@nucleogenesis nucleogenesis marked this pull request as ready for review June 5, 2023 20:08
@nucleogenesis nucleogenesis requested a review from rtibbles June 5, 2023 20:08
Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Sorry, issue was incomplete - we need to detect two IE11 scenarios and flag accordingly.

If both conditions are true, I think the "this browser is IE11" message should take priority.

showBanner() {
return this.ie11Deprecated || this.py27Deprecated;
},
ie11Deprecated() {
Copy link
Member

@rtibbles rtibbles Jun 8, 2023

Choose a reason for hiding this comment

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

It seems this got skipped from the design, but we scoped strings to handle two scenarios:

  1. The current browser you are using is IE11
  2. Users of this Kolibri are using IE11

At the moment, we are only detecting (2), but the displayed message seems more like (1) is happening to the user.

I have IE11 users on my device, so I see this, in Chrome:

Screenshot from 2023-06-08 13-55-33

We should add an extra paragraph in the IE11 warning, conditionalized on whether there are detected IE11 users on the device, or whether the current browser is IE11. If the former, we should display this above the current message: https://github.com/learningequality/kolibri/blob/develop/kolibri/core/assets/src/mixins/commonCoreStrings.js#L1297 if the latter, we should display this one: https://github.com/learningequality/kolibri/blob/develop/kolibri/core/assets/src/mixins/commonCoreStrings.js#L1292

@nucleogenesis nucleogenesis force-pushed the enhancement--py27-ie11-deprecation-warnings branch from f020524 to 0affbf0 Compare June 13, 2023 20:25
<p v-if="py27Deprecated">
{{ coreString('pythonSupportWillBeDropped') }}
</p>
<p v-if="currentUserOnIE11">
Copy link
Member

Choose a reason for hiding this comment

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

This is showing both texts in the case that both apply:
image

Although, I think it reads OK.

@rtibbles rtibbles merged commit 3a9bb05 into learningequality:develop Jun 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Device Re: Device App (content import/export, facility-syncing, user permissions, etc.) DEV: backend Python, databases, networking, filesystem... SIZE: medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add deprecation warnings for python 2.7 and IE 11
2 participants