-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
@@ -290,7 +290,7 @@ class PaymentsPage extends React.Component { | |||
!this.props.isSmallScreenWidth ? styles.sidebarPopover : '', | |||
]} | |||
> | |||
{this.props.isSmallScreenWidth && ( | |||
{(Platform.OS !== 'web' || this.props.isSmallScreenWidth) && ( |
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.
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?
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.
@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
{(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.
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.
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.
Do you think we can use props.isMediumScreenWidth
here?
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.
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
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.
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
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.
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.
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.
Ok. I don't mind this as well. Leaving this to @thienlnam.
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.
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
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.
@thienlnam yes , i add it now
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.
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. |
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.
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
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.
looks better, i update it now
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.
Awesome, thanks for adding that
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @thienlnam in version: 1.1.39-0 🚀
|
Issue 1 - Title- [Medium]: Chrome +Jaws : Screen reader : Role is not defined for Paypal A/c. 7571_Role.is.not.define.for.Paypal.Account.mp4Issue 2- Title- [Medium]: Chrome + Jaws: Keyboard Navigation :Order is not sequential on 'Delete dialogue' 7571_Oreder.is.not.sequential.mp4Issue 3 - Title- [Medium]: Chrome +Jaws : Screen reader : Role is not defined for 'Delete' control. 7571_Role.is.not.defined.for.Delete.control.mp4Issue 4 - Title- [Medium]: Chrome +Jaws : Screen reader : Screen reader is not reading the Dialogue information. 7571_Screen.reader.is.not.reading.the.dialouge.information.along.with.the.controls.mp4 |
This comment was marked as resolved.
This comment was marked as resolved.
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? |
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. |
Details
Fixed Issues
$ #7413
Tests
QA Steps
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS (iPad)
Android