Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[✨] Ability to handle "no internet" mode #105

Closed
shairez opened this issue Oct 22, 2022 · 5 comments
Closed

[✨] Ability to handle "no internet" mode #105

shairez opened this issue Oct 22, 2022 · 5 comments
Assignees
Labels
[STAGE-2] incomplete implementation Remove this label when implementation is complete [STAGE-2] not fully covered by tests yet Remove this label when tests are verified to cover the implementation [STAGE-2] unresolved discussions left Remove this label when all critical discussions are resolved on the issue [STAGE-3] docs changes not added yet Remove this label when the necessary documentation for the feature / change is added [STAGE-3] missing 2 reviews for RFC PRs Remove this label when at least 2 core team members reviewed and approved the RFC implementation

Comments

@shairez
Copy link
Contributor

shairez commented Oct 22, 2022

Is your feature request related to a problem?

On a mobile device, when users go offline randomly, prefetching might not work

Then a user can click a button, and just see no response.

Describe the solution you'd like

Idea: a way for either the Qwik Loader or some other plugin that get prefetched first to let the user know that code is not loaded because they are offline.

So once a user clicks the button, they see a message (which could be a generic one customized by the app's devs) that interactivity is not possible because they are offline.

This is still a rough idea, but I think it's going to be a common use case where prefetching might fail and users won't know why the app looks interactive but it's not.

Describe alternatives you've considered

  1. Qwik loader hook
  2. Another plugin that gets prefetched by default after the html loads (though it might suffer from the same problem ironically)

Additional context

No response

@manucorporat
Copy link

it could be implemented by qwikloader emiting an event, that can be captured by other code to handle it:
https://github.com/BuilderIO/qwik/blob/main/packages/qwik/src/qwikloader.ts

@wmertens
Copy link
Member

How about a fallback in case there's no event handler, that just displays an alert?

@PatrickJS PatrickJS self-assigned this May 23, 2024
@PatrickJS
Copy link
Member

this is similar to trying to handle skew issue so I'll assign it to myself to figure it out

@genki
Copy link

genki commented Jul 9, 2024

I think there should be a handler for fail of the dynamic import in the qwikloader.

The handler should do

  • handle the error and enqueue the failed import.
  • listen to the "online" event of the window object in order to re-import the failed imports.
  • resolve the promise of the import after the success of the re-import.

The developers should suppose

  • every execution of the QRL can fail when the network is offline.
  • to provide error message for that
  • or to wait for the network is online again and the QRL being re-executed.

So the QRL may have information to determine that the execution would fail on offline or wait for online.

@maiieul maiieul changed the title Ability to handle "no internet" mode [✨] Ability to handle "no internet" mode Aug 17, 2024
@gioboa
Copy link
Member

gioboa commented Oct 14, 2024

We moved this issue to qwik-evolution repo to create a RFC discussion for this.
Here is our Qwik RFC process thanks.

@gioboa gioboa transferred this issue from QwikDev/qwik Oct 14, 2024
@github-actions github-actions bot added [STAGE-2] incomplete implementation Remove this label when implementation is complete [STAGE-2] not fully covered by tests yet Remove this label when tests are verified to cover the implementation [STAGE-2] unresolved discussions left Remove this label when all critical discussions are resolved on the issue [STAGE-3] docs changes not added yet Remove this label when the necessary documentation for the feature / change is added [STAGE-3] missing 2 reviews for RFC PRs Remove this label when at least 2 core team members reviewed and approved the RFC implementation labels Oct 14, 2024
@QwikDev QwikDev locked and limited conversation to collaborators Oct 14, 2024
@gioboa gioboa converted this issue into discussion #181 Oct 14, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
[STAGE-2] incomplete implementation Remove this label when implementation is complete [STAGE-2] not fully covered by tests yet Remove this label when tests are verified to cover the implementation [STAGE-2] unresolved discussions left Remove this label when all critical discussions are resolved on the issue [STAGE-3] docs changes not added yet Remove this label when the necessary documentation for the feature / change is added [STAGE-3] missing 2 reviews for RFC PRs Remove this label when at least 2 core team members reviewed and approved the RFC implementation
Projects
None yet
Development

No branches or pull requests

6 participants