Commit d87b6b9
[Feature branch] The Donation Reminder (#5783)
* Add donation reminder helper class for T399605
* Update comment
* Update helper config
* Create a Donation reminder data class for the configuration (#5802)
* Create a Donation reminder data class for the configuration
* Lint
* Simplify
* Change to val
* Move donation reminder helper to the sub package
* Fix lint
* Strings for donation reminders (#5812)
* - strings for donation reminders
* - order fixes
* Donation reminder set-up form (#5786)
* - 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]>
* - updates logic which shows toggle or confirm button based on where it comes from (#5816)
- adds loading and error state
- updates code structure
* Use strings item instead of hard-coded text
* - code fix (#5819)
* Donation reminder: In-article prompt (#5787)
* 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]>
* Use proper title for Settings and add two buttons for QA purposes. (#5820)
* Add two reset buttons in developer preferences for testing purposes
* Use proper title in Settings preference
* Donation Reminders Survey (#5794)
* 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]>
* - updates userGroup "B" logic to show survey dialog on next time user sees milestone reminder (#5823)
* Donation Reminders Instrumentation (#5822)
* - adds instrumentation
* - adds instrumentation and adds defaultValues to SelectableOption data class
* - adds new campaign_id for donation reminder
- adds instrumentation and isNavigatingToExternalUrl to safeguard against saving reminder if user navigates using external link
* - adds TODO
* - instrumentation fixes for gpay_sucess
* Code format updated
---------
Co-authored-by: Cooltey Feng <[email protected]>
* Survey Instrumentation Donation Reminders (#5835)
* - adds user groups as action data for sending survey events
* - code fixes
* Design review fix
* Update margins
* Border to use 1dp
* Remove unused thank you message
* Donation reminder UI fixes (#5843)
* - design fixes
* - using window inset for retrieving bottom navigation height
- code fixes
* - code fixes
* - code fixes
* Update experiment end date
* Design fix: add horizontal paddings to the about button
* Code review comments and update experiment date
* Lint
* String.
* Use translated strings in preferences category
* Unrelated change
---------
Co-authored-by: William Rai <[email protected]>
Co-authored-by: williamrai <[email protected]>
Co-authored-by: Dmitry Brant <[email protected]>
Co-authored-by: Dmitry Brant <[email protected]>1 parent 7f91b84 commit d87b6b9
File tree
39 files changed
+2184
-140
lines changed- app/src
- extra/java/org/wikipedia/donate
- main
- java/org/wikipedia
- analytics/eventplatform
- bridge
- compose/components
- donate
- donationreminder
- edit/preview
- page
- leadimages
- settings
- dev
- util
- views
- res
- drawable
- layout
- values-it
- values-qq
- values
- xml
39 files changed
+2184
-140
lines changedLines changed: 33 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
180 | | - | |
| 181 | + | |
| 182 | + | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
| |||
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
222 | | - | |
223 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
224 | 230 | | |
225 | 231 | | |
226 | 232 | | |
227 | | - | |
| 233 | + | |
228 | 234 | | |
229 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
230 | 239 | | |
| 240 | + | |
231 | 241 | | |
232 | 242 | | |
233 | 243 | | |
234 | 244 | | |
235 | 245 | | |
236 | 246 | | |
237 | 247 | | |
238 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
239 | 256 | | |
240 | 257 | | |
241 | 258 | | |
| |||
254 | 271 | | |
255 | 272 | | |
256 | 273 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
| 274 | + | |
268 | 275 | | |
269 | 276 | | |
270 | 277 | | |
| |||
306 | 313 | | |
307 | 314 | | |
308 | 315 | | |
| 316 | + | |
309 | 317 | | |
310 | | - | |
| 318 | + | |
311 | 319 | | |
312 | 320 | | |
313 | 321 | | |
| 322 | + | |
314 | 323 | | |
315 | 324 | | |
316 | 325 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
Lines changed: 19 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | | - | |
| 29 | + | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
35 | 33 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 34 | + | |
41 | 35 | | |
42 | | - | |
| 36 | + | |
43 | 37 | | |
44 | 38 | | |
45 | | - | |
| 39 | + | |
46 | 40 | | |
47 | 41 | | |
48 | | - | |
| 42 | + | |
49 | 43 | | |
50 | 44 | | |
51 | 45 | | |
52 | | - | |
| 46 | + | |
53 | 47 | | |
54 | 48 | | |
55 | 49 | | |
56 | 50 | | |
57 | 51 | | |
58 | 52 | | |
59 | | - | |
| 53 | + | |
60 | 54 | | |
61 | 55 | | |
62 | 56 | | |
63 | 57 | | |
64 | 58 | | |
65 | 59 | | |
66 | 60 | | |
67 | | - | |
| 61 | + | |
68 | 62 | | |
69 | 63 | | |
70 | 64 | | |
| |||
75 | 69 | | |
76 | 70 | | |
77 | 71 | | |
78 | | - | |
79 | | - | |
| 72 | + | |
80 | 73 | | |
81 | 74 | | |
82 | 75 | | |
| |||
94 | 87 | | |
95 | 88 | | |
96 | 89 | | |
97 | | - | |
| 90 | + | |
98 | 91 | | |
99 | 92 | | |
100 | 93 | | |
| |||
107 | 100 | | |
108 | 101 | | |
109 | 102 | | |
110 | | - | |
111 | | - | |
| 103 | + | |
| 104 | + | |
112 | 105 | | |
113 | 106 | | |
114 | 107 | | |
| |||
118 | 111 | | |
119 | 112 | | |
120 | 113 | | |
121 | | - | |
| 114 | + | |
122 | 115 | | |
123 | 116 | | |
124 | 117 | | |
| |||
149 | 142 | | |
150 | 143 | | |
151 | 144 | | |
152 | | - | |
| 145 | + | |
153 | 146 | | |
154 | 147 | | |
155 | 148 | | |
156 | 149 | | |
157 | 150 | | |
158 | 151 | | |
159 | 152 | | |
160 | | - | |
161 | | - | |
162 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
163 | 156 | | |
164 | 157 | | |
165 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
379 | 383 | | |
380 | 384 | | |
381 | 385 | | |
| |||
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
25 | 59 | | |
26 | 60 | | |
27 | 61 | | |
| |||
40 | 74 | | |
41 | 75 | | |
42 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
43 | 89 | | |
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| 48 | + | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
| |||
175 | 181 | | |
176 | 182 | | |
177 | 183 | | |
178 | | - | |
| 184 | + | |
179 | 185 | | |
180 | 186 | | |
181 | 187 | | |
| |||
0 commit comments