Skip to content

[$500] Tag - Child tags are not indented on list #31753

Closed

Description

@lanitochka17

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


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:

Issue found when executing PR #31494

Action Performed:

Precondition: enable and add parent and child tags as an admin on OD

  1. Log in to ND as an employee
  2. Navigate to workspace chat
  3. Tap the "+" > Request money
  4. Enter the amount
  5. On the confirmation screen, tap the "Show more" button
  6. Select "Tags"

Expected Result:

Child tags are indented on the list

Actual Result:

Child tags are not indented. It is a different behavior with categories: child categories are indented

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6287714_1700685033775!photo_2023-11-22_14-24-49

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f5ae8cc738a492b2
  • Upwork Job ID: 1727436127562772480
  • Last Price Increase: 2023-11-29
  • Automatic offers:
    • c3024 | Reviewer | 27886979
    • wlegolas | Contributor | 27886980

Activity

  1. added
    External
    Daily
    Bug
    on Nov 22, 2023
  2. changed the title [-]Tag - Child tags are not indented on list[/-] [+][$500] Tag - Child tags are not indented on list[/+] on Nov 22, 2023
  3. melvin-bot commented on Nov 22, 2023

    @melvin-bot
  4. melvin-bot commented on Nov 22, 2023

    @melvin-bot

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

  5. added
    Help Wanted
    on Nov 22, 2023
  6. melvin-bot commented on Nov 22, 2023

    @melvin-bot

    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
  7. melvin-bot commented on Nov 22, 2023

    @melvin-bot

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

  8. wlegolas commented on Nov 23, 2023

    @wlegolas
    Contributor

    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 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].

    function getTagsOptions(tags) {
    return _.map(tags, (tag) => {
    // This is to remove unnecessary escaping backslash in tag name sent from backend.
    const tagName = tag.name && tag.name.replace(/\\{1,2}:/g, ':');
    return {
    text: tagName,
    keyForList: tagName,
    searchText: tagName,
    tooltipText: tagName,
    isDisabled: !tag.enabled,
    };
    });
    }

    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>}
     */
    function getTagsOptions(tags) {
        const normalizedTags = _.map(tags, (tag) => {
            // This is to remove unnecessary escaping backslash in tag name sent from backend.
            const tagName = tag.name && tag.name.replace(/\\{1,2}:/g, ':');
    
            return {
                ...tag,
                name: tagName,
            };
        });
    
        return getCategoryOptionTree(normalizedTags);
    }

    What alternative solutions did you explore? (Optional)

    N/A

    POC

    poc-issue-31753.mov
  9. MitchExpensify commented on Nov 23, 2023

    @MitchExpensify
    Contributor

    Having some trouble reproducing this, do you have a video of your reproduction @lanitochka17 ?

  10. melvin-bot commented on Nov 27, 2023

    @melvin-bot

    @MitchExpensify, @c3024 Whoops! This issue is 2 days overdue. Let's get this updated quick!

  11. 14 remaining items

  12. removed
    Help Wanted
    on Nov 29, 2023
  13. melvin-bot commented on Nov 29, 2023

    @melvin-bot

    📣 @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

  14. melvin-bot commented on Nov 29, 2023

    @melvin-bot

    📣 @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 📖

  15. wlegolas commented on Dec 1, 2023

    @wlegolas
    Contributor

    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.

  16. added
    Reviewing
    Weekly
    and removed
    Daily
    on Dec 1, 2023
  17. wlegolas commented on Dec 1, 2023

    @wlegolas
    Contributor

    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

  18. MitchExpensify commented on Dec 5, 2023

    @MitchExpensify
    Contributor

    How is progress here?

  19. c3024 commented on Dec 6, 2023

    @c3024
    Contributor

    PR merged and deployed to staging.

  20. MitchExpensify commented on Dec 7, 2023

    @MitchExpensify
    Contributor

    nice one!

  21. MitchExpensify commented on Dec 8, 2023

    @MitchExpensify
    Contributor

    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

  22. wlegolas commented on Dec 9, 2023

    @wlegolas
    Contributor

    Compensation has been sent for your work all the same! Thanks

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugExternalReviewingWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions