-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 2024-04-30][$500] Tag - Tag in Parent: Child format is displayed as Parent/: Child in Tag list #37847
Comments
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
Triggered auto assignment to @marcaaron ( |
We think that this bug might be related to #wave8-collect-admins |
ProposalPlease re-state the problem that we are trying to solve in this issue.Tag - Tag in Parent: Child format is displayed as Parent/: Child in the Tag list What is the root cause of that problem?We are showing all types of policy tags even if they are multiple tags. App/src/pages/workspace/tags/WorkspaceTagsPage.tsx Lines 53 to 54 in 98129e6
What changes do you think we should make in order to solve the problem?We should filter out the policy multi-level tags from the
What alternative solutions did you explore? (Optional)Create a regex to test if the tag is multi-level by checking if the The regex will be similar to the regex the Lines 208 to 213 in 13f8bc0
Optional Implement one of the above solutions in the Additional To handle possible regressions, in this line, let's check the |
ProposalPlease re-state the problem that we are trying to solve in this issue.Child format is displayed as Parent/: Child in Tag list What is the root cause of that problem?We flatten out the array of tags: App/src/pages/workspace/tags/WorkspaceTagsPage.tsx Lines 51 to 73 in 98129e6
See at the end of the code above What changes do you think we should make in order to solve the problem?We should not do this, we should follow similar pattern as we do with categories and remove the Considering that both tags and categories are on the same option menu, it would be good to remove What alternative solutions did you explore? (Optional)Considering the comments, the updated solution is as follows: As this is a temporary fix, i suggest that we shouldn't update the util function, instead we should modify the FE as follows, we should update the mapping: const tagList = useMemo<PolicyForList[]>(
() =>
policyTagLists
.map((policyTagList) =>
Object.values(policyTagList.tags || []).map((value) => {
+ let cleanValue = value.name;
+ const colonIndex = cleanValue.indexOf('\\:');
+ if (colonIndex !== -1 && colonIndex > 0) {
+ cleanValue = cleanValue.substring(0, colonIndex);
+ }
return {
+ value: cleanValue,
+ text: cleanValue,
+ keyForList: cleanValue,
isSelected: !!selectedTags[value.name],
rightElement: (
<View style={styles.flexRow}>
<Text style={[styles.textSupporting, styles.alignSelfCenter, styles.pl2, styles.label]}>
{value.enabled ? translate('workspace.common.enabled') : translate('workspace.common.disabled')}
</Text>
<View style={[styles.p1, styles.pl2]}>
<Icon
src={Expensicons.ArrowRight}
fill={theme.icon}
/>
</View>
</View>
),
};
})
)
.flat(),
[policyTagLists, selectedTags, styles.alignSelfCenter, styles.flexRow, styles.label, styles.p1, styles.pl2, styles.textSupporting, theme.icon, translate],
);
|
cc @luacmartins @waterim might be able to triage this faster than me. Will take a look soon if not. |
we're discussing this internally since multi-level tags were out of scope for the doc |
We've discussed this internally and the solution we're going with is to just hide any tags that are on level 2 or above, so we only want to display the root level for now. |
We're still discussing some nuances for this case. I'll circle back once we made a decision on the expected behavior |
@kbecciv how did you set up that |
@luacmartins is this a blocker? Tags are a collect policy feature and thus in order to use them in NewDot you have to run a JS snippet in OldDot. Right? |
Yea, let's demote this. |
@kbecciv bump on this comment
|
@luacmartins Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
This is a polish item, will make external |
❌ There was an error making the offer to @Tony-MK for the Contributor role. The BZ member will need to manually hire the contributor. |
@luacmartins @Tony-MK @allroundexperts @adelekennedy 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! |
@Tony-MK manually invited you to the job on Upwork! |
@luacmartins I think this issue would solve #38683 |
Makes sense. I'll put that on hold |
@allroundexperts, the PR is ready review. |
Reassigning as per https://expensify.slack.com/archives/C02NK2DQWUX/p1711707769397279 |
📣 @hoangzinh 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
This issue has not been updated in over 15 days. @hoangzinh, @luacmartins, @Tony-MK, @adelekennedy eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
The fix has been landed in Prod #38759 (comment) |
payments made - @luacmartins are we good to close? |
Yes, should be good to close. Thanks! |
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.48-0
Reproducible in staging?: y
Reproducible in production?: n
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Expected Result:
Tag in Parent: Child format is displayed correctly.
Actual Result:
Tag in Parent: Child format is displayed as Parent/: Child.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: