-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[HOLD for payment 2023-04-27] [$1000] Pronouns search results are not arranged alphabetically #17223
Comments
Triggered auto assignment to @garrettmknight ( |
Bug0 Triage Checklist (Main S/O)
|
Discussing internally to see if this was intentional for any reason before opening it up. |
Got agreement, let's make it alphabetical! |
Job added to Upwork: https://www.upwork.com/jobs/~01b466ff328355bffb |
Current assignee @garrettmknight is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Pronouns search results are not sorted in alphabetic order. What is the root cause of that problem?Currently the What changes do you think we should make in order to solve the problem?Sort the filtered pronouns list in App/src/pages/settings/Profile/PronounsPage.js Lines 72 to 73 in a177ba3
For example: return _.chain(this.pronounsList)
.filter(pronous => pronous.text.toLowerCase().indexOf(searchedValue.toLowerCase()) >= 0)
.sortBy(pronous => pronous.text.toLocaleLowerCase())
.value(); What alternative solutions did you explore? (Optional)NA Result |
ProposalPlease re-state the problem that we are trying to solve in this issue.In this issue, when the user enters the text that is common to all pronouns, that is, '/', then the whole list of pronouns is shown. This list however is not sorted alphabetically. What is the root cause of that problem?In the translate files, the keys for each pronoun is not sorted alphabetically. This causes the list to render without being sorted as well. What changes do you think we should make in order to solve the problem?To solve this issue, three approaches can be considered: Solution A Solution B
Solution C |
ProposalPlease re-state the problem that we are trying to solve in this issue.Pronouns search results are not arranged alphabetically. What is the root cause of that problem?We are filtering pronoun list via this function App/src/pages/settings/Profile/PronounsPage.js Lines 67 to 74 in bcada91
We can see at line 72 we are returning list without any sorting. So this is the root cause of the problem. What changes do you think we should make in order to solve the problem?We have to sort the pronoun list list as shown below getFilteredPronouns() {
const searchedValue = this.state.searchValue.trim();
if (searchedValue.length === 0) {
return [];
}
return _.chain(this.pronounsList)
.filter(pronouns => pronouns.text.toLowerCase().indexOf(searchedValue.toLowerCase()) >= 0)
.sortBy(pronoun => pronoun.text.toLowerCase())
.value()
} What alternative solutions did you explore? (Optional)We can also sort pronoun list while we load it via App/src/pages/settings/Profile/PronounsPage.js Lines 81 to 107 in bcada91
So updated code should be as shown under: loadPronouns() {
const currentPronouns = lodashGet(this.props.currentUserPersonalDetails, 'pronouns', '');
// Make const
const pronounsList = _.map(this.props.translate('pronouns'), (value, key) => {
...
});
// Add this line
this.pronounsList = _.sortBy(pronounsList, pronoun => pronoun.text.toLowerCase());
} ResultsWeb.mov |
Triggered auto assignment to @danieldoglas ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Pronouns search results are not sorted alphabetically What is the root cause of that problem?When we are returning the this.pronounsList at that time we are not sorting the list App/src/pages/settings/Profile/PronounsPage.js Lines 84 to 107 in 0b5394e
What changes do you think we should make in order to solve the problem?we should use here
What alternative solutions did you explore? (Optional)none |
Thanks everyone for the proposals , all proposals are quite similar. IMO by sorting the pronouns list in the Based on this , we can proceed with @Prince-Mendiratta's Proposal : Solution C. @danieldoglas All yours. 🎀 👀 🎀 C+ reviewed |
📣 @Prince-Mendiratta You have been assigned to this job by @garrettmknight! |
Everyone has offers. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.2-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2023-04-27. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Reassigning since I'm OOO next week when this should be paid assuming no regressions. |
Triggered auto assignment to @puneetlath ( |
|
All paid. Thanks everyone! |
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:
Expected Result:
App should arrange pronouns search result alphabetically
Actual Result:
App does not arrange pronouns search result alphabetically eg: 'She / Her / Hers' are above 'Mer / Mers'
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.97-2

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
pronouns.not.alphabetical.issue.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1681118476643659
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: