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

Issue/21283 no connection message #21287

Merged
merged 9 commits into from
Oct 8, 2024
Merged

Conversation

nbradbury
Copy link
Contributor

@nbradbury nbradbury commented Oct 8, 2024

Fixes #21283

Prior to this PR, there were a few places in the app where the user would see both "No network available" and "There is no network available" when there's no network connection. This PR changes this so only the second message appears, and a Retry button was added to the self-hosted user list for consistency.

The following four areas contain this change:

  • SelfHostedUserComposables - self-hosted user list
  • GifMediaDataSource - adding to media library from Tenor
  • StockMediaDataSource - adding to media library from free photo library
  • MediaLibraryDataSource - adding media to a post from WP media library

media-library

@dangermattic
Copy link
Collaborator

dangermattic commented Oct 8, 2024

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Oct 8, 2024

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr21287-d1699b2
Commitd1699b2
Direct Downloadwordpress-prototype-build-pr21287-d1699b2.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Oct 8, 2024

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr21287-d1699b2
Commitd1699b2
Direct Downloadjetpack-prototype-build-pr21287-d1699b2.apk
Note: Google Login is not supported on these builds.

@nbradbury nbradbury marked this pull request as ready for review October 8, 2024 10:40
@nbradbury nbradbury marked this pull request as draft October 8, 2024 11:24
Copy link

codecov bot commented Oct 8, 2024

Codecov Report

Attention: Patch coverage is 8.57143% with 32 lines in your changes missing coverage. Please review.

Project coverage is 40.23%. Comparing base (1281a8b) to head (d1699b2).
Report is 10 commits behind head on trunk.

Files with missing lines Patch % Lines
...id/ui/selfhostedusers/SelfHostedUserComposables.kt 0.00% 25 Missing ⚠️
...ndroid/ui/selfhostedusers/SelfHostedUsersScreen.kt 0.00% 5 Missing ⚠️
...oid/ui/selfhostedusers/SelfHostedUsersViewModel.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #21287      +/-   ##
==========================================
- Coverage   40.24%   40.23%   -0.01%     
==========================================
  Files        1535     1535              
  Lines       70232    70241       +9     
  Branches    11545    11549       +4     
==========================================
- Hits        28262    28259       -3     
- Misses      39523    39535      +12     
  Partials     2447     2447              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nbradbury nbradbury marked this pull request as ready for review October 8, 2024 11:54
Copy link
Member

@dcalhoun dcalhoun left a comment

Choose a reason for hiding this comment

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

Nice improvement. 👏🏻 Thanks for doing this. The following are suggestions we could implement now or later.

The a11y label for the offline image (struck through cloud) has an odd, likely outdated alt text of "Person reading device with notifications." In fact, I noted several images use this same alt text (e.g., device media permissions illustration).

I note that when a search field is focused, a screen reader is unable to access the network offline message. One can only move focus to the visible illustration, which includes the aforementioned odd alt text. I.e., when the search field is focused, it is not clear at all that a lack of network connection will disrupt the experience. If one dismisses the virtual keyboard, then you can move screen reader focus to the error message and retry button. This experience is present within the GIF library, free stock media, and editor media insert flows.

Additionally, I note there are slight divergences for the design of these screens. Some of it likely pre-existed, unsure if the new Users screen differences were intentional.

Media Add Media Insert Users
android-media-add android-media-insert android-users

@nbradbury
Copy link
Contributor Author

The a11y label for the offline image (struck through cloud) has an odd, likely outdated alt text of "Person reading device with notifications."

Oh, that's not good. Looks like the pre-existing offline screens all use a custom view (ActionableEmptyView) which has that contentDescription hard-coded to that string. For this I think the best thing is to remove the contentDescription since the image isn't really important.

I note that when a search field is focused, a screen reader is unable to access the network offline message...

I filed #21288 for this as it's a pre-existing issue.

I note there are slight divergences for the design of these screens.

Thanks for catching that! I've adjusted the user list offline image size, margin, & tint to more closely match the pre-existing screens.

The user list Retry button is rounded because that screen uses Material 3 which defaults to rounded buttons, whereas the other screens use Material 2. I've changed the user list button to match the pre-existing screens

Copy link

sonarcloud bot commented Oct 8, 2024

@nbradbury nbradbury merged commit e3de8c4 into trunk Oct 8, 2024
21 checks passed
@nbradbury nbradbury deleted the issue/21283-no-connection-message branch October 8, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve wording of no connection message
4 participants