Skip to content

[Feature Branch] Donation Reminder V3 - #6814

Open
cooltey wants to merge 46 commits into
mainfrom
donationReminderV3_design
Open

[Feature Branch] Donation Reminder V3#6814
cooltey wants to merge 46 commits into
mainfrom
donationReminderV3_design

Conversation

@cooltey

@cooltey cooltey commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

@cooltey cooltey added the WIP Work in progress label Aug 20, 2026
cooltey and others added 25 commits August 20, 2026 13:57
DonationReminderV3: follow up reminder UI updates
DonationReminderV3: update presets for the experiment
DonationReminderV3: fixing glitch when dismiss the reminder card
voyagerfan and others added 15 commits August 28, 2026 12:02
* relocate tooltip, remove conditional show of donation switch

* initial updates to maybe later screen

* update experimental banner icon to beta

* update UI, add textfield, wire up source and state

* update qq-strings

* update default selections to first preset chip

* wire up textfield error states

* lint

* remove rememberSaveable - causing activity crash

* keyboardtype

* reset the state for the textfield

* guard the confirm button with textfield has an error

* update to error when textfield is blank

* swap over to onfocuschange, trigger error when blank

* add focusManager, OptionSelector resets state

* default to first value

* update logic for default vals

* add default logic to custom texfield

* retain custom value state

* reorganize code

* add custom amount string

* remove unused params

* add string and icon

* guard icon with if

* adjust alignment of lazyrow

* update subheader text

* adjust size of button text

* lint

* prevent keyboard from overrunning the textfield

* make error view visible

* lint

* sort the presets

* remove bottom buttons if keyboard is exposed

* remove loadData from parent composable, add to init to avoid recomopositon data resetting

* add focusRequester to retain focus on screen rotation

* update whenever I read string

* update icon colors to inactiveColor

* add back isFromSettings guard for donation switch

* formatting

* remove unecessary row

* remove lazy row

* remove .sorted() from updateDonationPresets

* guard against initial error, prevent saving 0 from settings screen

* lint

* update selected value from textfield only if textfield is not blank

* restore selection highlighting

* hoisting error state, wiring in error to button

* remove error state when Preset is selected

* reset errorstate when preset is chosen

* remove duplicate error state tracking

* consolidate error function

* minor fixes

* lint

---------

Co-authored-by: Cooltey Feng <cfeng@wikimedia.org>
DonationReminderV3: optimize the card presentation
Follow-up: Donation Reminder V3 settings screen

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates Donation Reminder V3’s experiment, configuration UI, reminder card, analytics, and donation presets.

Changes:

  • Expands the reminder experiment to three groups and Netherlands eligibility.
  • Redesigns reminder configuration and custom amount entry.
  • Reworks article-header sizing and reminder-card presentation.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
view_page_header.xml Adjusts reminder-card spacing.
view_donation_reminder_card.xml Restyles card content and actions.
ic_experiment_24dp.xml Adds the beta experiment icon.
PageFragment.kt Tracks dynamic card height.
PageHeaderView.kt Measures and displays the revised card.
LeadImagesHandler.kt Updates header margins without reloading pages.
CampaignDialog.kt Logs three experiment groups and exposure.
EditPreviewFragment.kt Adopts floating-point card height.
DonationReminderViewModel.kt Adds preset selection state and V3 options.
DonationReminderScreen.kt Redesigns configuration controls and validation.
DonationReminderHelper.kt Defines V3 eligibility, groups, and presets.
DonationReminderCardView.kt Simplifies reminder title rendering.
DonationReminderAbTest.kt Expands assignment to three groups.
JavaScriptActionHandler.kt Converts card height for web margins.
CommunicationBridge.kt Updates the card-height contract.
GooglePayActivity.kt Applies experimental donation presets.
Suppressed comments (2)

app/src/main/java/org/wikipedia/donate/donationreminder/DonationReminderScreen.kt:346

  • The previous validation guarded the upper-bound check when no maximum was available. Here, a missing config/fallback leaves maximumAmount == 0f, causing every nonnegative custom amount to be reported as over the maximum. Restore the positive-maximum guard.
            parsedCustomAmount >= uiState.donationAmount.maximumAmount -> {

app/src/main/java/org/wikipedia/donate/donationreminder/DonationReminderScreen.kt:588

  • This field stores a Float, but KeyboardType.Number does not request a decimal separator from the soft keyboard. Users cannot conveniently enter fractional donation amounts, unlike the removed dialog which explicitly enabled decimals. Use the decimal keyboard type.
            keyboardType = KeyboardType.Number,

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/src/main/java/org/wikipedia/donate/donationreminder/DonationReminderScreen.kt Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP Work in progress

Development

Successfully merging this pull request may close these issues.

3 participants