Skip to content

Conversation

cooltey
Copy link
Collaborator

@cooltey cooltey commented Jul 21, 2025

@cooltey cooltey added WIP Work in progress HOLD Will review as soon as other more pressing PRs are merged/released. labels Jul 21, 2025
Williamrai and others added 25 commits July 23, 2025 10:33
* 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]>
Copy link
Member

@dbrant dbrant left a comment

Choose a reason for hiding this comment

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

The text in the card doesn't seem to make sense:
"...you asked us to donate after reading €1."

image

@cooltey
Copy link
Collaborator Author

cooltey commented Aug 15, 2025

The text in the card doesn't seem to make sense: "...you asked us to donate after reading €1."

Done. Didn't notice the verbiage has been changed 😓

@cooltey cooltey requested a review from dbrant August 15, 2025 18:27
@cooltey cooltey added Ready to merge PR passed design signoff and ready to be merged. and removed WIP Work in progress HOLD Will review as soon as other more pressing PRs are merged/released. labels Aug 15, 2025
@dbrant dbrant merged commit d87b6b9 into main Aug 15, 2025
2 checks passed
@dbrant dbrant deleted the donation-reminder-design branch August 15, 2025 19:05
@UjuiUjuMandan
Copy link
Contributor

UjuiUjuMandan commented Sep 3, 2025

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...?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready to merge PR passed design signoff and ready to be merged.
Development

Successfully merging this pull request may close these issues.

4 participants