C2LC-683: Load world background images dynamically to reduce the initial Weavly dowload size

Metadata

Source
C2LC-683
Type
Task
Priority
N/A
Status
In Progress
Resolution
N/A
Assignee
N/A
Reporter
Simon Bates
Created
2022-12-21T11:07:39.355-0500
Updated
2024-04-24T10:13:04.584-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. Coding Environment

Description

Comments

  • Simon Bates commented 2023-01-10T13:34:27.950-0500

    Today we talked about the dynamic loading of backgrounds in our weekly C2LC meeting and decided to delay implementation of the dynamic loading until we hit a download size of 4MB.

    Not yet handled in the C2LC-683 implementation so far: what to do if the user selects a background and we are unable to download the background, due to loss of internet connection or inconsistent internet connection.

  • Simon Bates commented 2023-01-10T13:38:46.564-0500

    Work-in-progress implementation: https://github.com/sbates-idrc/c2lc-coding-environment/tree/C2LC-683

  • Simon Bates commented 2023-01-10T14:12:43.172-0500

    Also still to address: the following message appears in the output of App.test.js

    Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
            in Scene (created by Context.Consumer)
            in injectIntl(Scene) (at App.js:1479)
            in div (at App.js:1475)
            in div (at App.js:1388)
            in App (created by Context.Consumer)
            in injectIntl(App) (at IntlContainer.js:32)
            in IntlProvider (at IntlContainer.js:29)
            in IntlContainer (at App.test.js:50)
    
          406 |     updateWorldBackground() {
          407 |         getWorldBackground(this.props.theme, this.props.world).then((response) => {
        > 408 |             this.setState((state) => {
              |                  ^
          409 |                 if (response.requestNumber > state.highestReceivedBackgroundRequestNumber) {
          410 |                     return {
          411 |                         background: response.background,
    
  • Simon Bates commented 2024-04-24T10:13:04.584-0400

    Moved to GitHub: https://github.com/codelearncreate/c2lc-coding-environment/issues/461