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

Fix: Missing PayPal account when trying to delete it #7571

Merged
merged 5 commits into from
Feb 9, 2022

Conversation

ahmdshrif
Copy link
Contributor

@ahmdshrif ahmdshrif commented Feb 4, 2022

Details

Fixed Issues

$ #7413

Tests

  • Verify that no errors appear in the JS console

QA Steps

  1. Launch the app and login
  2. Open your settings
  3. Open the "Payments" page
  4. Tap my PayPal payment
  5. Tap Delete
  • Verify that no errors appear in the JS console

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Screen Shot 2022-02-04 at 10 00 59 PM

Mobile Web

Screenshot_20220204-220252_Samsung Internet.jpg

Desktop

Screen Shot 2022-02-04 at 10 03 29 PM

iOS (iPad)

Screen Shot 2022-01-28 at 9 28 41 PM

Android

Screen Shot 2022-02-04 at 10 08 12 PM

@ahmdshrif ahmdshrif changed the title check web platform fix: Missing PayPal account when trying to delete it Feb 4, 2022
@ahmdshrif ahmdshrif marked this pull request as ready for review February 4, 2022 20:10
@ahmdshrif ahmdshrif requested a review from a team as a code owner February 4, 2022 20:10
@MelvinBot MelvinBot removed the request for review from a team February 4, 2022 20:10
@@ -290,7 +290,7 @@ class PaymentsPage extends React.Component {
!this.props.isSmallScreenWidth ? styles.sidebarPopover : '',
]}
>
{this.props.isSmallScreenWidth && (
{(Platform.OS !== 'web' || this.props.isSmallScreenWidth) && (
Copy link
Member

Choose a reason for hiding this comment

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

Please read the style guide. We don't do this. If you need to run something on native then created a index.native.js file.

Have you tested this on Ipad or Android Tab?

Copy link
Contributor Author

@ahmdshrif ahmdshrif Feb 4, 2022

Choose a reason for hiding this comment

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

@parasharrajat yes test it and work fine on iPad.
I think of doing this change.

render() {
...
  const isPopoverBottomMounte = this.props.anchorPositionTop === 0 || this.props.isSmallScreenWidth
Suggested change
{(Platform.OS !== 'web' || this.props.isSmallScreenWidth) && (
{isPopoverBottomMounte && (

sense model comes from down in case of this value with 0 or issmalScreen true.

this value is 0 in native all time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is the new change I mention from iPad

Screen Shot 2022-02-05 at 12 46 50 AM

Copy link
Member

Choose a reason for hiding this comment

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

Do you think we can use props.isMediumScreenWidth here?

Copy link
Contributor Author

@ahmdshrif ahmdshrif Feb 7, 2022

Choose a reason for hiding this comment

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

not work with landscape on the tablet.

we need a Paypal account to appear when the Popover comes from the bottom

and in native it comes from a bottom in all cases.
on the web comes from a bottom when the screen is small only.

so that is why I go with this change

Copy link
Member

Choose a reason for hiding this comment

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

Ok. But depending on this condition is a hack. We should not depend on unrelated props. it can break easily.

If you want to show this on the native and Mobile web, then create a utility like canFocusInputOnScreenFocus.

a Name could be ShouldShowOnBottomDockedPopover

Copy link
Contributor Author

@ahmdshrif ahmdshrif Feb 7, 2022

Choose a reason for hiding this comment

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

it's not an unrelated state if you change the this.state.anchorPositionTop to not be 0 then
the popover will not be from the bottom and then we will need to disable the Paypal account view.
like on the web here.

so I don't prefer to make a new utility for it may be in the future we need to not render it from the bottom in some native cases.
we will just change the state anchorPositionTop this will render the popover from click place and will disable Paypal view as expected. on one change.

Screen Shot 2022-02-04 at 10 00 59 PM

Copy link
Member

Choose a reason for hiding this comment

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

Ok. I don't mind this as well. Leaving this to @thienlnam.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't mind this solution, but can we get a better comment to clarify what this condition means? Variable name alone is not clear enough for me

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@thienlnam yes , i add it now

parasharrajat
parasharrajat previously approved these changes Feb 7, 2022
Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

LGTM.

cc: @thienlnam
🎀 👀 🎀 C+ reviewed

@@ -216,6 +216,9 @@ class PaymentsPage extends React.Component {

render() {
const isPayPalMeSelected = this.state.formattedSelectedPaymentMethod.type === CONST.PAYMENT_METHODS.PAYPAL;

// determine if the popover appears from the bottom of the screen or not.
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking for a more detailed comment, something along the lines of
Determines whether or not the modal popup is mounted from the bottom of the screen instead of the side mount on Web or Desktop screens

Copy link
Contributor Author

Choose a reason for hiding this comment

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

looks better, i update it now

@ahmdshrif ahmdshrif requested a review from thienlnam February 8, 2022 18:56
Copy link
Contributor

@thienlnam thienlnam left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for adding that

@thienlnam thienlnam merged commit 1e181db into Expensify:main Feb 9, 2022
@OSBotify
Copy link
Contributor

OSBotify commented Feb 9, 2022

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @thienlnam in version: 1.1.39-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@michaelhaxhiu michaelhaxhiu changed the title fix: Missing PayPal account when trying to delete it Fix: Missing PayPal account when trying to delete it Feb 23, 2022
@OSBotify
Copy link
Contributor

🚀 Deployed to production by @timszot in version: 1.1.39-3 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@Stutikuls
Copy link

Stutikuls commented Mar 4, 2022

Issue 1 -

Title- [Medium]: Chrome +Jaws : Screen reader : Role is not defined for Paypal A/c.
Actual - When focus lands on the Paypal A/c, screen reader is reading "Paypal.me testetstes(A/c name)", not read the role for the A/c.
Expected - Role should be define as a 'button' for the paypal a/c and screen reader should read like "Paypal.me testetstes".
WCAG failure - 4.1.2
Reproducible in staging?: - Yes
Version Number: - v1.1.39-3
Platforms - Web, Desktop, Mobile-web, iOS

7571_Role.is.not.define.for.Paypal.Account.mp4

Issue 2-

Title- [Medium]: Chrome + Jaws: Keyboard Navigation :Order is not sequential on 'Delete dialogue'
Actual - After open the dialogue first focus lands on the Cancel control then it's move to delete control.
Expected - Focus should first land on the 'Delete' control then should lands on the 'Cancel'.
WCAG failure - 2.4.3
Reproducible in staging?: - Yes
Version Number: - v1.1.39-3
Platforms - Web, Desktop

7571_Oreder.is.not.sequential.mp4

Issue 3 -

Title- [Medium]: Chrome +Jaws : Screen reader : Role is not defined for 'Delete' control.
Actual - When focus lands on the Delete control, screen reader is reading "Delete", not read the role.
Expected - Role should be define as 'button' and screen reader should read like "Delete button".
WCAG failure - 4.1.2
Reproducible in staging?: - Yes
Version Number: - v1.1.39-3
Platforms - Web, Mobile-web, iOS

7571_Role.is.not.defined.for.Delete.control.mp4

Issue 4 -

Title- [Medium]: Chrome +Jaws : Screen reader : Screen reader is not reading the Dialogue information.
Actual - After select the delete control, screen reader is reading "Cancel", not read the 'Are you sure...".
Expected - Screen reader should read like "Are you sure that you want to delete this account?, cancel button".
WCAG failure - 1.3.1
Reproducible in staging?: - Yes
Version Number: - v1.1.39-3
Platforms - Web

7571_Screen.reader.is.not.reading.the.dialouge.information.along.with.the.controls.mp4

@thienlnam

This comment was marked as resolved.

@ogumen
Copy link

ogumen commented Mar 7, 2022

Hey @Stutikuls, please report these bugs in the #expensify-open-source channel! https://github.com/Expensify/App/blob/main/CONTRIBUTING.md#finding-jobs

Hi @thienlnam, the accessibility team is working on the in-sprint testing of the PRs from the accessibility perspective. Initially we were told to only leave comments with all issues we have found on the corresponding PRs. Has the process changed lately?
CC @roryabraham @stitesExpensify @Stutikuls

@roryabraham
Copy link
Contributor

Initially we were told to only leave comments with all issues we have found on the corresponding PRs. Has the process changed lately?

For now, please keep just posting bugs in the issue as you have been. The process will change once we have made substantial efforts to provide better accessibility in our app and have established some code patterns to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants