[Feature Branch] Donation Reminder V3 - #6814
Open
cooltey wants to merge 46 commits into
Open
Conversation
cooltey
requested review from
Williamrai,
dbrant and
voyagerfan
as code owners
August 20, 2026 00:29
DonationReminderV3: follow up reminder UI updates
DonationReminderV3: update presets for the experiment
DonationReminderV3: fixing glitch when dismiss the reminder card
* 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
There was a problem hiding this comment.
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, butKeyboardType.Numberdoes 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.
…ation DonationReminderV3: instrumentation
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.
https://phabricator.wikimedia.org/T435349