Skip to content

COMSE-124: Add info modal close control - #298

Merged
noahjalex merged 3 commits into
masterfrom
nalexander/COMSE-124/info-modal-close
Aug 31, 2026
Merged

noahjalex merged 3 commits into
masterfrom
nalexander/COMSE-124/info-modal-close

Conversation

@noahjalex

@noahjalex noahjalex commented Aug 14, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Android's Afterpay information modal had no visible dismissal control; users had to discover system Back.

Solution

Add a fixed-light native header above the WebView with a borderless 48×48dp close action, black X, platform ripple, and Close information modal accessibility label (localized in code via AfterpayString, EN + FR_CA). The control is independent of hosted HTML and does not overlay modal content.

Validation

  • SDK and sample builds, lint, formatting, and 47 unit tests passed
  • Android 14: verified header/WebView hierarchy and X dismissal
  • Before/after screenshots and recordings for Cash App Afterpay (US), Afterpay (AU), and Clearpay (UK): COMSE-124
  • CI passed

Companion hosted-content fix: https://github.com/AfterpayTouch/paylater-static/pull/919

@noahjalex
noahjalex marked this pull request as ready for review August 14, 2026 23:37
@noahjalex
noahjalex force-pushed the nalexander/COMSE-124/info-modal-close branch from e022cff to 70f934d Compare August 17, 2026 19:51
@noahjalex
noahjalex changed the base branch from master to nalexander/fix-zero-minimum August 17, 2026 19:51
@noahjalex
noahjalex force-pushed the nalexander/COMSE-124/info-modal-close branch from 70f934d to 7c73499 Compare August 17, 2026 19:58
@noahjalex
noahjalex changed the base branch from nalexander/fix-zero-minimum to nalexander/fix-sandbox-sample August 17, 2026 19:58
@noahjalex
noahjalex force-pushed the nalexander/COMSE-124/info-modal-close branch from 5539e4d to a53f45b Compare August 24, 2026 15:42
@noahjalex
noahjalex force-pushed the nalexander/COMSE-124/info-modal-close branch from a53f45b to 12ff534 Compare August 31, 2026 18:40
Base automatically changed from nalexander/fix-sandbox-sample to master August 31, 2026 18:43
noahjalex and others added 3 commits August 31, 2026 14:43
Replace the floating circular overlay with a conventional native header
above the WebView.

- Root is a vertical LinearLayout: a fixed-light header, then the WebView
  with layout_weight=1, so web content can never render beneath the
  control instead of relying on z-order and a margin.
- The 48x48dp ImageButton keeps its 24dp glyph, 12dp padding and
  "Close information modal" description, but drops the permanent white
  fill and 4dp elevation in favour of a transparent idle background and
  the standard borderless selectable ripple.
- Colours come from the existing afterpay_white/afterpay_black resources,
  and the now unused afterpay_close_button_background ripple drawable is
  removed.
- AfterpayInfoActivity gets a scoped AfterpayInfoDialog theme so the light
  header sits on coherent black-on-white dialog chrome under a dark system
  theme. Other SDK activities keep AfterpayDialog.

Dismissal behaviour is unchanged. Tests cover the accessibility contract,
the header/WebView hierarchy and the dismissal result.

The layout's end gravity makes lint raise RtlEnabled for the library
manifest. Left as is deliberately: declaring android:supportsRtl in an SDK
manifest would merge into and change RTL behaviour for host apps.

Co-authored-by: Claude Code <noreply@anthropic.com>
Move the close control's content description into the AfterpayString
code-side localization (EN + FR_CA) that the SDK uses for user-facing
strings, keeping an English-only resource default for the layout. Assert
the icon drawable and ripple background in the activity test.
@noahjalex
noahjalex force-pushed the nalexander/COMSE-124/info-modal-close branch from 12ff534 to 3cdcf9b Compare August 31, 2026 18:43
@noahjalex
noahjalex merged commit 564cdb8 into master Aug 31, 2026
2 checks passed
@noahjalex
noahjalex deleted the nalexander/COMSE-124/info-modal-close branch August 31, 2026 18:55
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.

4 participants