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

[$1000] Web - The focus on timezone is highlighted in full in compared to year option on date of birth #21262

Closed
1 of 6 tasks
kbecciv opened this issue Jun 21, 2023 · 24 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@kbecciv
Copy link

kbecciv commented Jun 21, 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 staging dot on web chrome
  2. Settings > Profile >Personal details
  3. Select date of birth and select the year field and notice that when you hover over the date years, the focus is not fully covered
  4. But now go back and select the timezone and hover over the different options and notice that the timezone options focus are fully covered
  5. Thus, there's inconsistency between two areas in the same application

Expected Result:

The focus on timezone should not be highlighted in full in a similar way how the focus on the year option on date of birth does to maintain consistency OR vice versa

Actual Result:

The focus on timezone is highlighted in full in compared to year option on date of birth

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: 1.3.27-6

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

error-2023-06-14_21.29.21.1.mp4
Recording.3197.mp4

Expensify/Expensify Issue URL:

Issue reported by: @priya-zha

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0192d5df321e7923f8
  • Upwork Job ID: 1671654443150655488
  • Last Price Increase: 2023-06-21
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 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

@chiragxarora
Copy link
Contributor

chiragxarora commented Jun 21, 2023

Proposal

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

Inconsistent focus on timezone is highlighted in full in compared to year option on date of birth

What is the root cause of that problem?

Root cause is the horizontal padding (as ph5) given as contentContainerStyles prop to <OptionsSelector/> in YearPickerPage whereas we don't have the similar padding in the TimezoneSelectPage

<OptionsSelector
textInputLabel={this.props.translate('yearPickerPage.selectYear')}
onChangeText={this.filterYearList}
keyboardType={CONST.KEYBOARD_TYPE.NUMBER_PAD}
maxLength={4}
value={this.state.inputText}
sections={[{data: this.state.yearOptions, indexOffset: 0}]}
onSelectRow={(option) => this.updateSelectedYear(option.value)}
headerMessage={headerMessage}
initiallyFocusedOptionKey={this.currentYear.toString()}
hideSectionHeaders
optionHoveredStyle={styles.hoveredComponentBG}
shouldHaveOptionSeparator
contentContainerStyles={[styles.ph5]}
/>

<OptionsSelector
textInputLabel={this.props.translate('timezonePage.timezone')}
value={this.state.timezoneInputText}
onChangeText={this.filterShownTimezones}
onSelectRow={this.saveSelectedTimezone}
optionHoveredStyle={styles.hoveredComponentBG}
sections={[{data: this.state.timezoneOptions, indexOffset: 0, isDisabled: this.timezone.automatic}]}
shouldHaveOptionSeparator
safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle}
initiallyFocusedOptionKey={_.get(_.filter(this.state.timezoneOptions, (tz) => tz.text === this.timezone.selected)[0], 'keyForList')}
/>

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

For solving this we have two options:

  • we could either remove the horizontal padding from the YearPickerPage
  • or we could add the same padding to the TimezoneSelectPage

We can do either of these depending upon the ideal desired behavior, as in the OP's bug report expected result says or vice versa

EDIT: (No other proposal has mentioned this till the time of edit)

Pronouns page also does not use the padding so we have 2 places with no padding and 1 place with padding. (mentioning for consistent change after the bug is fixed)

Results

OPTION 1:

bandicam.2023-06-20.22-40-22-904.mp4

OPTION 2:

bandicam.2023-06-20.22-39-04-469.mp4
bandicam.2023-06-20.18-52-15-569.mp4

What alternative solutions did you explore? (Optional)

None

@aman-atg
Copy link
Contributor

Proposal

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

Inconsistent : The focus on timezone is highlighted in full in compared to year option on date of birth

What is the root cause of that problem?

The issue arises from the usage of the contentContainerStyles prop in the OptionsSelector component in the YearPickerPage.js file. The contentContainerStyles prop is applied to the options selector, causing the inconsistency in the highlighting style.

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

To solve the problem, we should remove the contentContainerStyles prop from the OptionsSelector component in the YearPickerPage.js file here

What alternative solutions did you explore? (Optional)

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label Jun 21, 2023
@melvin-bot melvin-bot bot changed the title Web - The focus on timezone is highlighted in full in compared to year option on date of birth [$1000] Web - The focus on timezone is highlighted in full in compared to year option on date of birth Jun 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0192d5df321e7923f8

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

Current assignee @lschurr is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 21, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External)

@lschurr
Copy link
Contributor

lschurr commented Jun 22, 2023

@sobitneupane can you review these proposals?

@aliammar1995
Copy link

Proposal

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

Inconsistent : The focus on timezone is highlighted in full in compared to year option on date of birth

What is the root cause of that problem?

It is because in OptionsSelector of TimezoneSelectPage component, we did
not put custom style as prop (contentContainerStyles)

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

We have to add prop contentContainerStyles as a prop OptionsSelector in. TimezoneSelectPage component.

<OptionsSelector textInputLabel={this.props.translate('timezonePage.timezone')} value={this.state.timezoneInputText} onChangeText={this.filterShownTimezones} onSelectRow={this.saveSelectedTimezone} optionHoveredStyle={styles.hoveredComponentBG} sections={[{data: this.state.timezoneOptions, indexOffset: 0, isDisabled: this.timezone.automatic}]} shouldHaveOptionSeparator safeAreaPaddingBottomStyle={safeAreaPaddingBottomStyle} initiallyFocusedOptionKey={_.get(_.filter(this.state.timezoneOptions, (tz) => tz.text === this.timezone.selected)[0], 'keyForList')} contentContainerStyles={[styles.ph5]} />

It worked well.

@sobitneupane
Copy link
Contributor

@chiragxarora's proposal looks good to me.

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

Triggered auto assignment to @NikkiWines, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@chiragxarora
Copy link
Contributor

chiragxarora commented Jun 23, 2023

Hey @sobitneupane which option are we going with?
No padding in yearpicker or adding padding to timezone?
Removing padding from yearpicker page looks like a better option to me personally

@sobitneupane
Copy link
Contributor

No padding in yearpicker

@chiragxarora
Copy link
Contributor

PR is ready for review @sobitneupane
@NikkiWines you may assign me now for the issue

@NikkiWines
Copy link
Contributor

Yep, agreed we can use @chiragxarora's proposal in this case

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

📣 @chiragxarora You have been assigned to this job by @NikkiWines!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@dhairyasenjaliya
Copy link
Contributor

@shawnborton are we getting rid of the separator line for this page as well?

@shawnborton
Copy link
Contributor

I think so - basically all list views are getting refactored. Does that sound right @thiagobrez?

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Jun 23, 2023
@chiragxarora
Copy link
Contributor

Are the reviewers not taken from the issue associated? I see someone else assigned for the review on PR
Also, do I need to remove separator for pages of this issue?
@shawnborton

@shawnborton
Copy link
Contributor

Honestly I think we can just close this one out because the refactor is coming. Let's wait for Thiago to confirm.

@chiragxarora
Copy link
Contributor

Isn't the issue here different although for the same page? just asking

@thiagobrez
Copy link
Contributor

I think so - basically all list views are getting refactored. Does that sound right @thiagobrez?

@shawnborton That's correct. We currently have a variety of lists being rendered by different components with different styles. In this tracker issue we discussed about it, and we're creating whole new components (here, here and here) to make it easier to use from a developer perspective, and maintain consistency from a design perspective

Both the Timezone list and the Year Picker list were already addressed in the first PR. The separator lines were also removed: #21048

I don't think it's worth fixing OptionsSelector, OptionsList or OptionRow components as they're getting completely replaced soon

@shawnborton
Copy link
Contributor

Awesome thanks for confirming. So sounds like maybe we just close this one out then.

@NikkiWines
Copy link
Contributor

Agreed, let's close this out for now 👍

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 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

10 participants