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
[$500] Tag - Child tags are not indented on list #31753
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2
Version Number: 1.4.2-0 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 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Please re-state the problem that we are trying to solve in this issue.
Tag - Child tags are not indented on list
What is the root cause of that problem?
The method getTagsOptions is used to get the Tags to be displayed, this method does not create a tree structure when the tag name has the format [parent]:[child].
To generate the Tag options is used the sequence of methods from the OptionsListUtils: getFilteredOptions -> getOptions -> getTagListSections -> getTagsOptions
What changes do you think we should make in order to solve the problem?
We should change the getTagsOptions method to call the getCategoryOptionTree method with the tags to create the tree structure when the tag name has the format [parent]:[child].
For example,
/** * Transforms the provided tags into objects with a specific structure. * * @param {Object[]} tags - an initial tag array * @param {Boolean} tags[].enabled - a flag to enable/disable option in a list * @param {String} tags[].name - a name of an option * @returns {Array<Object>} */functiongetTagsOptions(tags){constnormalizedTags=_.map(tags,(tag)=>{// This is to remove unnecessary escaping backslash in tag name sent from backend.consttagName=tag.name&&tag.name.replace(/\\{1,2}:/g,':');return{
...tag,name: tagName,};});returngetCategoryOptionTree(normalizedTags);}
What alternative solutions did you explore? (Optional)
📣 @wlegolas 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job
Please accept the offer 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 📖
Just to keep you up to date, I'm facing some problems running Android in my environment to test the Native app on this device, maybe tomorrow I can send the PR here.
We're reverting this change. I made a mistake in agreeing this was a bug because it is in fact consistent with OldDot. Compensation has been sent for your work all the same! Thanks
Thank you very much for the payment, even after it was completed and you saw that it was not a bug, this shows the great respect that Expensify has with the collaborators.
BugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in reviewWeeklyKSv2
Activity
[-]Tag - Child tags are not indented on list[/-][+][$500] Tag - Child tags are not indented on list[/+]melvin-bot commentedon Nov 22, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01f5ae8cc738a492b2
melvin-bot commentedon Nov 22, 2023
Triggered auto assignment to @MitchExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Nov 22, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Nov 22, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @c3024 (
External)wlegolas commentedon Nov 23, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Tag - Child tags are not indented on list
What is the root cause of that problem?
The method
getTagsOptionsis used to get the Tags to be displayed, this method does not create a tree structure when the tag name has the format[parent]:[child].App/src/libs/OptionsListUtils.js
Lines 912 to 925 in a5e4fb3
To generate the Tag options is used the sequence of methods from the
OptionsListUtils:getFilteredOptions->getOptions->getTagListSections->getTagsOptionsWhat changes do you think we should make in order to solve the problem?
We should change the
getTagsOptionsmethod to call the getCategoryOptionTree method with the tags to create the tree structure when the tag name has the format[parent]:[child].For example,
What alternative solutions did you explore? (Optional)
N/A
POC
poc-issue-31753.mov
MitchExpensify commentedon Nov 23, 2023
Having some trouble reproducing this, do you have a video of your reproduction @lanitochka17 ?
melvin-bot commentedon Nov 27, 2023
@MitchExpensify, @c3024 Whoops! This issue is 2 days overdue. Let's get this updated quick!
14 remaining items
melvin-bot commentedon Nov 29, 2023
📣 @c3024 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
melvin-bot commentedon Nov 29, 2023
📣 @wlegolas 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link
Upwork job
Please accept the offer 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 📖
wlegolas commentedon Dec 1, 2023
Hello there.
Just to keep you up to date, I'm facing some problems running Android in my environment to test the Native app on this device, maybe tomorrow I can send the PR here.
wlegolas commentedon Dec 1, 2023
Hi @c3024 and @neil-marcellini I created the PR with the fix and the suggestion to rename the method.
If you have any questions or suggestions, please let me know.
Link to PR: #32337
MitchExpensify commentedon Dec 5, 2023
How is progress here?
c3024 commentedon Dec 6, 2023
PR merged and deployed to staging.
MitchExpensify commentedon Dec 7, 2023
nice one!
MitchExpensify commentedon Dec 8, 2023
We're reverting this change. I made a mistake in agreeing this was a bug because it is in fact consistent with OldDot. Compensation has been sent for your work all the same! Thanks
wlegolas commentedon Dec 9, 2023
Hi, @MitchExpensify, thank you for sharing this context.
Thank you very much for the payment, even after it was completed and you saw that it was not a bug, this shows the great respect that Expensify has with the collaborators.