Repository navigation
Conversation
Shows the oldest permission or question waiting for the person, with the buttons its notification offers (from PushShown), sent through PushActionReceiver. A tap shows "Sending…" until the reply is sent or fails; a failure keeps the request and shows the existing couldn't-send notification. The small size shows the count and the waiting projects, and nothing waiting shows All Caught Up with the working sessions. PushNotifications now builds the permission and answer intents in one place for the notification and the widget. Verified: scripts/check.sh :feature:system on the VM; every size and state in light and dark and at font 1.3 in the widget lab; pinned on the Pixel launcher, resized to 4x3 and 2x3, and tapped Allow Once (the lab ref has no server, so it showed the failure notification and kept the request).
The widget let the TextView pick its own break points, so a long command
broke after "/" and before "." ("$ ./" alone on the first line), and the
lines it drew could differ from the lines it counted when deciding whether
the whole command is in view.
PushShown.wrapped now returns the lines the existing count was based on
(fill each line, break at spaces, break a longer word at the line's end),
and wrappedLines is its size, so the notification is unchanged. The widget
draws those lines with non-breaking spaces and counts the same list.
CODE_CHARACTER goes from 6.8 to 7.6 dp: a 12sp monospace advance is 7.2 dp,
so a wrapped line never wraps again.
Verified on the emulator with the long-command fixture at 360x220, 360x360,
250x220 and 250x300, at font 1.0 and 1.3, light and dark;
check :feature:system passes.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the Needs You widget: the oldest permission or question waiting for you, with the same buttons its notification offers (from
PushShown), sent throughPushActionReceiver. A tap shows "Sending…" until the reply is sent or fails, and a failure keeps the request on the widget and shows the existing "Couldn't send" notification. The 2x2 shows the count and the waiting projects. With nothing waiting it shows All Caught Up and how many sessions are working.Every image is light | dark from the widget lab, except the last one, which is from the Pixel launcher.
PushNotificationsnow builds the permission and answer intents in one place for both the notification and the widget.PushShowncounts by (fill each line, break at spaces, break a longer word at the line's end), so what is drawn is what is counted.Verified:
check :feature:systempasses on the VM. Every size and state was checked in light and dark and at font 1.3. The widget was pinned and resized on the launcher, and tapping Allow Once there sent the broadcast. The fixture has no real server, so the reply failed, the request stayed, and the failure notification appeared. A successful reply removing the request wasn't checked end to end, because pushes can't reach the emulator.Not included: "Reply by voice" (no existing action does it), and typed replies inside the widget (widgets can't take text input; "Type a reply…" opens the session).
Part of #287