-
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
Add a switch to toggle on/off "require tags" on WorkspaceViewTagsPage
#42328
Add a switch to toggle on/off "require tags" on WorkspaceViewTagsPage
#42328
Conversation
WorkspaceViewTagsPage
<View style={[styles.pv4, styles.ph5]}> | ||
<View style={[styles.flexRow, styles.mb5, styles.mr2, styles.alignItemsCenter, styles.justifyContentBetween]}> | ||
<Text style={[styles.textNormal]}>{translate('workspace.tags.requiresTag')}</Text> | ||
<Switch | ||
isOn={Boolean(policyTagList?.required)} | ||
accessibilityLabel={translate('workspace.tags.requiresTag')} | ||
onToggle={(on) => Policy.setWorkspaceTagListRequired(policyID, route.params.orderWeight ?? 0, on)} | ||
/> | ||
</View> | ||
</View> |
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.
Use ToggleSettingOptionRow and pass errors and pending action
* When the tags are imported as multi level tags, the index of the top | ||
* most tag list item | ||
*/ | ||
tagListIndex?: number; |
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.
Not optional
WorkspaceViewTagsPage
WorkspaceViewTagsPage
WorkspaceViewTagsPage
WorkspaceViewTagsPage
WorkspaceViewTagsPage
WorkspaceViewTagsPage
/** | ||
* When the tags are imported as multi level tags, the index of the top | ||
* most tag list item | ||
*/ |
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.
Remove comment, not needed
thanks for the quick review. I'm working on this right now. I'll let you know once the PR is ready for review 😄 |
PR not ready yet for review 🙇 |
I'm not sure why TypeScript checks are failing here. The failed code is not a part changed by this PR. I merged the latest main but it's still failing. 🤔 @s77rt do you have any idea? ![]() |
@hayata-suenaga I don't see the commit where you merged main or qbo-freeze-branch, can you double check |
…gs-per-parent-level
WorkspaceViewTagsPage
WorkspaceViewTagsPage
@hayata-suenaga You merged both |
yep that is what I was working on last night but was having an issue with reverting the merge. I'll try this again now. |
bfc9344
to
35992e8
Compare
keep working on this branch/PR instead -> #42952 |
closing this PR |
Details
Adds the new Switch component to enable/disable "Require tags" on the parent tag level when there are multi-level tags.
Fixed Issues
$ #41374
PROPOSAL: N/A
Tests / QA Steps
Members must tag all expenses
Offline tests
Do the same test as the above. You should do Steps 1 and 2 while online. and the rest offline.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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./** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop