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

Web - Profile - No transition animation on 'Pronouns' selector #24545

Closed
1 of 6 tasks
izarutskaya opened this issue Aug 14, 2023 · 13 comments
Closed
1 of 6 tasks

Web - Profile - No transition animation on 'Pronouns' selector #24545

izarutskaya opened this issue Aug 14, 2023 · 13 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@izarutskaya
Copy link

izarutskaya commented Aug 14, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to Settings > Profile
  2. Click 'Pronouns'

Expected Result:

There should be a transition animation when the Pronouns page is loaded

Actual Result:

No transition animation is shown

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: v1.3.53-1

Reproducible in staging?: Y

Reproducible in production?: Y

If this was caught during regression testing, add the test name, ID and link from TestRail:

Email or phone of affected tester (no customers):

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Screencast.From.04.08.2023.18.08.55.mp4
Recording.5821.mp4
Recording.1187.mp4

Expensify/Expensify Issue URL:

Issue reported by: @pbkompasz

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1691161563063259

View all open jobs on GitHub

@izarutskaya izarutskaya added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

Triggered auto assignment to @alexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Aug 14, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@izarutskaya
Copy link
Author

Proposal from @pbkompasz

Proposal

Please re-state the problem that we are trying to solve in this issue.

No transition animation on 'Pronouns' selector

What is the root cause of that problem?

<SelectionListRadio /> focus animation breaks <PronounsPage />'s transition animation.

What changes do you think we should make in order to solve the problem?

Assign props to <SelectionListRadio /> component.

SelectionListRadio.propTypes = selectionListRadioPropTypes.propTypes;
SelectionListRadio.defaultProps = selectionListRadioPropTypes.defaultProps;

These props contain the shouldDelayFocus
Pass shouldDelayFocus prop to
and pass that prop to

<SelectionListRadio
  headerMessage={headerMessage}
  textInputLabel={props.translate('pronounsPage.pronouns')}
  textInputPlaceholder={props.translate('pronounsPage.placeholderText')}
  textInputValue={searchValue}
  sections={[{data: filteredPronounsList, indexOffset: 0}]}
  onSelectRow={updatePronouns}
  onChangeText={onChangeText}
  shouldDelayFocus
  initiallyFocusedOptionKey={initiallyFocusedOption.keyForList}
/>
<BaseSelectionListRadio
  // eslint-disable-next-line react/jsx-props-no-spreading
  {...props}
  ref={ref}
  shouldDelayFocus={props.shouldDelayFocus}
  onScroll={() => {
    // Only dismiss the keyboard whenever the user scrolls the screen
    if (!isScreenTouched) {
        return;
    }
    Keyboard.dismiss();
  }}
/>

Additionally we should remove the selectTextOnFocus

What alternative solutions did you explore? (Optional)

Alternatively we can remove the auto-focus from the input.

@Nikhil-Vats
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

No animation on Profile page and Timezone select page.

For timezone select - Go to Profile > Timezone (animation is present here). Now click on timezone again and notice there is no animation here.

What is the root cause of that problem?

shouldDelayFocus is not passed in PronounsPage and TimezoneSelectPage for SelectionListRadio -

<SelectionListRadio
headerMessage={headerMessage}
textInputLabel={props.translate('pronounsPage.pronouns')}
textInputPlaceholder={props.translate('pronounsPage.placeholderText')}
textInputValue={searchValue}
sections={[{data: filteredPronounsList, indexOffset: 0}]}
onSelectRow={updatePronouns}
onChangeText={onChangeText}
initiallyFocusedOptionKey={initiallyFocusedOption.keyForList}
/>

<SelectionListRadio
textInputLabel={translate('timezonePage.timezone')}
textInputValue={timezoneInputText}
onChangeText={filterShownTimezones}
onSelectRow={saveSelectedTimezone}
sections={[{data: timezoneOptions, indexOffset: 0, isDisabled: timezone.current.automatic}]}
initiallyFocusedOptionKey={_.get(_.filter(timezoneOptions, (tz) => tz.text === timezone.current.selected)[0], 'keyForList')}
/>

It is present on other pages like YearPickerModal -

<SelectionListRadio
shouldDelayFocus

What changes do you think we should make in order to solve the problem?

We just need to pass shouldDelayFocus in PronounsPage and TimezoneSelectPage in SelectionListRadio component.

What alternative solutions did you explore? (Optional)

NA

@ShogunFire
Copy link
Contributor

We don't use shouldDelayFocus anymore, there have been like 4 different issues about this with different pages, it would be nice if one of them could correct every pages

@ShogunFire
Copy link
Contributor

For example this one: #22388

@pbkompasz
Copy link

@ShogunFire
The other options would be:

  1. Set the delay as the default
  2. Check if an animation is running in the parent element and only trigger the animation in the current element when animationend event is triggered.

@alexpensify
Copy link
Contributor

Thanks for the feedback, I'll review this GH soon.

@alexpensify
Copy link
Contributor

I've started a discussion here:

https://expensify.slack.com/archives/C049HHMV9SM/p1692390540016689?thread_ts=1691161563.063259&cid=C049HHMV9SM

I'm trying to verify if #22388 will include an update for all pages or if we should keep this GH open to address a specific page.

@melvin-bot melvin-bot bot added the Overdue label Aug 21, 2023
@alexpensify
Copy link
Contributor

No update, I've bumped the 🧵 again.

@ShogunFire
Copy link
Contributor

@alexpensify yes they will #22388 (comment)

@chiragxarora
Copy link
Contributor

this is dupe and will be covered here #24139
already at held PR stage

this can be closed @alexpensify

@alexpensify
Copy link
Contributor

Thank you for the feedback! I'm closing this GH because of the confirmation shared here and in Slack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
None yet
Development

No branches or pull requests

6 participants