-
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
Create TagSettingsPage #38335
Create TagSettingsPage #38335
Conversation
@hoangzinh Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
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.
Looking good. Left a few comments
@waterim let me know when you address the comments and resolve conflicts. Let's get this merged! |
@luacmartins Resolved conflict and updated |
Gonna complete review checklist soon |
@waterim It's weird from my end, I'm unable to toggle the enable button Screen.Recording.2024-03-16.at.00.04.14.movHave you found the same bug? |
@hoangzinh damn,checking |
Weird, it works for me |
Hmm, okay, it doesnt work for newly created tags |
Fixed, pushed |
src/libs/actions/Policy.ts
Outdated
...policyTag.tags[key], | ||
errors: null, | ||
pendingFields: { | ||
enabled: null, | ||
}, |
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.
@waterim I think because of our success optimistic data here. It reset data
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.
yes, updated
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.
Because of type check, it makes us update more data to Onyx here. Usually we just update
acc[key] = {
errors: null,
pendingFields: {
enabled: null,
},
};
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 can leave as now, as categories done, to have consistency
It was because of the removal from reduce data regarding the tags to update, reduce is generating new object, thats why we need to pass it as well |
value: { | ||
[policyTag.name]: { | ||
tags: { | ||
...Object.keys(tagsToUpdate).reduce<PolicyTags>((acc, key) => { |
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.
@waterim NAB we don't need a spread operator here.
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-03-16.at.00.49.51.android.movAndroid: mWeb ChromeScreen.Recording.2024-03-16.at.00.51.00.android.chrome.moviOS: NativeScreen.Recording.2024-03-16.at.00.48.20.ios.moviOS: mWeb SafariScreen.Recording.2024-03-16.at.00.45.49.ios.safari.movMacOS: Chrome / SafariScreen.Recording.2024-03-16.at.00.33.54.web.movMacOS: DesktopScreen.Recording.2024-03-16.at.00.38.04.desktop.mov |
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
✋ 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/luacmartins in version: 1.4.54-0 🚀
|
function TagSettingsPage({route, policyTags}: TagSettingsPageProps) { | ||
const styles = useThemeStyles(); | ||
const {translate} = useLocalize(); | ||
const policyTag = useMemo(() => PolicyUtils.getTagList(policyTags, 0), [policyTags]); |
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.
Crash App from this line
Screen.Recording.2024-03-18.at.23.49.51.mov
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.
Do you mean not found page appears?
🚀 Deployed to production by https://github.com/AndrewGable in version: 1.4.54-4 🚀
|
</View> | ||
</View> | ||
</OfflineWithFeedback> | ||
<MenuItemWithTopDescription |
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.
Coming from #39169.
We added the offline behavior for this menu item. :)
Details
Tag Settings Page
Fixed Issues
$ #37313
Tests
Offline tests
Same as tests
QA Steps
None
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)/** 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
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Mobile