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

Offline banner #374

Open
dansvend opened this issue Jan 29, 2024 · 3 comments
Open

Offline banner #374

dansvend opened this issue Jan 29, 2024 · 3 comments
Labels
feature New functionality

Comments

@dansvend
Copy link
Contributor

Package / App

MAD Components

Description

In mobile apps it's good to know why some functionality might not work as intended, and this could be due to being offline. Having a banner telling the user that the mobile device is disconnected from the internet is a good thing to have on most screens when this happens.

Alternatives

  1. Offline banner telling the user that the device is offline.

  2. A toast telling that the user is offline which expands on press giving the user more details about what happened.

Either way I think this should be shown until the user dismisses it or it should not be dismissible at all.

Other info

No response

@dansvend dansvend added the feature New functionality label Jan 29, 2024
@HaakonSvane
Copy link
Collaborator

I think this functionality would be nice to have in mad core. As I understand, mad navigation has support for custom banners which is used for service messages at the moment only. I think it would be nice to add this there instead of in mad components. Thoughts on this @dansvend and @tormodAase ?

@tormodAase
Copy link
Contributor

I agree! We can put it at the top of the screen along with environment banner and service message

@dansvend
Copy link
Contributor Author

I think this functionality would be nice to have in mad core. As I understand, mad navigation has support for custom banners which is used for service messages at the moment only. I think it would be nice to add this there instead of in mad components. Thoughts on this @dansvend and @tormodAase ?

That will be awesome! It should still be added in MAD Components, and then use it from there and include it in mad-core in the custom headers, right?

We can use @react-native-community/netinfo with a Package Health Score of 89 on Snyk Advisor.

import { useNetInfo } from "@react-native-community/netinfo";
const { isConnected } = useNetInfo();

@tormodAase tormodAase added this to the `mad-core` future features milestone Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

No branches or pull requests

3 participants