-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 WorkspaceTagsPage #37621
Create WorkspaceTagsPage #37621
Conversation
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.
Nice start!
@abdulrahuman5196 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.
@luacmartins thank you! Will fix in 1 hour |
@waterim Just to confirm. Is it to only show the page with tags and select tags? But can't enable or disable on this PR ? |
And why are we only having web only screenshots? Can we add platform specific screenshots? |
yes, this PR only adds the main list view page. There's no |
@waterim Any update on this? |
@abdulrahuman5196 yes, pushed new fixed Icon |
@abdulrahuman5196 are you still available to continue your review? |
yes |
Starting in couple of minutes. Closing out another 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.
LGTM!
@Expensify/design |
assets/images/tag.svg
Outdated
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.
Where did we get the asset for this? I think all of our icons we put into the system are 20x20 in pure black (#000000
).
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.
Updated version for ya! tag.svg.zip
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.
Downloaded from figma😅
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.
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.
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.
Downloaded from the figma and adjusted as all illustrations without any additional sizing
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.
Got it, in the future you can just get the assets from the Design team so we can make sure you're pulling the right stuff.
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.
@shawnborton okay, thank you!
Given that we will have a different PR for functionality, kindly watch out for the below bug on refresh as well. Screen.Recording.2024-03-05.at.12.15.41.AM.mov |
Reviewer Checklist
Screenshots/VideosAndroid: NativeN/A Android: mWeb ChromeN/A iOS: NativeN/A iOS: mWeb SafariN/A MacOS: DesktopN/A |
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.
Changes looks good and works well. Reviewers checklist is also complete.
All yours. @luacmartins
🎀 👀 🎀
C+ Reviewed
@waterim can you update the assets with the new ones provided by @shawnborton? I think we should be good to merge after that. |
@luacmartins Just came back home, updated images :) |
@luacmartins looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Tests were passing |
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.4.48-0 🚀
|
<ScreenWrapper | ||
includeSafeAreaPaddingBottom={false} | ||
style={[styles.defaultModalContainer]} | ||
testID={WorkspaceTagsPage.displayName} | ||
shouldShowOfflineIndicatorInWideScreen | ||
> | ||
<HeaderWithBackButton | ||
icon={Illustrations.Tag} | ||
title={translate('workspace.common.tags')} | ||
shouldShowBackButton={isSmallScreenWidth} | ||
/> |
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.
Hey, I have a question related to this change. Every workspace page uses the WorkspacePageWithSections
wrapper except for this one. Is this intentional?
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 don't think the new pages do, e.g. WorkspaceMembersPage, WorkspaceCategoriesPage
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.
The WorkspaceMembersPage
copies the logic from the WorkspacePageWithSections
.
I'm using this wrapper to fix multiple not found views, and part of the PR is making the above page use the wrapper.
So what is the aim of the WorkspacePageWithSections
wrapper? When should it be used?
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.
Hmm interesting case, maybe we should be using WorkspacePageWithSections
here too and on all other pages. I think we can update these, but maybe in a separate 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.
We probably have to think it over as currently, we have three different wrappers for workspaces, and we don't have clear guidelines on when to use which one.
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.
Yea, that makes sense. I'll create an issue for it.
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.
Created issue - #37898
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.
Those wrappers also break the not-found views.
Going to e.g. https://staging.new.expensify.com/workspace/dssaddssdaads/categories` we see duplicated not found (that's what is the scope of the other issue) and after pressing the back button we see another ones...
The Tags screen should be added to the const TAB_TO_CENTRAL_PANE_MAPPING: Record<BottomTabName, CentralPaneName[]> = {
[SCREENS.WORKSPACE.INITIAL]: [
// ...
SCREENS.WORKSPACE.TAGS,
],
}; Otherwise, the deep linking doesn't work correctly. |
🚀 Deployed to production by https://github.com/roryabraham in version: 1.4.48-0 🚀
|
const {translate} = useLocalize(); | ||
const [selectedTags, setSelectedTags] = useState<Record<string, boolean>>({}); | ||
const policyTagLists = useMemo(() => PolicyUtils.getTagLists(policyTags), [policyTags]); | ||
const tagList = useMemo<PolicyForList[]>( |
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 #38663.
We add a isDisabled
flag to take care of the behavior when deleting a tag offline. :)
Details
Create WorkspaceTagsPage
Fixed Issues
$ #37309
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