You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$1000] Web – Announce Room - Inconsistency in highlighting the selected option. #22553
Notice that the selected option in "Priority mode" and "Language" is highlighted.
Open any "announce room."
Open "Details."
Click on "Settings."
Click on "Who can post" and "Notify me."
Notice that the selected option is not highlighted.
Expected Result:
The selected option in "Who can post" and "Notify me" should be highlighted to maintain consistency among all pages.
Actual Result:
The selected option is not highlighted.
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.38-3 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
Please re-state the problem that we are trying to solve in this issue.
Web – Announce Room - Inconsistency in highlighting the selected option.
What is the root cause of that problem?
For Settings -> Preferences -> Priority mode & Language we are using SelectionListRadio which has initiallyFocusedOptionKeyproperty;
In Announce Rooms -> Details -> Settings -> Who can post & Notify me we are using OptionsList which does not have the initially focused functionality.
What changes do you think we should make in order to solve the problem?
We should either: I. Replace the OptionsList with SelectionListRadio, but keep in mind that SelectionListRadio does not have some functionalities which we'll lose such as shouldHaveOptionSeparator which adds a green line between rows. II. Implement the initially focused functionality for the OptionsList same as it works for the SelectionListRadio.
What alternative solutions did you explore?
Didn't investigate enough, but I'm curious if we would be able to use just one list implementation everywhere, and set functionalities based on props. For example, OptionsList at /settings/preferences/language and SelectionListRadio at /r/YOUR-WORKSPACE-ID/settings/notification-preferences look very similar. I think this would be a bigger refactor if possible.
Please re-state the problem that we are trying to solve in this issue.
The Option List selection is inconsistent in the "Who can Post" and "Notify Me" pages.
What is the root cause of that problem?
We recently adopted the use of the SelectionListRadio component for selecting single options from a list. The WriteCapabilityPage and NotificationPreferencePage were missed during the refactor however, causing the inconsistent design.
What changes do you think we should make in order to solve the problem?
We need to replace the OptionsList with SelectionListRadio in both these pages. To do so in each of these pages,
Notification Preferences Page
In the notificationPreferenceOptions, we will remove customIcon and boldStyle and add a new property isSelected which has the value as props.report.notificationPreference === key
Replace OptionsList with SelectionListRadio and remove all props except sections and onSelectRow.
Add a new prop initiallyFocusedOptionKey with value _.find(notificationPreferenceOptions, (preference) => preference.isSelected).keyForList.
Remove all unused variables and imports.
This will ensure consistent behaviour on the Notification Preferences page.
Write Capability Page
Similar steps as above but in writeCapabilityOptions, we use it's respective condition for determining selection.
What alternative solutions did you explore? (Optional)
So what happened seems to be that we forgot about some list cases. I was following the cases listed in this comment from the tracker issue, so that's why the Announce room was forgotten.
Before this refactor, we had this component hierarchy:
OptionsSelector parent of OptionsList parent of OptionRow
These 3 component were being used interchangeably. For example, sometimes OptionsList being rendered on it's own without OptionsSelector (which is it's parent). That, in addition to a bunch of styling props, made all lists just a little bit different from each other.
We're aiming to replace all usages of OptionsSelector, OptionsList and OptionRow with the new SelectionList.
In main, you will still find SelectionListRadio, which is the result of the Phase 1 PR. In Phase 2 PR, I renamed it to SelectionList and iterated on top of it making it also able to render multiple selection lists (with checkboxes instead of checkmarks). On Phase 3, I'm thinking I'll come up with a new component instead of iterating on top of this same one again because the requirements seem quite different, let's see.
TL;DR:
We want to replace all usages of OptionsSelector, OptionsList and OptionRow with the new SelectionList
Lists that are not using this yet is because we simply forgot to track 🤷🏻 , or by some decision made
Yes, some styling props (such as shouldHaveOptionSeparator) don't exist anymore, and that's intended, to standardise the look and feel of same-purpose lists
That said, I believe both Proposals from @DanutGavrus (point I) and @GItGudRatio are correct. You can either raise a PR in this issue, or I can add those to my Phase 2 PR which is currently open, however you prefer.
changed the title [-]Web – Announce Room - Inconsistency in highlighting the selected option.[/-][+][$1000] Web – Announce Room - Inconsistency in highlighting the selected option.[/+]on Jul 19, 2023
@Santhosh-Sellavel@JmillsExpensify@rushatgabhane If this issue was External and if my Proposal was left before the same change was applied in the migrations, will I be eligible for the bounty?
I think I saw something similar in another Issue recently, but can't find it easily so I thought of asking. Thanks!
@Santhosh-Sellavel@JmillsExpensify@rushatgabhane If this issue was External and if my Proposal was left before the same change was applied in the migrations, will I be eligible for the bounty? I think I saw something similar in another Issue recently, but can't find it easily so I thought of asking. Thanks!
We are already in the process of migrating to the selection list. So the proposal doesn't qualify for a bounty.
@JmillsExpensify@rushatgabhane this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Activity
melvin-bot commentedon Jul 10, 2023
Triggered auto assignment to @JmillsExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jul 10, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)DanutGavrus commentedon Jul 10, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Web – Announce Room - Inconsistency in highlighting the selected option.
What is the root cause of that problem?
Settings->Preferences->Priority mode&Languagewe are usingSelectionListRadiowhich hasinitiallyFocusedOptionKeyproperty;Announce Rooms->Details->Settings->Who can post&Notify mewe are usingOptionsListwhich does not have the initially focused functionality.What changes do you think we should make in order to solve the problem?
We should either:
I. Replace the
OptionsListwithSelectionListRadio, but keep in mind thatSelectionListRadiodoes not have some functionalities which we'll lose such asshouldHaveOptionSeparatorwhich adds a green line between rows.II. Implement the initially focused functionality for the
OptionsListsame as it works for theSelectionListRadio.What alternative solutions did you explore?
Didn't investigate enough, but I'm curious if we would be able to use just one list implementation everywhere, and set functionalities based on props. For example,
OptionsListat/settings/preferences/languageandSelectionListRadioat/r/YOUR-WORKSPACE-ID/settings/notification-preferenceslook very similar. I think this would be a bigger refactor if possible.GItGudRatio commentedon Jul 10, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
The Option List selection is inconsistent in the "Who can Post" and "Notify Me" pages.
What is the root cause of that problem?
We recently adopted the use of the
SelectionListRadiocomponent for selecting single options from a list. TheWriteCapabilityPageandNotificationPreferencePagewere missed during the refactor however, causing the inconsistent design.What changes do you think we should make in order to solve the problem?
We need to replace the
OptionsListwithSelectionListRadioin both these pages. To do so in each of these pages,Notification Preferences Page
notificationPreferenceOptions, we will removecustomIconandboldStyleand add a new propertyisSelectedwhich has the value asprops.report.notificationPreference === keyOptionsListwithSelectionListRadioand remove all props exceptsectionsandonSelectRow.initiallyFocusedOptionKeywith value_.find(notificationPreferenceOptions, (preference) => preference.isSelected).keyForList.This will ensure consistent behaviour on the Notification Preferences page.
Write Capability Page
Similar steps as above but in
writeCapabilityOptions, we use it's respective condition for determining selection.What alternative solutions did you explore? (Optional)
N/A
dukenv0307 commentedon Jul 12, 2023
This bug is reported before and we decide to close because we had an issue to refactor optionSelector
JmillsExpensify commentedon Jul 12, 2023
@dukenv0307 Do you mind pointing me to that convo?
dukenv0307 commentedon Jul 13, 2023
I don't remember exactly. @shawnborton Could you help to confirm?
shawnborton commentedon Jul 13, 2023
Yeah, @thiagobrez was working on this and can provide some PR links.
thiagobrez commentedon Jul 13, 2023
Hey!
The selection list refactor tracker issue is here: #11795
Phase 1 - single selection lists:
Phase 2 - multi selection lists:
Phase 3 - simple selection lists:
So what happened seems to be that we forgot about some list cases. I was following the cases listed in this comment from the tracker issue, so that's why the Announce room was forgotten.
Before this refactor, we had this component hierarchy:
OptionsSelectorparent ofOptionsListparent ofOptionRowThese 3 component were being used interchangeably. For example, sometimes
OptionsListbeing rendered on it's own withoutOptionsSelector(which is it's parent). That, in addition to a bunch of styling props, made all lists just a little bit different from each other.We're aiming to replace all usages of
OptionsSelector,OptionsListandOptionRowwith the newSelectionList.In
main, you will still findSelectionListRadio, which is the result of the Phase 1 PR. In Phase 2 PR, I renamed it toSelectionListand iterated on top of it making it also able to render multiple selection lists (with checkboxes instead of checkmarks). On Phase 3, I'm thinking I'll come up with a new component instead of iterating on top of this same one again because the requirements seem quite different, let's see.TL;DR:
OptionsSelector,OptionsListandOptionRowwith the newSelectionListshouldHaveOptionSeparator) don't exist anymore, and that's intended, to standardise the look and feel of same-purpose liststhiagobrez commentedon Jul 13, 2023
That said, I believe both Proposals from @DanutGavrus (point I) and @GItGudRatio are correct. You can either raise a PR in this issue, or I can add those to my Phase 2 PR which is currently open, however you prefer.
cc @shawnborton ^
GItGudRatio commentedon Jul 13, 2023
I'd be happy to raise a PR within the hour if I am assigned to the issue, I've got the code commited already. :)
DanutGavrus commentedon Jul 13, 2023
@thiagobrez As my Proposal's variant I and @GItGudRatio's Proposal are the same, shouldn't I be assigned here?
7 remaining items
[-]Web – Announce Room - Inconsistency in highlighting the selected option.[/-][+][$1000] Web – Announce Room - Inconsistency in highlighting the selected option.[/+]melvin-bot commentedon Jul 19, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01422c202471bfda96
melvin-bot commentedon Jul 19, 2023
Current assignee @JmillsExpensify is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jul 19, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
External)Santhosh-Sellavel commentedon Jul 20, 2023
Sorry bit late here I agree with @thiagobrez, we have ongoing migrations so we would handle it there, let's close this one thanks!
cc: @JmillsExpensify @rushatgabhane
DanutGavrus commentedon Jul 21, 2023
@Santhosh-Sellavel @JmillsExpensify @rushatgabhane If this issue was External and if my Proposal was left before the same change was applied in the migrations, will I be eligible for the bounty?
I think I saw something similar in another Issue recently, but can't find it easily so I thought of asking. Thanks!
Santhosh-Sellavel commentedon Jul 23, 2023
We are already in the process of migrating to the selection list. So the proposal doesn't qualify for a bounty.
melvin-bot commentedon Jul 24, 2023
@JmillsExpensify @rushatgabhane this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
melvin-bot commentedon Jul 24, 2023
@JmillsExpensify, @rushatgabhane Huh... This is 4 days overdue. Who can take care of this?
JmillsExpensify commentedon Jul 24, 2023
Thanks @Santhosh-Sellavel! Closing this one out.