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

PWA update sources #30

Merged
merged 5 commits into from
Jul 18, 2024
Merged

PWA update sources #30

merged 5 commits into from
Jul 18, 2024

Conversation

hypebright
Copy link
Contributor

@hypebright hypebright commented May 29, 2024

@DivadNojnarg Since this hard codes the shinyMobile version (which is not ideal), would have to wait for the 2.0.1 release (?). See RinteRface/shinyMobile#261

@@ -18,20 +18,27 @@ const CACHE_NAME = "offline";
// Customize this with a different URL if needed.
const OFFLINE_URL = "offline.html";

async function cacheResources() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: changed this because easier debugging, and better error messages if something goes wrong!

@hypebright hypebright marked this pull request as ready for review July 16, 2024 13:58
@hypebright hypebright requested a review from DivadNojnarg July 16, 2024 13:59
@hypebright
Copy link
Contributor Author

Can be merged once this PR in shinyMobile is merged

// Few tweaks
if (Framework7.device.standalone) {
$("html, body").css({ height: "100vh", width: "100vw" });
if ($(".appbar").length > 0) {
Copy link
Member

Choose a reason for hiding this comment

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

appbar does not exist anymore in Framework7 v8. See here: https://github.com/RinteRface/shinyMobile/blob/master/srcjs/utils/shinyUtils.js#L31. Does it work for you @hypebright. If not, we can leave as is. Let me know.

new Request("/shiny-javascript-1.8.1.1/shiny.min.js", { cache: "reload" })
];

for (const resource of resources) {
Copy link
Member

Choose a reason for hiding this comment

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

thx for improving this

Copy link
Member

@DivadNojnarg DivadNojnarg left a comment

Choose a reason for hiding this comment

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

Only check my comment about the appbar custom style. Maybe not needed anymore

@hypebright
Copy link
Contributor Author

hypebright commented Jul 18, 2024

@DivadNojnarg - we don't need it, I removed it. I also realised the leading (not trailing... 😅) slash needed to go, this was causing issues when deployed on shinyapps.io for instance

Copy link
Member

@DivadNojnarg DivadNojnarg left a comment

Choose a reason for hiding this comment

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

Thanks!

@DivadNojnarg DivadNojnarg merged commit 0faccd8 into master Jul 18, 2024
6 checks passed
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.

2 participants