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

Remove resource bundle #818

Merged
merged 15 commits into from
May 17, 2023
Merged

Remove resource bundle #818

merged 15 commits into from
May 17, 2023

Conversation

OlenaPostindustria
Copy link
Collaborator

@OlenaPostindustria OlenaPostindustria commented Apr 12, 2023

#795

  • remove resource bundle;
  • use a static markup string in the code for companion.html;
  • use base64 encoded data instead of assets;
  • replace local mraid.js and omsdk.js with the scripts hosted on jsdeliver.

@OlenaPostindustria OlenaPostindustria marked this pull request as ready for review April 12, 2023 07:32
@YuriyVelichkoPI
Copy link
Contributor

@OlenaPostindustria , please update the PR and study the opportunity to host mraid.js and omsdk.js on jsdelivr. Details in comments for the issue.

@OlenaPostindustria OlenaPostindustria marked this pull request as ready for review May 15, 2023 10:09
Copy link
Contributor

@YuriyVelichkoPI YuriyVelichkoPI left a comment

Choose a reason for hiding this comment

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

@OlenaPostindustria, please, add the description of managing the remote .js libraries so it can be reproduced on Android.

@OlenaPostindustria
Copy link
Collaborator Author

OlenaPostindustria commented May 17, 2023

To host .js files on jsdelivr.com all we need to do is to paste Github link to file here and convert it to jsdelievr link. Then we can make GET request on that link to download scripts in SDK.

So, the algorithm for managing remote js libraries is as follows:

  1. check if the scripts were already downloaded during SDK initialization: if not => download them;
  2. if the scripts were successfully downloaded - save them in a cache directory named PBMJSLibraries;
  3. if the SDK demands scripts:
    • search for cached library => fetch;
    • if there is no cached library => try to download it.

@ValentinPostindustria for visibility

@OlenaPostindustria OlenaPostindustria mentioned this pull request May 17, 2023
Copy link
Contributor

@YuriyVelichkoPI YuriyVelichkoPI left a comment

Choose a reason for hiding this comment

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

LGTM

@YuriyVelichkoPI YuriyVelichkoPI merged commit 5da76e8 into master May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants