-
Notifications
You must be signed in to change notification settings - Fork 30
Add ios pre warm assets to dcar #14816
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
Open
marjisound
wants to merge
9
commits into
main
Choose a base branch
from
add-ios-pre-warm-asset-to-dcar
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+123
−11
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f38f20c to
0ac2c80
Compare
9caab65 to
ac1c512
Compare
- Add class name to font list in fonts-css.ts - Dynamically create font-face and css classes based on font list and add the styles to rendered-items-assets-template.html - Dynamically create divs with class names from font list in rendered-items-assets-template.html - This is to download the assets on iOS
ac1c512 to
303f9ae
Compare
cd16a1a to
38ab43d
Compare
Co-authored-by: Jamie B <[email protected]>
Co-authored-by: Jamie B <[email protected]>
83031e2 to
dea0a73
Compare
dea0a73 to
f08c8d8
Compare
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I collaborated closely with @arelra and @JamieB-gu on this work. They provided helpful ideas, reviewed approaches, and assisted with testing the changes in the iOS app.
What does this change?
This PR adds a new
GETendpoint in DCAR/assets/rendered-items-assets. This endpoint renders a page that holds the DCAR fonts and the apps client js bundle. We need this asset for ios offline reading. When the iOS app starts, it fetches this html and downloads the linked assets and keep that in cache. Later, when an article is read but the device is offline, requests for these assets are served from the cache.The changes are:
FontDisplaytype infont-css.tsfile to use for class namesThere's also a PR in frontend guardian/frontend#28368 which also adds a new endpoint that calls the DCAR
/assets/rendered-items-assets.Testing
This was tested in CODE by using the debug app in device pointing it to CODE. Below is the image of. the article in offline mode which can access the cached assets (fonts & index.client.apps.js)
The steps of testing:
Fixes #8937