Skip to content
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

Settings v3 - merging payment methods into master #463

Merged
merged 20 commits into from
Feb 6, 2019
Merged

Settings v3 - merging payment methods into master #463

merged 20 commits into from
Feb 6, 2019

Conversation

eoji
Copy link
Contributor

@eoji eoji commented Feb 6, 2019

what

Features include:

I removed the check for DEBUG builds.

Let this be the last time we maintain a feature branch for 3 months 🙏

Rashad Cureton and others added 19 commits November 1, 2018 17:15
* setting up payment methods screen

* added strings and query for payment methods

* added custom scalar type, viewmodel for viewHolder

* added formatter to viewholder and added dimens for payment methods

* fixed text styling for the list item

* added new lines to new classes

* wrote viewmodel tests for paymentmethods

* added Locale default for date formatting

* fixed drawables

* switched src to background

* removed double dependency and fixed the manifest

* fixed line spacing

* fixed schema issue

* fixed manifest line

* fixed creditcard schema

* fixed constraint layout version and added new line to list item

* fixed custom type mapping formatting

* fixed list item text spacing

* addressed PR feedback

* removed error methods

* fixed date test

* added test for when adding cards fails
* Only showing edit profile and payment methods on debug builds.

* Updated Stripe library.
Updated strings.
First pass of new card screen. Does basic card validation.

* Moved add new card form to fragment. Added focus listeners and text watchers to properly disable and enable save button

* added todo

* Added mutation and Stripe object to config.

* Successfully adding cards woohoo.

* merging in settings-v3 and adding fake stripe keys

* moved mutation

* checkstyle and refactored payment method row because it was breaking AS and it was easier to just do it as a LinearLayout

* starting NewCardActivity for result and fixing import

* actually starting NewCardActivity for result

* some more refactoring and refreshing list after card is saved

* Added MockStripe and CardFactory for testing.
Finished tests.

* cleanup, bizarre error handling and actually emitting something after saving the card

* PR feedback from Rashad
Added delete card mutation.
Showing a confirmation dialog when the user clicks the delete icon using delegate in card view holder
I added a progress bar and I regret it because I don't understand the tests.
Some lite refactoring
* Merging in MASTER FOR IZZY
…hods recycler (#377)

* Made a new class called KSListAdapter that extends ListAdapter. It still can handle sections and uses our existing KSViewHolder pattern ٩( ᐛ )و
* Updated strings and showing password warning (#369)

* Updating the schema 2k18 (#370)

* [Enhancement] - Send Verification email mutation and isEmailDeliverable (#372)

* added emailVerified field

* added fields to check if the email is verified

* added custom type mapping and mutation for userSendEmailVerification

* added send email verification mutuation and tests

* properly showing the send/re-send verification

* removed id field from graph since we're not using it

* made changes to viewmodel and tests

*  fixed view model tests

* added verficationError test, added verificationButton output

* renamed output

* renamed output again

* [Enhancement] - Users see network error dialog (#374)

* showing manual network error check

* added documentation for connection manager

* fixed checkstyle errors we're g2g

* fixed registering and unregistering our service

* removed unregister from onDestroy

* reverted line changes

* added register receiver to onResume (#376)

* added register receiver to onPause

* removed register from onStart

* fixed bug in discovery layout by wrapping the toolbar and tabs in a linear layout (#379)

* [QA FIX] - Fixed currency formatting case (#378)

* fixed display bug with currency

* fixed pledge amount text

* fixed spacing for symbols

* fixed formatting

* fixed reward viewmodel test

* fixed spacing and tests

* added method for rewardviewodel to kscurrency

* fixed reward pledge formatting

* refactored projectCurrencyOptions method and added test for non US currency

* fixed checkstyle error

* fixed currency test

* fixed tests in projectViewHolder, added sample project with different user currency

* fixed comment with the right information

* updating rubyzip gem for security (#382)

* [Enhancement] - Change email error on Account page (#380)

* added error icon and methods in viewmodel to show the icon when the conditions are met

* renamed methods and documented output

* added test for creator and backer when email is unverified or undeliverable

* added test for when the icon is gone and removed unverified logic for backers

* added boolean fields for testing

* added test for when backer is verified or unverified

* removed non null call that may crash the app

* updating offline copy (#381)

* [Enhancement] - Settings 2 Rollout Event Tracking (#383)

* added extension to logging events

* added logging events for settings v2

* fixed lambda block in change password

* upgraded fabric

* added tracking events to koala and fabric

* added koala values to test classes

* removed unused method

* removed line and used raw strings in tests instead of constants

* fixed icon error showing in account (#385)
* Updated strings and showing password warning (#369)

* Updating the schema 2k18 (#370)

* [Enhancement] - Send Verification email mutation and isEmailDeliverable (#372)

* added emailVerified field

* added fields to check if the email is verified

* added custom type mapping and mutation for userSendEmailVerification

* added send email verification mutuation and tests

* properly showing the send/re-send verification

* removed id field from graph since we're not using it

* made changes to viewmodel and tests

*  fixed view model tests

* added verficationError test, added verificationButton output

* renamed output

* renamed output again

* [Enhancement] - Users see network error dialog (#374)

* showing manual network error check

* added documentation for connection manager

* fixed checkstyle errors we're g2g

* fixed registering and unregistering our service

* removed unregister from onDestroy

* reverted line changes

* added register receiver to onResume (#376)

* added register receiver to onPause

* removed register from onStart

* fixed bug in discovery layout by wrapping the toolbar and tabs in a linear layout (#379)

* [QA FIX] - Fixed currency formatting case (#378)

* fixed display bug with currency

* fixed pledge amount text

* fixed spacing for symbols

* fixed formatting

* fixed reward viewmodel test

* fixed spacing and tests

* added method for rewardviewodel to kscurrency

* fixed reward pledge formatting

* refactored projectCurrencyOptions method and added test for non US currency

* fixed checkstyle error

* fixed currency test

* fixed tests in projectViewHolder, added sample project with different user currency

* fixed comment with the right information

* updating rubyzip gem for security (#382)

* [Enhancement] - Change email error on Account page (#380)

* added error icon and methods in viewmodel to show the icon when the conditions are met

* renamed methods and documented output

* added test for creator and backer when email is unverified or undeliverable

* added test for when the icon is gone and removed unverified logic for backers

* added boolean fields for testing

* added test for when backer is verified or unverified

* removed non null call that may crash the app

* updating offline copy (#381)

* [Enhancement] - Settings 2 Rollout Event Tracking (#383)

* added extension to logging events

* added logging events for settings v2

* fixed lambda block in change password

* upgraded fabric

* added tracking events to koala and fabric

* added koala values to test classes

* removed unused method

* removed line and used raw strings in tests instead of constants

* fixed icon error showing in account (#385)

* [📼] ExoPlayer 2.7.0 -> 2.9.1 (#388)

* bumping exoplayer after a futile subtitles attempt
* fixing unsightly status bar on 21 and above 
* bumping support libraries because they clashed with dependencies' dependencies
* Updated strings and showing password warning (#369)

* Updating the schema 2k18 (#370)

* [Enhancement] - Send Verification email mutation and isEmailDeliverable (#372)

* added emailVerified field

* added fields to check if the email is verified

* added custom type mapping and mutation for userSendEmailVerification

* added send email verification mutuation and tests

* properly showing the send/re-send verification

* removed id field from graph since we're not using it

* made changes to viewmodel and tests

*  fixed view model tests

* added verficationError test, added verificationButton output

* renamed output

* renamed output again

* [Enhancement] - Users see network error dialog (#374)

* showing manual network error check

* added documentation for connection manager

* fixed checkstyle errors we're g2g

* fixed registering and unregistering our service

* removed unregister from onDestroy

* reverted line changes

* added register receiver to onResume (#376)

* added register receiver to onPause

* removed register from onStart

* fixed bug in discovery layout by wrapping the toolbar and tabs in a linear layout (#379)

* [QA FIX] - Fixed currency formatting case (#378)

* fixed display bug with currency

* fixed pledge amount text

* fixed spacing for symbols

* fixed formatting

* fixed reward viewmodel test

* fixed spacing and tests

* added method for rewardviewodel to kscurrency

* fixed reward pledge formatting

* refactored projectCurrencyOptions method and added test for non US currency

* fixed checkstyle error

* fixed currency test

* fixed tests in projectViewHolder, added sample project with different user currency

* fixed comment with the right information

* updating rubyzip gem for security (#382)

* [Enhancement] - Change email error on Account page (#380)

* added error icon and methods in viewmodel to show the icon when the conditions are met

* renamed methods and documented output

* added test for creator and backer when email is unverified or undeliverable

* added test for when the icon is gone and removed unverified logic for backers

* added boolean fields for testing

* added test for when backer is verified or unverified

* removed non null call that may crash the app

* updating offline copy (#381)

* [Enhancement] - Settings 2 Rollout Event Tracking (#383)

* added extension to logging events

* added logging events for settings v2

* fixed lambda block in change password

* upgraded fabric

* added tracking events to koala and fabric

* added koala values to test classes

* removed unused method

* removed line and used raw strings in tests instead of constants

* fixed icon error showing in account (#385)

* [📼] ExoPlayer 2.7.0 -> 2.9.1 (#388)

* bumping exoplayer after a futile subtitles attempt
* fixing unsightly status bar on 21 and above 
* bumping support libraries because they clashed with dependencies' dependencies

* Adding commit hook to ignore readme changes. (#390)

* Adding commit hook to ignore readme changes.

* Updating README (#391)

* Adding wordmark to readme. Ignoring in CI.

* [skip ci] nl

* Updating the license in the README 🙃

* Updating Apollo from 0.5.0 to 1.0.0-alpha3. (#394)

* [👩🏾‍💻👨🏿‍💻] Hiding change password and change email (#396)

* added logic to hide the change password row for facebook users

* Hiding both change password and change email rows.
Did some refactoring for readability.
Updated tests.

* initially hiding error icon

* Sending Settings v2 events to Koala (#389)

* added event attributes and sending default properties with each event to koala

* remvoed methods and only track fabric custom attr for currency

* removed unused import

* fixed checkstyle error

* added content for firebase method

* added tracking for firebase and fabric

* fixed indentation

* placed temp string for firebase

* removed firebase tracking

* removed unused imports

* removed unused imports in extension file

* removed fabric events

* Change Email Fix (#395)

* removed not null from change email and added logic for showing icon in account

* Fixing button height and text color of warning copy.

* making change email row include the icon

* bumped up version name in both files and updated strings (#397)

* [Enhancement] - Add Music Newsletter to our Settings (#399)

* added the music newsletter in the xml, viewmodel, and tests

* fixed subscribeAll test

* fixed extra conflicts from merge

* removed unused import
* [🚮] MixPanel removal (#398)

* First pass of removing Mixpanel from the codebase:
Removed import and metadata from build.gradle and manifest.
Created a KoalaService retrofit instance to hit our tracking endpoint.
Instead of using MixpanelAPI in KoalaTrackingClient, using KoalaService.
Posting the tracking info as a Base64 encoded string like iOS.
Adding obfuscated tracking properties that were set by Mixpanel

* Created KoalaBackgroundService that uses android JobDispatcher to send tracking events in the background.
Comes with free automatic retries woohoo.
Also, it doesn't run the jobs unless there's a network connection.
Fixed a crash in project cards if the project name is null.
You can now add some bundled data to the JobDispatcher (with a max of 500K)

* moved default properties to TrackingClientType interface

* tests

* Making constant time in MockKoala client and attempting to make tests pass

* switching from a TestSubscriber to a BehaviorSubject so I can get the last value

* Added tests for tracking default properties and project views. Project view tracking is broken because we always null for the user...

* YAY TESTS ARE PASSING.
Fixed bug where we never sent info about logged in user.
Added missing fields to updates tracking.
Removed prefixes from disco tracking.
Alphabetizing.

* Cleanup and logging out properties of successfully tracked event.

* Checkstyle and properly logging properties.

* removing koala endpoint placeholder
* removing koala endpoints from makefile

* Downgrade apollo 1.0.0-alpha3 -> 0.5.0  (#403)

* downgrading apollo because we're not ready to go to 28 yet
* [Enhancement] - Add Music Newsletter to our Settings (#399)

* added the music newsletter in the xml, viewmodel, and tests

* fixed subscribeAll test

* [🚮] MixPanel removal (#398)

* First pass of removing Mixpanel from the codebase:
Removed import and metadata from build.gradle and manifest.
Created a KoalaService retrofit instance to hit our tracking endpoint.
Instead of using MixpanelAPI in KoalaTrackingClient, using KoalaService.
Posting the tracking info as a Base64 encoded string like iOS.
Adding obfuscated tracking properties that were set by Mixpanel

* Created KoalaBackgroundService that uses android JobDispatcher to send tracking events in the background.
Comes with free automatic retries woohoo.
Also, it doesn't run the jobs unless there's a network connection.
Fixed a crash in project cards if the project name is null.
You can now add some bundled data to the JobDispatcher (with a max of 500K)

* moved default properties to TrackingClientType interface

* Cleanup and logging out properties of successfully tracked event.

* Downgrade apollo 1.0.0-alpha3 -> 0.5.0  (#403)

* downgrading apollo because we're not ready to go to 28 yet

* fixed the margins on the spinner (#402)

* added margin to the rate us row in settings (#405)

* Settings a11y (#406)

* Accessibility party:
Fixed large text cut off:
Privacy rows
Newsletters rows

Voice over:
Added accessibility label for the undeliverable warning icon
Added copy for version

UX:
Manage project notifications - removed divider, allowed multiline text and fixed bug with delayed switches.

* Reverting switch style

* Filtering null currencies because it causes a crash. (#407)

*  updated v3 with latest from master

* added google build tools work around for failing circle builds

* fixed the proper imports

*  fixed id name

* added bintray url for exoplayer failure in circle (#410)

* Attempt to fix crashes with uris (#409)
* fixed the imports and views that didn't have the androidx changes

* fixed manifest alpha order

* Ensure that only supported locales are downloaded from the config (#432)

* merge fixes
* wip allowed cards, updating vm

* added output for
allowedCardWarningIsVisible

* Updated strings. Only allowing subset of cards. Added style for warning copy. Warning shows after 3 characters have been typed. Tests.

* styling new card screen.

* removing unused style item
# Conflicts:
#	app/build.gradle
#	app/src/main/AndroidManifest.xml
#	app/src/main/java/com/kickstarter/mock/services/MockApolloClient.kt
#	app/src/main/java/com/kickstarter/services/ApolloClientType.kt
#	app/src/main/java/com/kickstarter/services/KSApolloClient.kt
#	app/src/main/java/com/kickstarter/ui/activities/AccountActivity.kt
#	app/src/main/java/com/kickstarter/ui/activities/ChangeEmailActivity.kt
#	app/src/main/res/layout/activity_change_email.xml
#	app/src/main/res/layout/activity_change_password.xml
@eoji eoji requested a review from Rcureton February 6, 2019 20:45
Copy link
Contributor

@Rcureton Rcureton left a comment

Choose a reason for hiding this comment

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

✅Tested

  • Ran and tested on the Samsung s8 8.0. Amazing PR 3 months of great work and fire collaborations.

image

import com.crashlytics.android.answers.Answers
import com.crashlytics.android.answers.CustomEvent

fun fabricLogCustomEvent(customEvent: String) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove this since we're not logging custom events anymore.

@@ -71,6 +66,7 @@ class AccountActivity : BaseActivity<AccountViewModel.ViewModel>() {

change_email_row.setOnClickListener { startActivityWithSlideUpTransition(Intent(this, ChangeEmailActivity::class.java)) }
change_password_row.setOnClickListener { startActivityWithSlideUpTransition(Intent(this, ChangePasswordActivity::class.java)) }
payment_methods_row.setOnClickListener { startActivityWithSlideUpTransition(Intent(this, PaymentMethodsSettingsActivity::class.java)) }
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

@eoji eoji merged commit 43a2f41 into master Feb 6, 2019
@eoji eoji deleted the settings-v3 branch February 6, 2019 21:21
@eoji eoji changed the title Settings v3 Settings v3 - merging payment methods into master Feb 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants