-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix/37095: Tag list show required #37388
Fix/37095: Tag list show required #37388
Conversation
@@ -267,6 +267,9 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ | |||
|
|||
const policyTagLists = useMemo(() => PolicyUtils.getTagLists(policyTags), [policyTags]); | |||
|
|||
// Check if it is the multiple levels tags or not | |||
const isMultipleLevelsTags = policyTagLists && policyTagLists.length > 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to return required
field in case of single tag. Because with the current solution, in case of multiple tags but just have one tag list, isMultipleLevelsTags
is false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as this one #35134 (comment)
@akinwale Ping to review in case you miss it |
Thanks for the bump. I will review today. |
@dukenv0307 Please upload test videos or screenshots for Android native, iOS native and Desktop. |
You also need to clarify your test steps because there are two things that can be disabled when dealing with tag lists: the Required flag for a tag list, or each individual tag when a user clicks on edit tags for a particular tag list.
What should be marked as disabled? The Required switch or an individual tag when the user clicks on Edit tags?
What should not appear here? The "Required" text next to the tag name, or each individual disabled tag that corresponds to a tag list? |
Reviewer Checklist
Screenshots/VideosAndroid: Native37388-android-native.mp4Android: mWeb Chrome37388-android-chrome.mp4iOS: Native37388-ios-native.mp4iOS: mWeb Safari37388-ios-safari.mp4MacOS: Chrome / Safari37388-web.mp4MacOS: Desktop37388-desktop.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of things to address: #37388 (comment) and #37388 (comment).
@@ -779,11 +779,11 @@ function MoneyTemporaryForRefactorRequestConfirmationList({ | |||
style={[styles.moneyRequestMenuItem]} | |||
disabled={didConfirm} | |||
interactive={!isReadOnly} | |||
rightLabel={isTagRequired ? translate('common.required') : ''} | |||
rightLabel={required ? translate('common.required') : ''} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use required
field in both single tag and mulitple levels tags case based on comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
isSupplementary: !isTagRequired, | ||
})), | ||
..._.map(policyTagLists, ({name, required}, index) => { | ||
const isTagRequired = !isUndefined(required) && required; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we removed canUseViolations
?
And this does not work for single level tags where required is not set for each tag, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this does not work for single level tags where required is not set for each tag, right?
In single-level tag, it still works because we also have required
field. But we have the issue with BE side so that field is not returned correctly (Known issue mentioned here). Below is the data returned from BE side in case of single-level tag:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we removed canUseViolations
I updated the PR to add the canUseViolations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is held on backend change as per https://expensify.slack.com/archives/C01GTK53T8Q/p1708948376264389?thread_ts=1708732718.173419&cid=C01GTK53T8Q?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still on HOLD? What PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MonilBhavsar @akinwale BE is fixed (See comment). I just tested it again and it works well
@MonilBhavsar Con you help review PR again? |
Sorry looking
|
@MonilBhavsar Yes, I did retest on all platforms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for confirming!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/MonilBhavsar in version: 1.4.61-0 🚀
|
🚀 Deployed to staging by https://github.com/MonilBhavsar in version: 1.4.61-0 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.61-8 🚀
|
Details
Fixed Issues
$ #37095
PROPOSAL: #37095 (comment)
Tests
required
(See the below image)Offline tests
QA Steps
required
(See the below image)PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screencast.from.04-03-2024.01.10.37.webm
Android: mWeb Chrome
Screencast.from.28-02-2024.09.13.37.webm
iOS: Native
Screencast.from.04-03-2024.01.04.14.webm
iOS: mWeb Safari
Screencast.from.28-02-2024.09.13.04.webm
MacOS: Chrome / Safari
Screencast.from.28-02-2024.09.12.27.webm
MacOS: Desktop
Screencast.from.04-03-2024.00.50.14.webm