-
Notifications
You must be signed in to change notification settings - Fork 210
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
Add manifest.json and cache static assets for offline use #331
Conversation
Fixes #326 Changes: add a manifest.json file and cache static assets for offline use |
@Mridul97 One thing, since the issue is a multi-task issue we don't want to close it with this pull request but the |
I'll test your branch out in my browser now!! |
Oh I didn't know that. Thanks! I will keep that in mind for the future. |
hmm @Mridul97 I was trying this out in my browser and this doesn't seem to work. I'm sorry actually I'm a little busy right now so I'll review this asap. |
Could you please tell that which all files are to be added in cache storage? as there are a lot of files in the project. Thanks! |
I think everything in /examples/ and in /dist/ and that should be everything? |
Ah yes, and some files in /node_modules -- whatever's included into |
I got an idea! One thing we can do is just cache every outgoing request. Since our project does not consume any API as of now that should work perfectly and we'll not miss anything. |
Cool! but if we update any of the files and change the cache name, then the user will have to send each request again to store those files in cache. So will this approach be better than caching all the files on install event in our case? Just a thought. |
Yeah that's true. But since we don't update our files that often anyway (all data is static) it shouldn't be a problem. |
Great! I will implement this approach and push changes. Thanks! |
5aa9a42
to
753cf74
Compare
I have made the changes. Please take a look. @tech4GT |
@tech4GT, would you mind testing this one out? Thanks!
…On Tue, Sep 11, 2018 at 1:28 PM Mridul97 ***@***.***> wrote:
I have made the changes. Please take a look.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#331 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJzwfPkMkUoANBfKjiYZydmY9gGobks5uZ_KSgaJpZM4Wf5VG>
.
|
f4dcd37
to
7786dde
Compare
Having a look at this one now!! Sorry for the delay. |
Hmm, this does not seem to work. I'll try to fix this up and push the changes. |
Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
Hmm, could you please allow edits from maintainers on this. Thanks! |
Allow edits from maintainers check-box is already ticked. Do I have to do anything else to allow edits from maintainers? |
Oh sorry, my bad!! I just made a small change that enables caching on the first page load itself!! Have a look. |
I have made changes to add a button to clear cache. By clicking on the button, all the versions of the cache will be deleted and on next reload latest version of the cache will be saved. I will make the changes to show save time. Please have a look! |
awesome, can you push to your gh-pages? thanks!
…On Fri, Oct 5, 2018 at 1:42 PM Mridul97 ***@***.***> wrote:
I have made changes to add a button to clear cache. By clicking on the
button, all the versions of the cache will be deleted and on next reload
latest version of the cache will be saved. Please have a look!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#331 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ5ZbNYFArDJpSjhTwa2yWRtiVWPkks5uh5nugaJpZM4Wf5VG>
.
|
Done! Please have a look! |
Yes! I think so - i had to do a hard cache flush with: This proves out our case, doesn't it? 😄 I'd like to ask for a style change - can we do this?
Also, sorry -- just thinking ahead -- if somebody does /not/ manually flush the cache, will it still update itself in the background? Why didn't that happen for me? |
Yes, I think it is possible, because I didn't change the cache version. Could you please manually delete the old cache. Thanks! |
Ah, i see. and so for pull requests we should add to the template to change the cache version to ensure people see new changes. With the style changes, can you change the cache version and we'll check to see it works this time? this is good troubleshooting 😄 Finally, let's add a page refresh when you click the "clear cache" button -- otherwise there's no feedback. Make sense? Awesome work! |
Actually it happened because I didn't change the cache version. The cache version is same as before so it didn't update the cache! |
Oh one more thing - can we append the cache version to the clear button, like 👍 👍 👍 |
Awesome! I will make these changes and also change the version of cache this time!! |
I have made the changes. Please have a look! It may happen that changes are not visible at the first time. If that happens then please do not force load the page, just close the tab and open the link again in a new tab. Thanks! |
@jywarren Please have a look! |
It seems to work for me! @tech4GT you too?
…On Mon, Oct 8, 2018 at 12:13 PM Mridul97 ***@***.***> wrote:
@jywarren <https://github.com/jywarren> Please have a look!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#331 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ0v2a4bIBxXa3LUYcUNU9z6FwKerks5ui3mfgaJpZM4Wf5VG>
.
|
@jywarren This looks good! |
oh, Jeff changed the url, it's sequencer.publiclab.org |
SO It should work on examples |
Awesome! |
Merged this after one final check! This is awesome. Great work, everyone! |
Hmm, oddly the cache footer line doesn't seem to be appearing in the demo: https://sequencer.publiclab.org/ i wonder how this happened, but the manifest line seems to be gone? Let's figure out what happened! |
Yikes! This was merged into master, not main. Opening a new PR to rebase and merge again! |
* Add manifest.json * cache static assets for offline use * update cache * add meta theme-color and change static files to be cache * cache the files on network request * caching on first run Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * add a button to clear cache * add styling to clear cache link
…le to crop and overlay module. (#592) * Add manifest.json and cache static assets for offline use (#331) * Add manifest.json * cache static assets for offline use * update cache * add meta theme-color and change static files to be cache * cache the files on network request * caching on first run Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * add a button to clear cache * add styling to clear cache link * Update Modules.js (#452) I've arranged the modules in alphabetical order. * Added a function to parse Input coordinates and added the functionality for crop and overlay modules * Added changed dist files * Revert "Added changed dist files" This reverts commit dbda25a. * Changed function name and added the functionaity to src/utils folder * Added unit test * Added unit test to /test/util
* updated drop down * fixed greyscale (#593) * add local to locally stored modules (#596) * Add drawing rectangles module (#566) * add drawing rectangle module * changes * White balance module (#585) * white baalance module * improved algorithm * limit check * Ability to set background color when "over cropping" to enlarge canvas (#563) * ability to set background color when over cropping to enlarge canvas * changes * Clarify that saved sequence will only be available in this browser (#587) * clarify that saved sequence will only be available in this browser * changes * changes * changes * Added a function to sequencer and then made the functionality available to crop and overlay module. (#592) * Add manifest.json and cache static assets for offline use (#331) * Add manifest.json * cache static assets for offline use * update cache * add meta theme-color and change static files to be cache * cache the files on network request * caching on first run Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * add a button to clear cache * add styling to clear cache link * Update Modules.js (#452) I've arranged the modules in alphabetical order. * Added a function to parse Input coordinates and added the functionality for crop and overlay modules * Added changed dist files * Revert "Added changed dist files" This reverts commit dbda25a. * Changed function name and added the functionaity to src/utils folder * Added unit test * Added unit test to /test/util * Add border thickness and color in DrawRectangle module (#602) * added border thickness functionality * add color functionality
* fixed fastie * fixed greyscale (#593) * add local to locally stored modules (#596) * Add drawing rectangles module (#566) * add drawing rectangle module * changes * White balance module (#585) * white baalance module * improved algorithm * limit check * Ability to set background color when "over cropping" to enlarge canvas (#563) * ability to set background color when over cropping to enlarge canvas * changes * Clarify that saved sequence will only be available in this browser (#587) * clarify that saved sequence will only be available in this browser * changes * changes * changes * Added a function to sequencer and then made the functionality available to crop and overlay module. (#592) * Add manifest.json and cache static assets for offline use (#331) * Add manifest.json * cache static assets for offline use * update cache * add meta theme-color and change static files to be cache * cache the files on network request * caching on first run Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * add a button to clear cache * add styling to clear cache link * Update Modules.js (#452) I've arranged the modules in alphabetical order. * Added a function to parse Input coordinates and added the functionality for crop and overlay modules * Added changed dist files * Revert "Added changed dist files" This reverts commit dbda25a. * Changed function name and added the functionaity to src/utils folder * Added unit test * Added unit test to /test/util * Add border thickness and color in DrawRectangle module (#602) * added border thickness functionality * add color functionality * Bump tape from 4.9.1 to 4.9.2 (#579) Bumps [tape](https://github.com/substack/tape) from 4.9.1 to 4.9.2. - [Release notes](https://github.com/substack/tape/releases) - [Commits](tape-testing/tape@v4.9.1...v4.9.2) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump looks-same from 4.1.0 to 5.0.1 (#559) Bumps [looks-same](https://github.com/gemini-testing/looks-same) from 4.1.0 to 5.0.1. - [Release notes](https://github.com/gemini-testing/looks-same/releases) - [Changelog](https://github.com/gemini-testing/looks-same/blob/master/CHANGELOG.md) - [Commits](gemini-testing/looks-same@v4.1.0...v5.0.1) Signed-off-by: dependabot[bot] <support@dependabot.com> * Bump jsqr from 0.2.2 to 1.1.1 (#532) Bumps [jsqr](https://github.com/cozmo/jsQR) from 0.2.2 to 1.1.1. - [Release notes](https://github.com/cozmo/jsQR/releases) - [Commits](https://github.com/cozmo/jsQR/commits) Signed-off-by: dependabot[bot] <support@dependabot.com> * Update color drop down (#595) * updated drop down * fixed greyscale (#593) * add local to locally stored modules (#596) * Add drawing rectangles module (#566) * add drawing rectangle module * changes * White balance module (#585) * white baalance module * improved algorithm * limit check * Ability to set background color when "over cropping" to enlarge canvas (#563) * ability to set background color when over cropping to enlarge canvas * changes * Clarify that saved sequence will only be available in this browser (#587) * clarify that saved sequence will only be available in this browser * changes * changes * changes * Added a function to sequencer and then made the functionality available to crop and overlay module. (#592) * Add manifest.json and cache static assets for offline use (#331) * Add manifest.json * cache static assets for offline use * update cache * add meta theme-color and change static files to be cache * cache the files on network request * caching on first run Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * add a button to clear cache * add styling to clear cache link * Update Modules.js (#452) I've arranged the modules in alphabetical order. * Added a function to parse Input coordinates and added the functionality for crop and overlay modules * Added changed dist files * Revert "Added changed dist files" This reverts commit dbda25a. * Changed function name and added the functionaity to src/utils folder * Added unit test * Added unit test to /test/util * Add border thickness and color in DrawRectangle module (#602) * added border thickness functionality * add color functionality * rebuild
No description provided.