-
-
Notifications
You must be signed in to change notification settings - Fork 727
[Feature branch] The Donation Reminder #5783
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
Conversation
* Create a Donation reminder data class for the configuration * Lint * Simplify * Change to val
* - strings for donation reminders * - order fixes
* - adds DonationReminderActivity, DonationReminderScreen initial code - adds a text with inline element support * - adds other components for the donation reminder screen - code fixes * - adds Donation Field with popup components - adds viewModel logic to retrieve donation amounts and other data - create readable code structure - created ui state data class for compose * - adds an info tooltip and headline icon, text align fix * - adds custom dialog - code re-structure * - ui fixes * - adds snackbar when user confirms the reminder * - adds validators, maximum threshold and ui fixes - adds hardcoded donation frequencies and amounts * - adds proper validation with error icon - adds config call to retrieve min and max amount * - adds donations category in the settings screen - adds donation reminder to setting screen * - updates DonationReminderHelper.kt * - code fixes * - code fixes * - adds "isFromSettings" logic and adds TODO * - code/ui fixes - adds timestamp preference * - code fixes to fit the new DonationReminderConfig * - move DonationReminderHelper.kt to donationreminder package - lint fixes * - adds external experiment link * - code fixes * - optimizes currency format recomposition - code/ui fixes * - converts the dataType articleFrequency and donateAmount to float - - update strings and logic for the float data type * - code fix * - code fixes * - move currency formatting and amount formatting logic to a separate DonateUtil object * - using directly instead of importing * - code fixes * - Adds string resources * - adds generic for selectable Option to handle different number types - ui/string fixes * - code fixes * - code/ui fixes --------- Co-authored-by: Cooltey Feng <[email protected]>
…t comes from (#5816) - adds loading and error state - updates code structure
* Donation reminder: In-article prompt * Set message card height? * Fix height for now * Use post for now * Get a better measure method * Unused import * Set strings and preferences * Update logic and preference * update helper class * Refine card layout * Lint * Handle visibility properly * Update label * Correct monospace - should apply this programmtically * handle bottom space correctly * Adjust the padding and animation * Fix unreachable IDE error * Update space in different cases * Adjust height correctly * Show snackbar message * Update helper class * Add logic for different card messages * donation flow * Add strings and set up donation bottomsheet for donation reminder * Google Pay * References fix * fix lint * make sure the prefs works correctly * Set up Gpay and the flow * Update card height and logic of showing the reminder * Article visit * 15 seconds as valid time spent on an article * Update donate dialog paddings * Set the currency from helper class * Lint * - strings for donation reminders * - order fixes * Update string names * Change d to s * Change d to s #2 * string update * More proper parameter from `d` to `s` * Update strings * Filled amount * Wire filled amount to GooglePay screen * Add filled amount to the list and sort * Fix lint * Update code error * Update imports * Update the logic of showing the prompt * Reset the config after reaching the condition * Lint fix * condition update * Refine the algorithm * Code review comments * Update the get * Refine the logic * reset the active status when enabling the feature * logic update --------- Co-authored-by: williamrai <[email protected]>
…5820) * Add two reset buttons in developer preferences for testing purposes * Use proper title in Settings preference
* Donation reminder: In-article prompt * Set message card height? * Fix height for now * Use post for now * Get a better measure method * Unused import * Set strings and preferences * Update logic and preference * update helper class * Refine card layout * Lint * Handle visibility properly * Update label * Correct monospace - should apply this programmtically * - adds DonationRemindersSurveyGroupAssignment, DonationReminderSurveyState for handling donation reminders survey dialog - adds preference to track the survey dialog state and article visit - copies over code from donation reminder in-prompt PR * handle bottom space correctly * Adjust the padding and animation * Fix unreachable IDE error * Update space in different cases * Adjust height correctly * Show snackbar message * - adds survey dialog - adds strings * Update helper class * Add logic for different card messages * donation flow * Add strings and set up donation bottomsheet for donation reminder * - updates donation reminders survey logic - copies over preference from other donation reminders PR * Google Pay * - code fixes to fit the new DonationReminderConfig * - lint fixes * References fix * fix lint * - lint fixes * make sure the prefs works correctly * Set up Gpay and the flow * Update card height and logic of showing the reminder * Article visit * 15 seconds as valid time spent on an article * Update donate dialog paddings * Set the currency from helper class * Lint * - strings for donation reminders * - order fixes * Update string names * Change d to s * Change d to s #2 * string update * More proper parameter from `d` to `s` * Update strings * Filled amount * Wire filled amount to GooglePay screen * Add filled amount to the list and sort * Fix lint * Update code error * Update imports * Update the logic of showing the prompt * Reset the config after reaching the condition * Lint fix * condition update * Refine the algorithm * Code review comments * Update the get * - adds a TODO * Refine the logic * - code fix * reset the active status when enabling the feature * logic update * - code fix * - code fixes * - code fixes * - survey logic fix * - code fixes --------- Co-authored-by: Cooltey Feng <[email protected]>
* - design fixes * - using window inset for retrieving bottom navigation height - code fixes * - code fixes * - code fixes
…android-wikipedia into donation-reminder-design
app/src/main/java/org/wikipedia/page/leadimages/PageHeaderView.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/wikipedia/donate/donationreminder/DonationReminderViewModel.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Didn't notice the verbiage has been changed 😓 |
…android-wikipedia into donation-reminder-design
The fdroid build failed after this. Reference to proprietary GooglePayComponent directly in main variant is unacceptable, because it bypasses isGooglePayAvailable. @cooltey Please keep it in DonateViewModel. (How come there is no test build on pull requests for each variant...?) |
Phabricator:
https://phabricator.wikimedia.org/T399601