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

Disable Watch tab when offline #1028

Closed

Conversation

jas14
Copy link
Contributor

@jas14 jas14 commented Sep 15, 2024

A small part of #462.

Android

offline.online.webm

iOS

The Cupertino design language discourages disabled buttons (Material doesn't seem to have anything against it):

Don’t disable or hide tab bar buttons, even when their content is unavailable. Having tab bar buttons available in some cases but not others makes your app’s interface appear unstable and unpredictable. If a section is empty, explain why its content is unavailable.

So I haven't modified the iOS widgets. If we'd prefer to keep the design consistent, we can of course just close this PR, but we should update the description of #462 accordingly.

@jas14 jas14 force-pushed the 462-improve-offline-mode/disable-watch branch 3 times, most recently from ecfb126 to 359eef9 Compare September 15, 2024 01:21
@jas14 jas14 force-pushed the 462-improve-offline-mode/disable-watch branch from 359eef9 to 88959d1 Compare September 15, 2024 01:21
Comment on lines +68 to +73
switch (this) {
case BottomTab.watch:
return isOnline;
default:
return true;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suppose I could have done

return this == BottomTab.watch && isOnline;

but wanted to keep the format symmetric to the other enum enhancements.

@veloce
Copy link
Contributor

veloce commented Sep 15, 2024

Thanks for this PR.

I have never seen a disabled bottom tab bar button on android. So while they don't explicitly discourage doing that, I think it is better to keep the design consistent and follow iOS recommendations on all platforms. What do you think?

@jas14
Copy link
Contributor Author

jas14 commented Sep 15, 2024

Sounds reasonable to me, I'll see what I can do about the parts of the linked issue :)

@jas14 jas14 closed this Sep 15, 2024
@jas14 jas14 deleted the 462-improve-offline-mode/disable-watch branch September 15, 2024 16:26
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